Following Chrome & Firefox\'s recent update autoplay videos are no longer supported - I\'ve tried to add some code to play this on startup but it doesn\'t seem to work?<
allow="autoplay;"
to your iframe like this
video
tag, I noticed that video has to be mute to autoplay. Video with sound didn't want to play. Here's how to embed html5 videos https://www.w3schools.com/html/html5_video.asp. If using this method, you can download Miro Video Converter http://www.mirovideoconverter.com/ Use it to encode your video. It does an AMAZING job at downsizing videos!?autoplay=1
, and in vimeo also autopause=0
to the url like this: https://player.vimeo.com/video/{video_id}?autoplay=1&loop=1&autopause=0
,function onPlayerReady(event) {
event.target.playVideo();
}
https://www.youtube.com/embed/{video_id}
Recommended solution:
https://vimeo.com/manage/{video_id}/embed
and set up your embed video
This one does autoplay and loop.
4. Set your video size using css, f.e. width: 100%
.
5. Now you don't want to have the black frame around the video, so let's resize the iframe, let's make the height proportional to width. In my case the video is 1920x1080px:
My video is playing in loop as page's background. I disabled mouse events like this (in your CSS styles):
#background-video {
pointer-events: none;
}
Let me know if I missed something, I will update these instructions!