How to embed videos from Google drive to webpage?
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 make it autoplay by appending ?autoplay=1
to the URL so it is now https://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/preview?autoplay=1
.
Dr Confuse
Updated on July 17, 2022Comments
-
Dr Confuse almost 2 years
I'm trying to load a video on a web page and for YouTube embed code it works. However, when I replace the src in the code with a Google Drive Link of a video (with sharing turned on), nothing comes up. I mean, there is no error but its blank. Why does nothing come up here? How can I get this Google drive video to also to load on my webpage? I dont want to have to paste the url manually in chrome.
THIS DOES 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 perfectly:
<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 the video from Google drive to play on my web page like how the YouTube video plays? If it cant be directly embedded - what alternatives can be used to get the video to appear - iframe is clearly not working, there must be some alternatives.
Also, anyone know how to make it autoplay?
Thanks
-
Dr Confuse over 7 yearsHey frog, that worked. Where did you find this, I couldn't find the embed option in my G Drive anywhere. Thanks man.
-
robere2 over 7 yearsIn the top right, click on the little 3 vertical dots and then click "Embed item..."
-
robere2 over 7 yearsAlso, you can make it autoplay by appending
?autoplay=1
to the url so it is nowhttps://drive.google.com/file/d/1pdvh_mEnkXPKA3jivYIpYKTaoukxH5p3Yg/preview?autoplay=1
. Editing this into my main post, didn't see you ask how to do that the first time. -
Dr Confuse over 7 yearsYeah I got the autoplay thing but the embed option is really weird. Not able to find it at all.
-
Dr Confuse over 7 yearsCan you share a screenshot or something?
-
Dr Confuse over 7 yearsI was checking it directly from drive. Need to open the video in new tab or use the sharing link in another tab and check the menu there. Got it. Thanks for being awesome Bugfroggy!!
-
Tahir Yasin about 7 yearsEmbed code is not working in FireFox 52.0.2 (32-bit) . Any solution?
-
Harry almost 6 yearsI just wanted to add - under the three dots - you need to click on "open new tab" and then you will see an additional three dots and one of the items is "Embed item" this is where you will find the link you can embed!
-
Earlee about 5 yearsautoplay gets stuck in forever loading
-
B''H Bi'ezras -- Boruch Hashem about 5 yearsHi do you know how to do this using a link like youtube.googleapis.com/embed/…
-
pinkp over 4 yearsAre there any other parameters you can add? Change control colours or add a thumbnail to the start before play?
-
Maahi Bhat over 2 yearsthis is not working, I am providing my working solution below