Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Full screen youtube video autoplay

    General Discussion
    2
    6
    293
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      J199 last edited by J199

      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).
      #fullscreenvideo

      I'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.

      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        Dear @JAW
        can you make the video to start with autoplay without fullscreen?

        Best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • J
          J199 last edited by

          Actually, no. I tried a couple things and that din't work either. Would be great if you have any suggestions.

          1 Reply Last reply Reply Quote 0
          • mariusjopen
            mariusjopen Global Moderator last edited by

            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

            www.mariusjopen.world

            1 Reply Last reply Reply Quote 0
            • J
              J199 last edited by J199

              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

              1 Reply Last reply Reply Quote 0
              • mariusjopen
                mariusjopen Global Moderator last edited by

                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

                www.mariusjopen.world

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Before you post

                Use the Search Feature. Maybe there is already a solution to your issue.

                1. Update Lay Theme and all Lay Theme Addons
                2. Disable all Plugins
                3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                4. Now see if your problem solved itself
                5. Go here, see if your problem is listed here:
                Troubleshooting

                When you post:
                1. Post a link to where the problem is
                2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                Thanks!

                Online Users

                Recent Topics

                • N

                  website blank.

                • S

                  Theme crashed - because of Polylang?

                • S

                  New fade-in / opacity bug?

                • A

                  Unable to update lay theme / to login wp admin

                laytheme.com