Skip to content

Instantly share code, notes, and snippets.

@rads
Created February 19, 2010 19:20
Show Gist options
  • Save rads/309066 to your computer and use it in GitHub Desktop.
Save rads/309066 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Video Playback Rate</title>
<script type="text/javascript">
function changeRate(speed) {
document.getElementById("my_video").playbackRate = speed;
}
</script>
</head>
<body>
<video id="my_video" src="http://tuxstream.media.hslc.wisc.edu/public/Rakel.mov" type="video/mp4" autobuffer controls playbackRate=".5"></video><br>
<form action="#">
<label for="my_video_rate">Playback Rate:</label>
<input id="my_video_rate" type="text" value="1">
<input type="submit" value="Change" onclick="changeRate(document.getElementById('my_video_rate').value); return false">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment