Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Player 6 indicates that time remaining to play MP3 file is Infinity NaN


I am new to JW Player and working with JW Player 6. I am developing/testing with my localhost IIS server. The JWplayer setup function directly accesses an mp3 file (via http://..) residing on my web site hosted by 1and1, essentially as follows:

bc.. <div id='my-video'></div>
<script>
jwplayer('my-video').setup({
file: 'http://www.abaalkoreh.com/app/download/9999999/abcdef.mp3';
width: '480',
height: '40'
});
</script>



The player shows properly on the screen, but the number giving the remaining time (appearing on the right side) says Infinity instead of the expected number, as if JWPlayer doesn't find the file's EOF indicator. As a result, when the user starts the player (clicks the right arrow), the mp3 sound plays OK but the progress bar does not move and the position cannot be moved manually - it just bounces back to the starting line.

However, if I first download the same mp3 file to my localhost server and then run setup (as below) it works fine in all respects.

bc.. <div id='my-video'></div>
<script>
jwplayer('my-video').setup({
file: 'http://localhost/jwplayer/abcdef.mp3';
width: '480',
height: '40'
});
</script>



In summary, the JW Player shows time reamaining as infinity when setup accesses the web based file and then works perfectly when it accesses the downloaded version of the same file. Any suggestions would be very much appreciated.

Thank you.
Bernie

18 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

Ethan,

I assume you are asking about a link to the mp3 file. An actual sample file appears in the full program displayed below.

bc.. <!DOCTYPE html>
<html>
<head>
<script src="http://localhost/jwplayer.txt"></script>
<script>
function showplayer(){
jwplayer('my-video').setup({
file:'http://abaalkoreh.com/app/download/7072942304/Noachx.mp3',
width: '480',
height: '40'
});
}
</script>
<body onload='showplayer()'>
<div id='my-video'></div>
</body>
</html>



I should also point out that my reported result is in Chrome, But when I run in Firefox the player does not display at all - I believe due to javascript errors.
e.g.
Timestamp: 12/26/2012 10:10:35 AM
Error: aRequest.URI is undefined
Source File: chrome://y2layers/content/overlay.js
Line: 323

Thanks for your help.
Bernie

Ethan Feldman

JW Player Support Agent  
0 rated :

@Bernie – I actually want a link to where you are embedding the player. I am not sure what overlay.js is. Can you provide a link to that (the player embed), so I can debug?

JW Player

User  
0 rated :

Ethan,

Sorry - please ignore the previously reported misleading syntax error info relative to Firefox - which was due to a slip up in my coding and program invocation. The corrected code (see below) produces no syntax errors and yields the same results in Chrome, IE and Firefox, except that in Firefox the player shows 0 on the right hand side, whereas in the other browsers the player shows infinity..

I am not quite sure how to respond to your request for a link but perhaps I can get at it by explaining my file structure:

I am running Windows 7 and IIS. I extracted the JW Player 6 compressed download to the directory c:inetpubwwwrootjwplayer - which now contains
jwplayer.js
jwplayer.html5.js
jwplayer.flash.swf .
(Note - All files reside on my local drive as I am testing with localhost)

My html file (testjw1.html) also resides in c:inetpubwwwrootjwplayer. I explicitly link to jwplayer.js via the statement that appears in the <head> section, (see below):
<script type="text/javascript" src='jwplayer.js"></script>
and as you can see, I invoke the jwplayer.setup function in my javascript function showplayer() which is triggered by the onload event.

The corrected version of testjw1.html code is:
bc.. <!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
<script type="text/javascript" src="jwplayer.js"></script>
<script>
function showplayer(){
jwplayer('my-video').setup({
file:'http://abaalkoreh.com/app/download/7072942304/Noachx.mp3',
width: '480',
height: '40'
});
}
</script>
<body onload='showplayer()'>
<div id='my-video'></div>
</body>
</html>



I test the above code in IIS by typing the folloing url in my browser:
http://localhost/jwplayer/testjw1.html

Thank you very much,
Bernie

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Bernie,

Ok, I tested this locally.

In Flash mode, the player never shows the duration, it is just 0:00

In HTML5 mode, I see the NaN issue.

However, I am fairly certain the issue is because of the mp3 file. It has to be an encoding issue.

If I replace this line of code:

file:'http://abaalkoreh.com/app/download/7072942304/Noachx.mp3',



With this:
file:'http://www.longtailvideo.com/jw/upload/bunny.mp3',



Then the issue goes away.

Thanks,
-Ethan 

JW Player

User  
0 rated :

i have same issue, but in radio stream url's and html5 mode in chrome browser
URL to stream:
http://94.25.53.133/ultra-128.mp3
it's not mp3 file, just stream from icecast server
http://savepic.org/2541210.png

Ethan Feldman

JW Player Support Agent  
0 rated :

This will work in the player, just set the player’s type variable to mp3.

JW Player

User  
0 rated :

Hi Ethan
Yes, it set to mp3
see screen
http://savepic.org/2492131.png

this is console.log() from my js, that generates a window with player

Ethan Feldman

JW Player Support Agent  
0 rated :

Where is this running?

JW Player

User  
0 rated :

now in my localhost
browser - Chrome
in other browsers it's ok, but by default in opera/firefox - mode -> flash

Ethan Feldman

JW Player Support Agent  
0 rated :

Sorry, going to need to see a link up to debug properly.

JW Player

User  
0 rated :

ok, i'll create test html page with links...

Ethan Feldman

JW Player Support Agent  
0 rated :

ok, thanks

JW Player

User  
0 rated :

Same issue for me

http://www.budgiecollective.com/playerii/

Infinity:Nan:Nan

Only in Chrome. It's an Icecast stream too. Happy with any time showing (0:00). Just not an error if possible.

While I'm here, how can I remove the radius on the control bar so the white corners go? Sorry to hijack a little bit there.

Ethan Feldman

JW Player Support Agent  
0 rated :

I get the time slider and then 0:00, this is happening because the stream is live though.

Note we don’t officially support IceCast or ShoutCast.

You could do that by making a custom skin via the skinning model, a sdk is available here – http://developer.longtailvideo.com/trac/

JW Player

User  
0 rated :

Is it possible to turn the notification off?

JW Player

User  
0 rated :

As in... the error/notification must be coming from somewhere. Even if it's coming from the fact that it's a live stream.

Thanks I'll look into the skinner.

Ethan Feldman

JW Player Support Agent  
0 rated :

What notification ?

This question has received the maximum number of answers.