Skip to content

Instantly share code, notes, and snippets.

@rymai
Created April 14, 2011 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rymai/919105 to your computer and use it in GitHub Desktop.
Save rymai/919105 to your computer and use it in GitHub Desktop.
SublimeVideo: Loop (snippet)
<!-- Inside the <head> tag -->
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script>
<!-- Inside the <body> tag -->
<video class="sublime" poster="posterframe.jpg" width="640" height="360" preload="none">
<source src="video.mp4" />
<source src="video.ogv" />
</video>
<!-- Just before </body> (or in the <head> tag) -->
<script type="text/javascript">
sublimevideo.ready(function(){
sublimevideo.onEnd(function(sv){
sublimevideo.play(sv.element);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment