1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-31 11:26:45 +02:00
video.js/test/dev-compiled.html
2013-01-10 13:06:12 -08:00

91 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Video Player</title>
<link rel="stylesheet" href="../design/video-js.css" type="text/css">
<link rel="stylesheet" href="../test/vendor/qunit/qunit/qunit.css" />
<script src="../test/vendor/qunit/qunit/qunit.js"></script>
<!--[if IE]>
<script src="https://getfirebug.com/releases/lite/1.3/firebug-lite.js"></script>
<!--<![endif]-->
<script src='video.compiled.js'></script>
<script type="text/javascript" charset="utf-8">
// Easy access to test Flash over HTML5. Add ?flash to URL
if (window.location.href.indexOf("?flash") !== -1) {
videojs.options.techOrder = ["Flash"];
videojs.options.flash.swf = "../tech/flash/video-js.swf";
}
</script>
</head>
<body>
<video id="vid1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup='{}'>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4'>
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm'>
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg'>
<track kind=captions src="http://videojs.com/video-js/captions.vtt" srclang="en" label="English" />
<p>Video Playback Not Supported</p>
</video>
<script>
vid = document.getElementById("vid1");
var player = videojs('vid1');
function roughSizeOfObject( object ) {
var objectList = [];
var recurse = function( value )
{
var bytes = 0;
if ( typeof value === 'boolean' ) {
bytes = 4;
}
else if ( typeof value === 'string' ) {
bytes = value.length * 2;
}
else if ( typeof value === 'number' ) {
bytes = 8;
}
else if
(
typeof value === 'object'
&& objectList.indexOf( value ) === -1
)
{
objectList[ objectList.length ] = value;
for( i in value ) {
bytes+= 8; // an assumed existence overhead
bytes+= recurse( value[i] )
}
}
return bytes;
}
return recurse( object );
}
function cacheSize(){
for (i in videojs.cache[6].handlers) {
console.log(i, roughSizeOfObject(videojs.cache[6].handlers[i]))
}
}
</script>
</body>
</html>