Created
November 8, 2013 18:43
-
-
Save anonymous/7375573 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.onload = function () { | |
var v = document.getElementById("myVideo"); | |
var p = document.getElementById("pbr"); | |
var cp = document.getElementById("currentPbr"); | |
p.addEventListener('input',function(){ | |
cp.innerHTML = p.value; | |
v.playbackRate = p.value; | |
},false); | |
}; | |
</script> | |
</head> | |
<body> | |
<div style="width:640px; height:360; margin: 0 auto; margin-bottom:14em"> | |
<video id="myVideo" controls> | |
<source src="http://hyperaud.io/video/obama-responds.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> | |
<source src="http://hyperaud.io/video/obama-responds.webm" type='video/webm; codecs="vp8, vorbis"' /> | |
</video> | |
<form> | |
<p></p> | |
<input id="pbr" type="range" value="1" min="0.1" max="10" step="0.1" style="width:100%"> | |
<p>Playback Rate <span id="currentPbr">1</span></p> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment