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.
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!
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.
Alternatively, you can still insert an <iframe> of any site directly into a post if you whitelist the source.
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.