Streamable videos onebox are broken

(Hosein Naseri) #1

Recently, when I share streamable videos as onebox, They don’t show at all. while the link is ok.

Any idea?

(Felix Freiberger) #2

This doesn’t look like a Discourse bug: Streamable returns a 403, so they refuse to send the video for some reason. I’d guess that this is an issue on their side.

Possibly related:

(Jacob Chapel) #3

Actually looking into it a bit more, streamable appears to be blocking embedding. The links to the video files work if loading them directly in a new tab, but if a referer header is sent it will give a 403.

You can verify this yourself by copying the network request in chrome dev tools network tab as a curl command. As the straight request it will return a 403 but if you remove the referer header it will succeed by sending the binary data.

Embedly actually handles it by embedding it within an iframe. If you go to the streamable link you can copy the embed code which provides a link that is embeddable.

<div style="width: 100%; height: 0px; position: relative; padding-bottom: 62.500%;">
    frameborder="0" width="100%" height="100%" allowfullscreen style="width: 100%; height: 100%; position: absolute;"

I would say that onebox needs to be updated to handle streamable as an iframe with the correct url structure like so.

Onebox is broken for some old links
(Luke S) #4

Has anyone tried modding the oneboxer to use the expanded URL? Not sure that it would need to use an i-frame at all, but its the full video + player.