Skip to content

Instantly share code, notes, and snippets.

@trevanhetzel
Last active August 29, 2015 14:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevanhetzel/b910af9b458de828fb36 to your computer and use it in GitHub Desktop.
Save trevanhetzel/b910af9b458de828fb36 to your computer and use it in GitHub Desktop.
"Lazyload" videos
<video preload="none" autoplay loop poster="path/to/poster.jpg">
<source src="path/to/video.mp4" type="video/mp4">
<source src="path/to/video.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
$(window).load(function () {
$('video').load();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment