diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 8fff6fb249..4042514cd9 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1317,7 +1317,7 @@ if (stream.ChannelLayout) { attributes.push(createAttribute(Globalize.translate('MediaInfoLayout'), stream.ChannelLayout)); } - else if (stream.Channels) { + if (stream.Channels) { attributes.push(createAttribute(Globalize.translate('MediaInfoChannels'), stream.Channels + ' ch')); } diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 6b1851e956..b6b98a622b 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -208,12 +208,19 @@ profile.ContainerProfiles = []; var audioConditions = []; + var videoAudioAacConditions = []; + var videoAudioMp3Conditions = []; + if ($.browser.msie) { - audioConditions.push({ + var channelCondition = { Condition: 'LessThanEqual', Property: 'AudioChannels', Value: '2' - }); + }; + + audioConditions.push(channelCondition); + videoAudioAacConditions.push(channelCondition); + videoAudioMp3Conditions.push(channelCondition); } profile.CodecProfiles = []; @@ -222,21 +229,36 @@ Conditions: audioConditions }); + if (videoAudioMp3Conditions.length) { + profile.CodecProfiles.push({ + Type: 'VideoAudio', + Codec: 'mp3', + Conditions: videoAudioMp3Conditions + }); + } + + videoAudioAacConditions.push({ + Condition: 'NotEquals', + Property: 'AudioProfile', + Value: 'LC' + }); + + videoAudioAacConditions.push({ + Condition: 'NotEquals', + Property: 'AudioProfile', + Value: 'HE-AAC' + }); + profile.CodecProfiles.push({ Type: 'VideoAudio', - Conditions: audioConditions + Codec: 'aac', + Conditions: videoAudioAacConditions }); profile.CodecProfiles.push({ Type: 'Video', Codec: 'h264', Conditions: [ - { - Condition: 'Equals', - Property: 'IsCabac', - Value: 'true', - IsRequired: false - }, { Condition: 'NotEquals', Property: 'IsAnamorphic',