mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 17:59:42 +02:00
fixed issue #18
This commit is contained in:
parent
8d943b4a98
commit
4e9f2eda56
1 changed files with 6 additions and 1 deletions
|
@ -74,7 +74,12 @@
|
|||
// Change player source and wait for loadeddata event, then play video
|
||||
// loadedmetadata doesn't work right now for flash.
|
||||
// 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_.handleTechSeeked_();
|
||||
if(!isPaused){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue