jplayer / jPlayer

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

loadedmetadata event doesn't have the correct metadata for Flash fallback #201

Open mike-tomko-codebaby opened 10 years ago

mike-tomko-codebaby commented 10 years ago

I've noticed that when $.jPlayer.event.loadedmetadata fires it doesn't actually have the new data from the flash player in the event.jPlayer.status object because jPlayer's internal status object doesn't get updated. This seems to defeat the whole purpose of the loadedmetadata event when using the flash fallback.

The workaround I've found is to add a call to _getFlashStatus(status) in the jPlayerFlashEvent js call when the eventType is $.jPlayer.event.loadedmetadata but I'm not sure if this has any unseen adverse effects.

thepag commented 10 years ago

I'd need to investigate this... What metadata are you talking about? The duration, videoWidth or videoHeight ?

mike-tomko-codebaby commented 10 years ago

All three properties aren't updated unfortunately. The event.jPlayer.status object shows all three as 0.

I'll push my patch that uses the workaround I described when I have a few minutes free.