How to embed a video from a Google drive into a web page?

I am trying to upload a video on a webpage and for the YouTube embed code. However, when I replace the src in the code with a link to the Google Drive video (with the inclusion turned on), nothing appears. I mean, there is no mistake but its space. Why is nothing happening here? How can I get this Google video to upload to my webpage? I do not want to manually paste the url in chrome.

IT'S NOTHING:

<html> <head> </head> <body> <iframe width="100%" height="100%" src="https://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/view?usp=sharing"></iframe> </body> </html> 

The YouTube version works fine:

 <html> <head> </head> <body> <iframe width="100%" height="100%" src="https://www.youtube.com/embed/UTt33udwRw0" frameborder="0" allowfullscreen></iframe> </body> </html> 

How do I get videos from a Google drive to play on my webpage, for example, how does a video play on YouTube? If it cannot be directly embedded - what alternatives can be used to get the video - iframe obviously does not work, there should be some alternatives.

Also, does anyone know how to make this auto-play?

thanks

+5
source share
1 answer

You need to use the Google Drive Embed option. This is the URL you are looking for: https://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/preview

 <html> <head> </head> <body> <iframe width="100%" height="100%" src="https://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/preview"></iframe> </body> </html> 

You can do this automatically by adding ?autoplay=1 to the URL so that there is now https://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/preview?autoplay=1 .

+7
source

Source: https://habr.com/ru/post/1260766/


All Articles