Skip to content

Instantly share code, notes, and snippets.

@joncode
Created May 5, 2012 19:36
Show Gist options
  • Select an option

  • Save joncode/2604986 to your computer and use it in GitHub Desktop.

Select an option

Save joncode/2604986 to your computer and use it in GitHub Desktop.
HTML5 video attirbutes
control - boolean gives you controls on screen
autoplay - boolean starts playing the vid automatically
preload="none" ="metadata" ="auto"
- tells browser whether or not to preload the video entirely , just metadata or not at all
poster="src of poser frame"
- loads an image into the player as poster frame pre-play
loop - loops video , does not work in firefox - use JS to make looper
<script>
$('#videoShow').bind("ended", function() {
this.play();
});
</script>
width - height - give the player preset width and height for the video - these override actual video dimensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment