Embedding Google Drive Videos using HTML5 video
Solution 1
<video>
<source src="https://drive.google.com/uc?export=download&id=videoID" type='video/mp4'>
</video>
Replace "videoID" in the link with your video ID. (to find it - right click on the Google Drive video, get shareable link)
Solution 2
I wrote an answer to a similar question not long ago. It's a pretty straight-forward procedure and works on files of any size. If you have any questions, feel free to ask in the comments.
kpjVideo
Updated on September 22, 2020Comments
-
kpjVideo over 3 years
I am searching for a way to embed Google Drive videos using the HTML5
<video>
tag. The current option isn't exactly adequate for what I'd like to do with the player. The embedded link directly from Google Drive doesn't seem to allow you to remove the button that opens the video in a separate tab nor customize the appearance of the player. Are there any ways to get the actual file from a drive link and embed it into an HTML<video>
tag?I'm aware of such "proxy player" scripts but they appear very sketchy and pricey. The old methods such as getting the download link no longer work nor does the
/get_player
method. Any insight would be much appreciated. -
Mr. Boy almost 5 yearsI see a player but no playable video in your example @pejey. Is it broke or is the video no longer valid?
-
pejey almost 5 yearsI removed the video, sorry. Here is a new example - jsfiddle.net/xav8kufe
-
YTZ almost 5 years-1 Please note that this will only work with small files ( < 100 MB ). 1) Google Drive requires a
confirm
parameter if the file is > 100MB, which you can't know beforehand. 2) You're basically "downloading" the video into the player. The video player can break if user tries to seek further into the video. -
Sayooj over 4 yearsuse this to convert Google drive link to direct downloadable link. It will work fine for files larger than 100MB if you provide your Google
apiKey
. -
Razor over 4 yearsAs @YTZ mentioned, this method will only work for files <= 100MB. See my answer on this below for both Google Drive and Google Photos.
-
Gabriel Fernandez about 2 yearsthis will not work, need access to the video