fixed issue #18

This commit is contained in:
Aydın Akan 2015-12-15 14:38:23 +02:00
parent 8d943b4a98
commit 4e9f2eda56

View file

@ -74,7 +74,12 @@
// Change player source and wait for loadeddata event, then play video // Change player source and wait for loadeddata event, then play video
// loadedmetadata doesn't work right now for flash. // loadedmetadata doesn't work right now for flash.
// Probably because of https://github.com/videojs/video-js-swf/issues/124 // Probably because of https://github.com/videojs/video-js-swf/issues/124
setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one('loadeddata', function() { // If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash)
var handleSeekEvent = 'loadeddata';
if(this.player_.preload() == 'none' && this.player_.techName_ != 'Flash') {
handleSeekEvent = 'timeupdate';
}
setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() {
this.player_.currentTime(currentTime); this.player_.currentTime(currentTime);
this.player_.handleTechSeeked_(); this.player_.handleTechSeeked_();
if(!isPaused){ if(!isPaused){