jplayer / jPlayer

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

"canplay" event is never fired in Firefox #298

Open csbubbles opened 9 years ago

csbubbles commented 9 years ago

I use "canplay" to figure out when the "play/pause" functionality should be available for a user through the UI. It works fine in Chrome and Safari, but in Firefox that event never occurs.

If it is a bug, please treat it as a critical issue as it breaks the typical workflow to implement audio players. If it is hard to fix for some reason, that would be appreciated if you could provide some workaround.

jPlayer v. 2.9.2 Firefox v. 35.0.1 Audio: oga

csbubbles commented 9 years ago

Updated Firefox to v. 36.0 - same issue there as well.

csbubbles commented 9 years ago

More details.

"canplay" in FF is getting triggered after "play" method is called. The problem is that from the jPlayer user perspective this behavior is inconsistent. My assumption is that Safari and Chrome start preloading media immediately, but probably FF does not. As a result, jPlayer's events state machine is unreliable without "preload" parameter set to "auto", or explicitly called "load" method.

I believe the expected fix would be to make it consistent (either prevent auto pre-buffering in Chrome and Safari as well, or to make preload="auto" by default) and cover this issue in the Developer Guide apparently.

amitgur commented 9 years ago

Same isuee, I never used the preload up to now, It solved me the firefox problem. Thanks