diff options
Diffstat (limited to 'stp-playback.html')
-rw-r--r-- | stp-playback.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/stp-playback.html b/stp-playback.html new file mode 100644 index 0000000..00b1eb0 --- /dev/null +++ b/stp-playback.html @@ -0,0 +1,28 @@ +<html> +<!-- vim: set sts=2 sw=2 et : --> +<head> + <script type="text/javascript"> + function video_ready() { + var v = document.getElementById("rt-video"); + var buf = v.buffered; + console.log ("N: " + buf.length + ", Start: " + buf.start(0) + ", End: " + buf.end(0)); + v.currentTime = buf.end(0); + v.play(); + } + + function setup_video() { + var v = document.getElementById("rt-video"); + console.log ("Setup video"); + v.addEventListener("loadeddata", video_ready, true); + v.load(); + } + + window.onload = setup_video; + </script> +</head> +<body> + <video id="rt-video" preload="none"> + <source src="http://localhost:8000/somepath" type="video/webm"/> + </video> +</body> +</html> |