Embedding Google Drive videos

Google drive is a handy place to store videos. I find myself having more and more videos saved there since Google added call recording to Google Meet, as the resulting recording gets saved to the organiser's drive. Often those videos need to be shared and embedded elsewhere (internal presentations, etc), but finding the embed code for these videos isn't nearly as simple as with Youtube or Vimeo!

Load the video

Open the video in Google drive, then when it has loaded, click the 3 dots in the top right of the screen. On the panel which appears, click "Open in new window".

Info

Embed item

In the new window which has opened, again click the three dots in the top right, and select "Embed item..."

Embed

Get the code

A modal pops up, which contains the embed code for this video. This code can be pasted wherever the embed needs to be shared.

Embed code

All done?

Not quite! Notice in the previous screenshot the yellow box with Only the owner and explicitly shared collaborators have access. By default, if anyone trying to view the embed doesn't already have access to the underlying video file, the embed won't work.

Google 403 error

This may be desired behaviour in some cases (an internal training video limited to users on the same email domain, for example), but what if we want our video to behave a bit more like Youtube, and be visible by anyone?

If we click the three dots at the top right once more, and select "Share", we have the option to make the file globally-visible.

Share settings

Selecting Anyone with the link then clicking Done means that our embed code should now work for anyone who tries to view it!

Well, almost anyone...

These video embeds are not nearly as reliable as YouTube or Vimeo. If you embed a video, with "anyone with the link"-level access, at the time of writing (Jan 23) it will still only work for some of your users. If your user is logged into a gmail account of any type (gmail.com or Google Apps), it'll work fine. If they're not logged into a gmail account, the video won't play, despite the permission settings appearing to be open to all. This can be quite a pain, as there isn't a good error message shown to users to let them know why this has failed.

Hopefully this is something Google will resolve at some point. Until then, YouTube and Vimeo are still the best bet for videos requiring wide distribution. But if you're looking to embed a Drive-based video for a known audience (or one which you know will all be logged into a gmail account of some description..) then the above guide should do the trick!

Share This Article

Related Articles


Creating favicons from emojis and SVGs

While bundling up a recent side project for launch, I had to generate favicons for the project. A simple side project, the favicon was basically just an emoji. Rather than generating a bunch of png and ico files, could I just use the emoji directly?

Creating Animated Gifs from MP4 and WebM files using ffmpeg

Efficient video encoding has meant that sharing mp4/webm files has become more widespread. However for tools that don't readily support video playback (Google Slides..), it's sometimes still necessary to use gifs. Happily, ffmpeg makes this very easy!

Using Google Sheets as a RESTful JSON API

Save time by not building backends for simple CRUD apps. Use Google Sheets as both a free backend and JSON API endpoint!

Internet connection problems with eircom efibre fixed

Eircom's eFibre product is their fastest home broadband offering, promising speeds of up to 100mb. The connection speeds are generally quite good, being capable of handling TV, Netflix and a handful of other connected devices all at once without any real issue on the speed. However the one black mark against the service would be the intermittent issues with the eircom DNS servers. This can often cause internet connection problems, where the net connection shows as active but nothing loads. Frustrating!

More