mirror of https://github.com/calzoneman/sync.git
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:
parent
9b05e2eb8c
commit
f6ba5b71e8
|
@ -30,7 +30,7 @@ html(lang="en")
|
||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
script(src="/js/jquery-1.12.4.min.js")
|
script(src="/js/jquery-1.12.4.min.js")
|
||||||
script(src="/js/video.js")
|
script(src="/js/vjs/video.js")
|
||||||
script(src="/js/videojs-resolution-switcher.js")
|
script(src="/js/vjs/videojs-resolution-switcher.js")
|
||||||
script(src="/js/playerjs-0.0.12.js")
|
script(src="/js/playerjs-0.0.12.js")
|
||||||
script(src="/js/player.js")
|
script(src="/js/player.js")
|
||||||
|
|
1604
www/css/video-js.css
1604
www/css/video-js.css
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
||||||
.vjs-resolution-button .vjs-menu-icon:before {
|
.vjs-resolution-button .vjs-icon-placeholder:before {
|
||||||
content: '\f110';
|
content: '\f110';
|
||||||
font-family: VideoJS;
|
font-family: VideoJS;
|
||||||
font-weight: normal;
|
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
49776
www/js/vjs/video.js
49776
www/js/vjs/video.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
||||||
/*! videojs-resolution-switcher - 2015-7-26
|
/*! videojs-resolution-switcher - 2022-02-07
|
||||||
* Copyright (c) 2016 Kasper Moskwiak
|
* Copyright (c) 2016 Kasper Moskwiak
|
||||||
* Modified by Pierre Kraft and Derk-Jan Hartman
|
* Modified by Pierre Kraft and Derk-Jan Hartman
|
||||||
|
* Modified by Nisaba
|
||||||
* Licensed under the Apache-2.0 license. */
|
* Licensed under the Apache-2.0 license. */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
@ -58,11 +59,11 @@
|
||||||
this.controlText('Quality');
|
this.controlText('Quality');
|
||||||
|
|
||||||
if(options.dynamicLabel){
|
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);
|
this.el().appendChild(this.label);
|
||||||
}else{
|
}else{
|
||||||
var staticLabel = document.createElement('span');
|
var staticLabel = document.createElement('span');
|
||||||
videojs.addClass(staticLabel, 'vjs-menu-icon');
|
videojs.dom.addClass(staticLabel, 'vjs-menu-icon');
|
||||||
this.el().appendChild(staticLabel);
|
this.el().appendChild(staticLabel);
|
||||||
}
|
}
|
||||||
player.on('updateSources', videojs.bind( this, this.update ) );
|
player.on('updateSources', videojs.bind( this, this.update ) );
|
||||||
|
@ -167,9 +168,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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.
|
// If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle
|
||||||
// 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)
|
|
||||||
var handleSeekEvent = 'loadeddata';
|
var handleSeekEvent = 'loadeddata';
|
||||||
if(this.player_.techName_ !== 'Youtube' && this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') {
|
if(this.player_.techName_ !== 'Youtube' && this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') {
|
||||||
handleSeekEvent = 'timeupdate';
|
handleSeekEvent = 'timeupdate';
|
||||||
|
@ -178,10 +177,8 @@
|
||||||
.setSourcesSanitized(sources, label, customSourcePicker || settings.customSourcePicker)
|
.setSourcesSanitized(sources, label, customSourcePicker || settings.customSourcePicker)
|
||||||
.one(handleSeekEvent, function() {
|
.one(handleSeekEvent, function() {
|
||||||
player.currentTime(currentTime);
|
player.currentTime(currentTime);
|
||||||
player.handleTechSeeked_();
|
if (!isPaused && player.paused()) {
|
||||||
if(!isPaused){
|
player.play()
|
||||||
// Start playing and hide loadingSpinner (flash issue ?)
|
|
||||||
player.play().handleTechSeeked_();
|
|
||||||
}
|
}
|
||||||
player.trigger('resolutionchange');
|
player.trigger('resolutionchange');
|
||||||
});
|
});
|
||||||
|
@ -348,7 +345,7 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(player.options_.sources.length > 1){
|
if(player.options_.sources.length > 1){
|
||||||
// tech: Html5 and Flash
|
// tech: Html5
|
||||||
// Create resolution switcher for videos form <source> tag inside <video>
|
// Create resolution switcher for videos form <source> tag inside <video>
|
||||||
player.updateSrc(player.options_.sources);
|
player.updateSrc(player.options_.sources);
|
||||||
}
|
}
|
||||||
|
@ -362,6 +359,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
// register the plugin
|
// register the plugin
|
||||||
videojs.plugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher);
|
videojs.registerPlugin('videoJsResolutionSwitcher', videoJsResolutionSwitcher);
|
||||||
})(window, videojs);
|
})(window, videojs);
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue