skip to Main Content

In this youtube video is automatically play when tap on button. I need one more feature it should play in landscape (full screen)mode tapped in mobile like

How to do it for youtube videos?
How to embed video in my website so that I can open up modal and autoplay in full screen in both mobile and computer.

2

Answers


  1. Is that what you’re looking for?

     <iframe src="https://www.youtube.com/embed/NFWSFbqL0A0?autoplay=1" width="560" height="315" style="border:none;overflow:hidden" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
    

    The ?autoplay=1 query will ensure the video gets automatically played.

    Replace the iframe in the second CodePen (the one with the Facebook video) with the code above.

    Login or Signup to reply.
  2. I used this In one of my project made in Django, where I had to show video via youtube link.

     <video controls style="width: 98.5%; height: 500px; padding-bottom:235px;" id="uploaded-video" draggable="true" small_video allow="autoplay" allowFullScreen>
                <source src="{{ listing_video.videofile.url }}" type="video/mp4">
              </video>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search