Google Drive video link does not embed video


(Joshua Rosenfeld) #1

Just encountered this on one of my sites. Confirmed the issue on try.discourse.org. When the following link is added to a post, instead of displaying a video player, it causes a file download!.
https://drive.google.com/file/d/0BwkewGYgOeyIVWhRY2pjTi1LQmM/view?usp=sharing


Getyarn link causes .mp4 download
(David Taylor) #2

The opengraph tags for that link look like this:

<meta property="og:video" content="https://video.google.com/get_player?docid=0BwkewGYgOeyIVWhRY2pjTi1LQmM&amp;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?


(Jeff Atwood) #3

Is this still an issue?


(Joshua Rosenfeld) #4

Just tested on try: https://try.discourse.org/t/testing-google-drive-video-links/876. It doesn’t appear to cause a download anymore, but the video player produced doesn’t work.


(RBoy) #5

Any suggested fix for this issue?


(Jeff Atwood) #9

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


(RBoy) #10

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.


(Jeff Atwood) #11

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.


(RBoy) #12

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?


(Jeff Atwood) #13

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 https://example.com

https://example.com like so

 https://example.com <-- spaces in front also work