Created
June 13, 2013 12:16
-
-
Save Plou/5773228 to your computer and use it in GitHub Desktop.
Html video tag & javascript to access it.
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
<video id="player" preload="auto" controls autoplay poster="img/thumb.jpg"> | |
<source src="http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.mp4" type="video/mp4" /> | |
<source src="http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.webm" type="video/webm" /> | |
<source src="http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.theora.ogv" type="video/ogg" /> | |
Alternate content | |
</video> |
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
var $video = $('#player'), | |
video = $video.get(0), | |
currentTime = video.currentTime; | |
$video.bind("timeupdate", function() { | |
currentTime = Math.round(this.currentTime-0.5); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment