diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 64022fe71b..a554a616c7 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -166,11 +166,11 @@ }); } - ['opus', 'mp3', 'aac'].forEach(function(audioFormat){ + ['opus', 'mp3', 'aac', 'webma'].forEach(function(audioFormat){ if (supportedFormats.indexOf(audioFormat) != -1) { profile.DirectPlayProfiles.push({ - Container: audioFormat, + Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat, Type: 'Audio' }); } @@ -190,10 +190,6 @@ Container: 'webm', Type: 'Video' }); - profile.DirectPlayProfiles.push({ - Container: 'webm,webma', - Type: 'Audio' - }); } profile.TranscodingProfiles = []; @@ -1904,6 +1900,10 @@ list.push('opus'); } + if (document.createElement('audio').canPlayType('audio/webm').replace(/no/, '')) { + list.push('webma'); + } + if (browserInfo.chrome) { list.push('mkv'); }