<html>
<head>
<title>spring sensors</title>
<script src="springstreams.js"></script>
</head>
<body onunload="unload();">
<script type="text/javascript">
var sensors = new SpringStreams("test");
var adapter = {
"getMeta" : function() {
return {
"pl" :"own player",
"plv" :"version1",
"sx" : screen.width,
"sy" : screen.height
}
},
"getDuration" : function() {
return 1000;
},
"getPosition" : function() {
return new Date().getTime() / 1000;
}
};
var desc = {
"stream": "videos/teststream"
}
sensors.track("someid", desc, adapter);
// uncomment for debugging
// sensors.debug = function(v) {
// window.status = v;
// }
function unload() {
sensors.unload();
// give time for submission
var start= new Date(); var now = null; do now = new Date();
while(now-start < 100);
}
</script>
</body>
|