Videos not embedding

AI-generated summary

The discussion revolves around why some videos embed in the forum while others do not. Viktor09 notes that YouTube URLs embed successfully, but others do not, despite working on other forums. Arkshine explains that Discourse’s Onebox feature only supports specific video sites, and the list of supported sites is maintained manually. Viktor09 confirms understanding that support is site-specific. Arkshine clarifies that while Onebox requires official support, users can still embed videos via <iframe> if the source is whitelisted. Viktor09 struggles with the settings, mistakenly using the wrong option, but Arkshine corrects this, directing them to the allowed iframe setting instead. The conversation concludes with Viktor09 feeling more confident.

I’m struggling to understand why some videos embed in our forum and some do not.

For example, if someone posts a YouTube URL it embeds as a playable video. Great.

URLs from other sites don’t render as an embedded playable video, even though I can see the same URLs as embedded playable videos on other (non-Discourse) forums.

So, are there restrictions somewhere? I don’t find anything in the settings.

Hello,

Not all video providers are supported by default. You can see a list here.
What are the sites you’re referring to? You can request it in Contribute > Feature if not available!

Thanks for the helpful response @Arkshine

So, supporting video embeds is literally done on a website-by-website basis? Discourse/Onebox has to choose to provide support for a specific website’s videos in order for this to work? Have I understood that correctly?

If you’re talking about generating a nice preview after pasting a link, yes, you’re right.

Every website has specificities, such as different formats, modes, URL structure, etc.
It’s not always as straightforward as wrapping the URL inside an <iframe> directly.

If Onebox doesn’t work with your site, this means no one requested it before, feel free to do so. :+1:

Alternatively, you can still insert an <iframe> of any site directly into a post if you whitelist the source.

See allowed iframes setting:

I think you are confusing Creating rich link previews with Onebox with embedding an <iframe> directly.
Creating a onebox requires the website to be supported internally by Discourse.

You still can post manually any <iframe> as long the source is whitelisted (see my answer above).
In both ways, you have full control over what to allow.

I hope that helps! :slight_smile:

Thanks for you help. I am a complete non-techy so I am finding this hard :sweat_smile:

When I try to add something to that list I get this:

No worry! This setting is for onebox, to control what onebox is allowed to be rendered (among the supported provider I listed in my first message).

You want to use allowed iframe setting instead!

Okay, I’m starting to get somewhere :sweat_smile:

Thanks again @Arkshine