Full screen youtube video autoplay
-
wrote on Dec 17, 2018, 10:53 AM last edited by J199 Jan 5, 2019, 6:53 AM
Hey Armin. I'm trying to implement a full screen youtube video (with autoplay) as the first thing you see on the website.
The current status is that I have the embed full screen however it's not autoplaying, it's not responsive and doesn't work when I switch on cover mode.
I've set an id for the first row (which is set to full screen width and height).
#fullscreenvideoI've then used the following code
Custom HTML at Top
<div id="fullscreenvideo">
<iframe id="video" src="//www.youtube.com/embed/5iiPC-VGFLU " frameborder="0" allowfullscreen></iframe>
</div>Custom <head> content
<script>
jQuery(function(){
jQuery('#video').css({ width: jQuery(window).innerWidth() + 'px', height: jQuery(window).innerHeight() + 'px' });
jQuery(window).resize(function(){
jQuery('#video').css({ width: $(window).innerWidth() + 'px', height: jQuery(window).innerHeight() + 'px' });
});
});
</script>Would really appreciate your help on this.
-
Dear @JAW
can you make the video to start with autoplay without fullscreen?Best!
Marius
-
wrote on Dec 17, 2018, 3:48 PM last edited by
Actually, no. I tried a couple things and that din't work either. Would be great if you have any suggestions.
-
Dear @JAW
can you make a test page where you have a video without fullscreen and the autoplay activated? Then I can have a look there.Best!
Marius
-
wrote on Dec 23, 2018, 6:31 PM last edited by J199 Dec 23, 2018, 1:31 PM
Hi Marius,
Unfortunately I can't get that to function, however i'd simply like to have the youtube video full screen and responsive in size so that the viewer can click to play.
Thanks
-
Hi @JAW
can you do a page which is not shown in your navigation – then users don't see it.
There you can place a Youtube video and set it on autoplay.Then I can help.
Best!
Marius
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it