jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

Streams in Firefox report bogus duration / seekPercent (inconsitency with Chrome) #303

Open dmotd opened 9 years ago

dmotd commented 9 years ago

I'm working with a playlist that has both streaming and fixed duration mp3 media.

A stream in Chrome sets duration to 0, while Firefox sets duration to currentTime (not exact either), the result is that seekPercent is misrepresented which causes some erratic behaviour in the rendering of the seek bar.

In Chrome seekPercent is fixed to 0, which renders the seek bar at zero, a more desirable effect.

Inspecting the player status in the console of the demo player at http://jplayer.org/latest/demo-08/ with 'jQuery('#jquery_jplayer_1').data('jPlayer').status'

Firefox status:

{
  currentPercentAbsolute:99.99541835279703,
  currentPercentRelative:2194.2405029256583,
  currentTime:876.478661,
  duration:876.51882,

  remaining:0.04015900000001693,
  seekPercent:4.557176764327776,
  src: "http://listen.radionomy.com/abc-jazz"
}

Chrome status:

{
  currentPercentAbsolute: 0,
  currentPercentRelative: 0,
  currentTime: 1142.837632,
  duration: 0,

  remaining: -1142.837632,
  seekPercent: 100,
  src: "http://listen.radionomy.com/abc-jazz"
}

Firefox version: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 Chrome version: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36