From 4f1de0b02737d2d51573a0b737b8f480b484f92d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 30 Sep 2013 14:49:30 -0400 Subject: [PATCH] use mp4 with firefox --- dashboard-ui/scripts/mediaplayer.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index a38efb8dc6..2a8e411538 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -498,7 +498,7 @@ } // Webm must be ahead of mp4 due to the issue of mp4 playing too fast in chrome - var prioritizeWebmOverH264 = true; + var prioritizeWebmOverH264 = $.browser.chrome || $.browser.msie; var h264Codec = 'h264'; var h264AudioCodec = 'aac'; @@ -507,8 +507,13 @@ var videoCodec = (videoStream.Codec || '').toLowerCase(); - if (videoCodec.indexOf('h264') != -1) { - // h264Codec = 'copy'; + if (videoCodec.indexOf('h264') != -1 && + videoStream.Width && + videoStream.Width <= 1280 && + videoStream.BitRate && + videoStream.BitRate <= 2000000) { + + //h264Codec = 'copy'; } } @@ -561,7 +566,6 @@ html += ''; html += ''; } else { - html += ''; html += ''; }