Skip to content

Instantly share code, notes, and snippets.

@rymai
Created April 14, 2011 16:54
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/919915 to your computer and use it in GitHub Desktop.
Save rymai/919915 to your computer and use it in GitHub Desktop.
SublimeVideo: Autoplay (snippet)
<!-- Inside the <head> tag -->
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script>
<!-- Inside the <body> tag -->
<video id="video1" 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.prepareAndPlay("video1");
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment