Merge pull request #3162 from 138138138/138138138-audio-quality-1

This commit is contained in:
Samantaz Fox 2022-07-11 17:36:28 +02:00
commit cd6c73e487
No known key found for this signature in database
GPG key ID: F42821059186176E
4 changed files with 38 additions and 16 deletions

View file

@ -17,6 +17,7 @@ var options = {
'remainingTimeDisplay',
'Spacer',
'captionsButton',
'audioTrackButton',
'qualitySelector',
'playbackRateMenuButton',
'fullscreenToggle'
@ -149,7 +150,8 @@ if (isMobile()) {
var buttons = ['playToggle', 'volumePanel', 'captionsButton'];
if (video_data.params.quality !== 'dash') buttons.push('qualitySelector');
if (!video_data.params.listen && video_data.params.quality === 'dash') buttons.push('audioTrackButton');
if (video_data.params.listen || video_data.params.quality !== 'dash') buttons.push('qualitySelector');
// Create new control bar object for operation buttons
const ControlBar = videojs.getComponent('controlBar');
@ -176,7 +178,7 @@ if (isMobile()) {
var share_element = document.getElementsByClassName('vjs-share-control')[0];
operations_bar_element.append(share_element);
if (video_data.params.quality === 'dash') {
if (!video_data.params.listen && video_data.params.quality === 'dash') {
var http_source_selector = document.getElementsByClassName('vjs-http-source-selector vjs-menu-button')[0];
operations_bar_element.append(http_source_selector);
}