format detection no longer jquery plugin

This commit is contained in:
j 2011-08-19 20:55:06 +02:00
parent becb3f7781
commit 38a303b0cf
4 changed files with 0 additions and 51 deletions

View file

@ -6,9 +6,6 @@
<link rel="shortcut icon" type="image/png" href="/static/png/icon16.png"/> <link rel="shortcut icon" type="image/png" href="/static/png/icon16.png"/>
<link rel="stylesheet" type="text/css" href="/static/css/highlight.css"/> <link rel="stylesheet" type="text/css" href="/static/css/highlight.css"/>
<script type="text/javascript" src="/static/oxjs/build/jquery/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.tmpl.min.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
<script type="text/javascript" src="/static/oxjs/build/Ox.js"></script> <script type="text/javascript" src="/static/oxjs/build/Ox.js"></script>
<script type="text/javascript" src="/static/js/highlight.pack.js"></script> <script type="text/javascript" src="/static/js/highlight.pack.js"></script>
<script type="text/javascript" src="/static/js/pandora.api.js"></script> <script type="text/javascript" src="/static/js/pandora.api.js"></script>

View file

@ -10,9 +10,6 @@ if(typeof(console)=='undefined') {
console.log = function() {}; console.log = function() {};
} }
</script> </script>
<script type="text/javascript" src="/static/oxjs/build/jquery/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.tmpl.min.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
<script type="text/javascript" src="/static/oxjs/build/Ox.js"></script> <script type="text/javascript" src="/static/oxjs/build/Ox.js"></script>
<script type="text/javascript" src="/static/js/pandora.embed.js"></script> <script type="text/javascript" src="/static/js/pandora.embed.js"></script>
</head> </head>

View file

@ -11,9 +11,6 @@
}; };
} }
</script> </script>
<script type="text/javascript" src="/static/oxjs/build/jquery/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.tmpl.min.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
<script type="text/javascript" src="/static/oxjs/build/Ox.js"></script> <script type="text/javascript" src="/static/oxjs/build/Ox.js"></script>
<script type="text/javascript" src="/static/js/pandora.js"></script> <script type="text/javascript" src="/static/js/pandora.js"></script>
<!-- <!--

View file

@ -1,42 +0,0 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
jQuery.support.video = function() {
jQuery.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());
var video = {};
var v = document.createElement('video');
if (v) {
video.support = true;
//get supported types
video.webm = !!(v.canPlayType && v.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/no/, ''));
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/, ''));
//Disable WebM on Safari/Perian, seeking does not work
if(!jQuery.browser.chrome &&
video.webm &&
/safari/.test(navigator.userAgent.toLowerCase()) &&
!/linux/.test(navigator.userAgent.toLowerCase())) {
video.webm = false;
}
//use webm if possible
if(jQuery.browser.chrome && video.webm) {
video.h264 = false;
}
//aliases
video.mp4 = video.h264;
video.ogv = video.ogg;
} else {
video.support = false;
}
video.supportedFormat = function(formats) {
var format;
formats.forEach(function(f) {
if(!format && video[f]) {
format = f;
}
});
return format;
};
return video;
}();