From 0f6a2bd94e86b64be18ef7dc7cb233cc8ebd5645 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 4 Mar 2011 17:10:14 +0100 Subject: [PATCH] only disable real safari --- static/js/jquery/jquery.videosupport.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/jquery/jquery.videosupport.js b/static/js/jquery/jquery.videosupport.js index 0690f607..6320db36 100644 --- a/static/js/jquery/jquery.videosupport.js +++ b/static/js/jquery/jquery.videosupport.js @@ -6,8 +6,9 @@ jQuery.support.video = function() { video.support = true; video.webm = !!(v.canPlayType && v.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/no/, '')); //Disable WebM on Safari/Perian, seeking does not work - if(video.webm && jQuery.browser.safari && !jQuery.browser.chrome) + if(video.webm && /safari/.test(navigator.userAgent.toLowerCase()) && ! /linux/.test(navigator.userAgent.toLowerCase())) { video.webm = false; + } video.h264 = !!(v.canPlayType && v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/, '')); video.ogg = !!(v.canPlayType && v.canPlayType('video/ogg; codecs="theora, vorbis"').replace(/no/, '')); video.ogv = video.ogg; @@ -18,11 +19,11 @@ jQuery.support.video = function() { var format; formats.forEach(function(f) { if(!format && video[f]) { - format = f + format = f; } }); return format; - } + }; return video; }();