update deps + fix videojs-contrib-quality-menu quality selection

This commit is contained in:
Emilien Devos 2024-04-28 17:46:20 +02:00
parent e975c8a344
commit 44df12fdfe
4 changed files with 12 additions and 14 deletions

View File

@ -1 +1 @@
.vjs-quality-selector .vjs-menu-button{margin:0;padding:0;height:100%;width:100%}.vjs-quality-selector .vjs-icon-placeholder{font-family:'VideoJS';font-weight:normal;font-style:normal}.vjs-quality-selector .vjs-icon-placeholder:before{content:'\f110'}.vjs-quality-changing .vjs-big-play-button{display:none}.vjs-quality-changing .vjs-control-bar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;visibility:visible;opacity:1}
.vjs-quality-selector .vjs-menu-button{margin:0;padding:0;height:100%;width:100%}.vjs-quality-selector .vjs-icon-placeholder{font-family:"VideoJS";font-weight:normal;font-style:normal}.video-js:not(.vjs-v8) .vjs-quality-selector .vjs-icon-placeholder::before{content:""}.vjs-v8 .vjs-quality-selector .vjs-icon-placeholder::before{content:""}.vjs-quality-changing .vjs-big-play-button{display:none}.vjs-quality-changing .vjs-control-bar{display:flex;visibility:visible;opacity:1}

View File

@ -43,7 +43,7 @@ embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
var save_player_pos_key = 'save_player_pos';
videojs.Vhs.xhr.beforeRequest = function(options) {
videojs.Vhs.xhr.onRequest = function(options) {
// set local if requested not videoplayback
if (!options.uri.includes('videoplayback')) {
if (!options.uri.includes('local=true'))
@ -398,7 +398,6 @@ if (video_data.params.autoplay) {
}
if (!video_data.params.listen && video_data.params.quality === 'dash') {
var qualityMenuOptions = {}
if (video_data.params.quality_dash !== 'auto') {
player.ready(function () {
@ -421,13 +420,12 @@ if (!video_data.params.listen && video_data.params.quality === 'dash') {
break;
}
}
qualityMenuOptions.defaultResolution = (qualityLevels[targetQualityLevel].height + "p");
player.qualityMenu({
defaultResolution: qualityLevels[targetQualityLevel].height
});
});
});
}
console.log(qualityMenuOptions)
player.qualityMenu(qualityMenuOptions);
}
player.vttThumbnails({

File diff suppressed because one or more lines are too long

View File

@ -1,15 +1,15 @@
# find the checksum of latest version using npm view package
# find the checksum of latest version using npm view <package>
video.js:
version: 8.10.0
shasum: 603a49909ef33f839264da8b73513f9daf592b57
videojs-contrib-quality-levels:
version: 4.0.0
shasum: faa8096594cdbfc3ccbefe8572fc20531ba23f3d
version: 4.1.0
shasum: 44c2d2167114a5c8418548b10a25cb409d6cba51
videojs-contrib-quality-menu:
version: 1.0.0
shasum: f5e8f855358e20854de23d7607634b5aabf4e9ac
version: 1.0.1
shasum: 991f641afabf1b346088f290efcf689688e42368
videojs-markers:
version: 1.0.1