only disable real safari

This commit is contained in:
j 2011-03-04 17:10:14 +01:00
parent b93e09ea47
commit 0f6a2bd94e

View file

@ -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;
}();