fix loadedmetada disabled#71
fix loadedmetada disabled#71SzHeJason wants to merge 2 commits intospchuang:masterfrom SzHeJason:master
Conversation
| // player.on("loadedmetadata", function() { | ||
| // initialize(); | ||
| // }); | ||
| player.ready(function(){ |
There was a problem hiding this comment.
Nice! Does .ready guarantee the duration information has been loaded? My guess is that @spchuang had this listening to loadedmetadata for that reason.
|
@SzHeJason can you explain more what issue does using 'player.ready' solve? |
|
Sorry,My english is poor . Can't listen LoadedMetaData event when using this plugin. I think it should not ban any native event. |
|
player.ready is working in my project , Maybe it's a bad fixed |
|
can you try something like this.. And what browser are you on? And what video (flash, html5) are you playing? Thanks |
|
If register Video : HTML5 |
| // player.on("loadedmetadata", function() { | ||
| // initialize(); | ||
| // }); | ||
| player.ready(function(){ |
There was a problem hiding this comment.
This is what needs to be done to isolate the off loadedmetadata event listener to any other loadedmetadata listeners:
function initialize() {
if (setting.markerTip.display) {
initializeMarkerTip();
}
// remove existing markers if already initialized
player.markers.removeAll();
addMarkers(setting.markers);
onTimeUpdate();
player.on("timeupdate", onTimeUpdate);
player.off("loadedmetadata", initialize);
}
// setup the plugin after we loaded video's meta data
player.on("loadedmetadata", initialize);
monsieurludo
left a comment
There was a problem hiding this comment.
Playlist management by detaching loadedmetadata to any other loadedmetadata event listeners
No description provided.