Skip to content

Commit

Permalink
update deps + fix videojs-contrib-quality-menu quality selection
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Apr 28, 2024
1 parent e975c8a commit ef8c321
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion assets/css/quality-selector.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions assets/js/player.js
Expand Up @@ -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'))
Expand Down Expand Up @@ -421,13 +421,11 @@ if (!video_data.params.listen && video_data.params.quality === 'dash') {
break;
}
}
qualityMenuOptions.defaultResolution = (qualityLevels[targetQualityLevel].height + "p");
qualityMenuOptions.defaultResolution = (qualityLevels[targetQualityLevel].height);
player.qualityMenu(qualityMenuOptions);
});
});
}

console.log(qualityMenuOptions)
player.qualityMenu(qualityMenuOptions);
}

player.vttThumbnails({
Expand Down

0 comments on commit ef8c321

Please sign in to comment.