1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00

Removed compare code out of project.

This commit is contained in:
Steve Heffernan 2012-01-16 16:26:22 -08:00
parent fb446cd059
commit 7106c005ed
3 changed files with 0 additions and 153 deletions

View File

@ -1,7 +0,0 @@
body { background-color: #ccc; font-size: 11px; font-family: 'Helvetica Neue', helvetica, arial; }
#main { width: 1000px; margin: 10px auto 0; }
td, th { text-align: left; vertical-align: top; }
td.info-col { width: 240px; }
td.data { text-align: right; }
span.na { color: red; }
span.undefined { color: #999; }

View File

@ -1,76 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Video Player</title>
<link rel="stylesheet" href="../design/video-js.css" type="text/css">
<!--[if lt IE 9]>
<script>
document.createElement("video"); // HTML5 Shiv. Must be in <head>.
</script>
<![endif]-->
<!--[if IE]>
<script src="https://getfirebug.com/firebug-lite.js" type="text/javascript" charset="utf-8"></script>
<![endif]-->
<script src="../src/core.js"></script>
<script src="../src/lib.js"></script>
<script src="../src/ecma.js"></script>
<script src="../src/json.js"></script>
<script src="../src/component.js"></script>
<script src="../src/player.js"></script>
<script src="../src/tech.js"></script>
<script src="../src/controls.js"></script>
<script src="../src/events.js"></script>
<script src="../src/tracks.js"></script>
<script src="../flash/swfobject.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<link rel="stylesheet" href="compare.css" type="text/css">
<script type="text/javascript" src="compare.js"></script>
</head>
<body>
<div id="main">
<table border="0" cellspacing="5" cellpadding="5">
<tr><th colspan="2">HTML5</th><th colspan="2">Flash</th></tr>
<tr>
<td colspan="2">
<video id="vid1" class="video-js vjs-default-skin" controls preload="auto" width="480" height="198"
poster="http://video-js.zencoder.com/oceans-clip.png">
<source src="http://s3.amazonaws.com/iNGRID.Library.Videos/Creating_Stored_Procedures.mp4" type='video/mp4'>
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm'>
</video>
</td>
<td colspan="2">
<video id="vid2" class="video-js vjs-default-skin" controls preload="auto" width="480" height="198"
poster="http://video-js.zencoder.com/oceans-clip.png">
<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'> -->
</video>
</td>
</tr>
<tr>
<td class="info-col">
<table id="html5_props" border="0" cellspacing="0" cellpadding="0"></table>
</td>
<td class="info-col">
<div id="html5_events"></div>
</td>
<td class="info-col">
<table id="flash_props" border="0" cellspacing="0" cellpadding="0"></table>
</td>
<td class="info-col">
<div id="flash_events"></div>
</td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,70 +0,0 @@
_V_.options.flash.swf = "../flash/video-js.swf";
_V_.options.flash.swf = "http://andylemay.com/dev/videojs/VideoJS.swf";
$(function(){
var tech, i, tname, player,
techList = ["html5","flash"],
props = "error,currentSrc,networkState,buffered,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoWidth,videoHeight,textTracks,preload,currentTime,defaultPlaybackRate,playbackRate,autoplay,loop,controls,volume,muted,defaultMuted,poster".split(","),
methods = "play,pause,src,load,canPlayType,addTextTrack",
notUsed = "mediaGroup,controller,videoTracks,audioTracks,defaultPlaybackRate";
for (i=0; i < techList.length; i++) {
tech = techList[i];
tname = tech.toLowerCase();
player = _V_("vid"+(i+1), { "techOrder":[tech] });
_V_.each(_V_.html5.events, function(evt){
player.addEvent(evt, _V_.proxy(tname, function(evt){
var eventsId = "#"+this+"_events",
type = evt.type,
prev = $(eventsId+" div").first();
if (prev && prev.html() && prev.html().indexOf(type + " ") === 0) {
var countSpan = prev.children(".count");
countSpan.html(parseInt(countSpan.html() || 1) + 1);
} else {
$("#"+this+"_events").prepend("<div>" + evt.type + " <span class='count'></span></div>");
}
}));
});
var propTable = $("#"+tname+"_props");
_V_.each(props, function(prop){
propTable.append("<tr><th>"+prop+"</th><td id='"+tname+prop+"' class='data'></td></tr>")
});
setInterval(_V_.proxy(player, function(){
_V_.each(props, _V_.proxy(this, function(prop){
var result = ""
try {
result = this[prop]();
if (result === false) result = "false";
if (result === true) result = "true";
if (result === "") result = "''";
if (result === null) result = "<span class='undefined'>null</span>";
if (result === undefined) result = "<span class='undefined'>undefined</span>";
if (typeof result.start == "function") {
var newResult = "", i;
if (result.length > 0) {
for (i=0;i<result.length;i++) {
newResult += "l:"+result.length+" s:"+result.start(i)+" e:"+result.end(i);
}
} else {
newResult = "-";
}
result = newResult;
// result = result.toString();
// result = (result.length > 0) ? "s:"+result.start(0)+" e:"+result.end(0) : "-";
}
} catch(e) {
result = "<span class='na'>N/A</span>";
}
$("#"+this.techName+prop).html(result);
}));
}), 500);
};
});