Update vjs components

Upgrade Video.js core to v7.18.0 from v5.10.7
Upgrade Dash.js to v4.2.8 from v2.6.3
Upgrade videojs-contrib-dash to v5.1.1 from v2.9.1
Modify videojs-resolution-switcher
This commit is contained in:
Xaekai 2022-02-07 04:40:42 -08:00 committed by Calvin Montgomery
parent 9b05e2eb8c
commit f6ba5b71e8
8 changed files with 100647 additions and 24344 deletions

View file

@ -30,7 +30,7 @@ html(lang="en")
fn();
}
script(src="/js/jquery-1.12.4.min.js")
script(src="/js/video.js")
script(src="/js/videojs-resolution-switcher.js")
script(src="/js/vjs/video.js")
script(src="/js/vjs/videojs-resolution-switcher.js")
script(src="/js/playerjs-0.0.12.js")
script(src="/js/player.js")

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
.vjs-resolution-button .vjs-menu-icon:before {
.vjs-resolution-button .vjs-icon-placeholder:before {
content: '\f110';
font-family: VideoJS;
font-weight: normal;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,7 @@
/*! videojs-resolution-switcher - 2015-7-26
/*! videojs-resolution-switcher - 2022-02-07
* Copyright (c) 2016 Kasper Moskwiak
* Modified by Pierre Kraft and Derk-Jan Hartman
* Modified by Nisaba
* Licensed under the Apache-2.0 license. */
(function() {
@ -58,11 +59,11 @@
this.controlText('Quality');
if(options.dynamicLabel){
videojs.addClass(this.label, 'vjs-resolution-button-label');
videojs.dom.addClass(this.label, 'vjs-resolution-button-label');
this.el().appendChild(this.label);
}else{
var staticLabel = document.createElement('span');
videojs.addClass(staticLabel, 'vjs-menu-icon');
videojs.dom.addClass(staticLabel, 'vjs-menu-icon');
this.el().appendChild(staticLabel);
}
player.on('updateSources', videojs.bind( this, this.update ) );
@ -167,9 +168,7 @@
}
// 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
// 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)
// If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle
var handleSeekEvent = 'loadeddata';
if(this.player_.techName_ !== 'Youtube' && this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') {
handleSeekEvent = 'timeupdate';
@ -178,10 +177,8 @@
.setSourcesSanitized(sources, label, customSourcePicker || settings.customSourcePicker)
.one(handleSeekEvent, function() {
player.currentTime(currentTime);
player.handleTechSeeked_();
if(!isPaused){
// Start playing and hide loadingSpinner (flash issue ?)
player.play().handleTechSeeked_();
if (!isPaused && player.paused()) {
player.play()
}
player.trigger('resolutionchange');
});
@ -348,7 +345,7 @@
};
}
if(player.options_.sources.length > 1){
// tech: Html5 and Flash
// tech: Html5
// Create resolution switcher for videos form <source> tag inside <video>
player.updateSrc(player.options_.sources);
}
@ -362,6 +359,6 @@
};
// register the plugin
videojs.plugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher);
videojs.registerPlugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher);
})(window, videojs);
})();