diff --git a/static/js/jquery/jquery.videosupport.js b/static/js/jquery/jquery.videosupport.js index 0690f60..6320db3 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; }();