diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index a243f96dcb..1754cae3aa 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -129,6 +129,7 @@ var canPlayAc3 = supportedFormats.indexOf('ac3') != -1; var canPlayAac = supportedFormats.indexOf('aac') != -1; var canPlayMp3 = supportedFormats.indexOf('mp3') != -1; + var canPlayMkv = supportedFormats.indexOf('mkv') != -1; var profile = {}; @@ -147,7 +148,7 @@ }); } - if (browserInfo.chrome) { + if (canPlayMkv) { profile.DirectPlayProfiles.push({ Container: 'mkv,mov', Type: 'Video', @@ -201,13 +202,15 @@ profile.TranscodingProfiles = []; - //profile.TranscodingProfiles.push({ - // Container: 'mkv', - // Type: 'Video', - // AudioCodec: 'aac' + (canPlayAc3 ? ',ac3' : ''), - // VideoCodec: 'h264', - // Context: 'Streaming' - //}); + if (canPlayMkv) { + profile.TranscodingProfiles.push({ + Container: 'mkv', + Type: 'Video', + AudioCodec: 'aac' + (canPlayAc3 ? ',ac3' : ''), + VideoCodec: 'h264', + Context: 'Streaming' + }); + } if (self.canPlayHls()) { profile.TranscodingProfiles.push({ @@ -480,12 +483,6 @@ profile.ResponseProfiles = []; - //profile.ResponseProfiles.push({ - // Type: 'Video', - // Container: 'mkv', - // MimeType: 'video/mp4' - //}); - profile.ResponseProfiles.push({ Type: 'Video', Container: 'm4v', @@ -968,7 +965,9 @@ } else { // Reports of stuttering with h264 stream copy in IE - mediaUrl += '&EnableAutoStreamCopy=false'; + if (mediaUrl.indexOf('.mkv') == -1) { + mediaUrl += '&EnableAutoStreamCopy=false'; + } startTimeTicksOffset = startPosition || 0; contentType = 'video/' + mediaSource.TranscodingContainer; @@ -1878,6 +1877,10 @@ list.push('mp3'); } + if (browserInfo.chrome) { + list.push('mkv'); + } + supportedFormats = list; return list; }