Auto-play and muted YouTube Video Background
I needed a reliable way to use video as a background element, and HTML5 video requires too much up front work. For instance, you have to edit a base mp4, and convert it to atleast 2 other types (WebM and OGG) for proper browser support. Obviously, uploading a video to YouTube makes that so much easier, as they deal with the browser support part of things for us. Using this script makes things so much easier, just replace the Playlist and videoId variables, and you're set, the YouTube API does the rest.
Filed under:design code
Life, lessons & the pursuit of happiness
Hey! I made a floating shelf, and I wanted to share how I did it.Read more
Because it’s important to have another placeholder text generator in your life, and tacos are tasty.Read more