Last active
August 29, 2015 14:18
-
-
Save trevanhetzel/b910af9b458de828fb36 to your computer and use it in GitHub Desktop.
"Lazyload" videos
This file contains hidden or 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 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> |
This file contains hidden or 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
$(window).load(function () { | |
$('video').load(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment