Google Drive video link does not embed video

Just encountered this on one of my sites. Confirmed the issue on When the following link is added to a post, instead of displaying a video player, it causes a file download!.


The opengraph tags for that link look like this:

<meta property="og:video" content=";ps=docs&amp;partnerid=30&amp;cc_load_policy=1">
<meta property="og:video:type" content="application/x-shockwave-flash">

So google is supplying an flash format video :rolling_eyes:

The current “generic onebox” behavior is to assume it’s an html embed, unless it’s an MP4 embed:

Personally I don’t think Onebox should add logic for flash embeds, they’re not gonna be around much longer anyway. Probably worth just adding a check for video:type=flash, and not oneboxing things that try to use flash.
If that’s the correct course of action I can make a PR?

Is this still an issue?

Just tested on try: It doesn’t appear to cause a download anymore, but the video player produced doesn’t work.


Any suggested fix for this issue?

Use something other than Google drive to host videos, since it isn’t designed as a video hosting service? Try that to start with.


Thanks, not a crisis. Just something a user posting ran into so was trying to figure it out and also report it here. Appreciate the response.

Regardless you should be able to link to the video and someone could click through to view it. That seems like a perfectly fine workaround.

I must have missed something. What workaround are you referring to? In the current state is a user posts a link with a video on google drive it show up like the screenshot above and one can’t click the play button.

Are you saying that’s a workaround to make it play and clickable?

To prevent oneboxing, simply type any character in front of, or after, the link. Then you have a plain link that can be clicked in the browser like any other link.

like so like so <-- spaces in front also work

One workaround is to whitelist on Discourse settings:

Then embed video player iframe:

Then just paste it inside the topic in a new paragraph:

Take a look at this video explanation:

<iframe src="[hash]/preview" width="640" height="360" frameborder="0"></iframe>

Is this fixed?


Looks like…nope! Just ran into this same issue.

Per this post an embed does work if a) I whitelist the source domain AND b) I paste in the complete iframe HTML rather than the raw Google Drive URL.

However I think the main issue here is that as user wouldn’t necessarily think to grab the embed code rather than just copying and pasting the URL the same way you would a YouTube link.

(Yes I realize that Google Drive is a very different service than YouTube…but when you click play on a video in Google Drive, the video plays in what looks exactly like the YouTube player, so I think understandable that an average user might assume they’d work similarly!)

Also an issue that, as mentioned here, the video appears to display in the preview (actual thumbnail shows at least), but upon posting just shows the tiny blank non-functional preview. For example:

If it’s not possible to get these embeds to work (with onebox as opposed to iframe workaround), I’d suggest it might be worth adding an exception to just not onebox them at all.

Regardless of technical cause, this weird looks-like-an-embedded-player-but-actually-non-functional-little-box-that-isn’t-even-clickable I think is worse than just defaulting to a totally un-oneboxed link.


We should fix this @techAPJ – it does not need to be a video player just “not broken” :hammer_and_wrench:


I am working on a new onebox engine to onebox Google Drive files. Right now here is how we see Google Drive links in preview:

The video preview doesn’t work once the post is created and the pdf and zip files doesn’t get oneboxed at all.

Here is how it will look after having google drive onebox engine in action:


Okay, this is now done. Demos:

Video file:

Zip file:

Documents (text/pdf file):