# Videos not embedding

**URL:** https://meta.discourse.org/t/videos-not-embedding/284682
**Category:** Support
**Created:** [November 7, 2023, 10:07am UTC](https://meta.discourse.org/t/videos-not-embedding/284682 "2023-11-07T10:07:30Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Viktor09](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viktor09/32/202618_2.png) [@Viktor09](https://meta.discourse.org/u/Viktor09)
#### Post date: [November 7, 2023, 10:07am UTC](https://meta.discourse.org/t/videos-not-embedding/284682/1 "2023-11-07T10:07:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [November 7, 2023, 5:35pm UTC](https://meta.discourse.org/t/videos-not-embedding/284682/2 "2023-11-07T17:35:43Z")

</div>

Hello,

Not all video providers are supported by default. You can see a list [here](https://github.com/discourse/onebox/tree/main/lib/onebox/engine).  
What are the sites you’re referring to? You can request it in #Contribute > Feature if not available!

---

<div class="post-metadata">

### Author: ![Viktor09](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viktor09/32/202618_2.png) [@Viktor09](https://meta.discourse.org/u/Viktor09)
#### Post date: [November 8, 2023, 8:55am UTC](https://meta.discourse.org/t/videos-not-embedding/284682/3 "2023-11-08T08:55:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [November 8, 2023, 1:55pm UTC](https://meta.discourse.org/t/videos-not-embedding/284682/5 "2023-11-08T13:55:51Z")

</div>

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. 👍

> [@Creating rich link previews with Onebox](https://meta.discourse.org/t/create-rich-link-previews-with-onebox/98088):
>
> bookmark This is a guide for creating rich link previews with Onebox in Discourse. It explains how to create Oneboxes, use inline Oneboxing, avoid Oneboxing, use hyperlinks, and handle advanced iFrames. person_raising_hand Required user level: All users Onebox converts your web links into useful preview excerpts that help inform readers about the target before they click through. Summary This guide covers how to: Create Oneboxes Use inline Oneboxing Avoid Oneboxing Use hyperlinks ins…

> [@Configuring and troubleshooting oneboxes](https://meta.discourse.org/t/onebox-configuration-and-troubleshooting/239715):
>
> bookmark This guide explains how to configure and troubleshoot oneboxes in Discourse. It covers admin settings, how oneboxes work, and steps to resolve common issues. person_raising_hand Required user level: Administrator Oneboxes are rich link previews that users can create in their posts. While users can easily generate these previews, site administrators have additional controls and may need to troubleshoot when links don’t preview as expected. Admin configuration To manage onebox s…

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

See `allowed iframes` setting:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/7/c/d7c32a528c21c5f50cd75c4121063c6309b8cced.png)

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [November 8, 2023, 2:11pm UTC](https://meta.discourse.org/t/videos-not-embedding/284682/6 "2023-11-08T14:11:54Z")

</div>

> [@DNWebsite](#):
>
> I’m a little confused as to why a site hosting a video has to be ‘supported’. If I’m running Discourse on my own server, why do I not get to decide what I allow my users to embed?

I think you are confusing [Creating rich link previews with Onebox](https://meta.discourse.org/t/create-rich-link-previews-with-onebox/98088) 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! 🙂

---

<div class="post-metadata">

### Author: ![Viktor09](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viktor09/32/202618_2.png) [@Viktor09](https://meta.discourse.org/u/Viktor09)
#### Post date: [November 8, 2023, 3:14pm UTC](https://meta.discourse.org/t/videos-not-embedding/284682/8 "2023-11-08T15:14:27Z")

</div>

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

> [@Arkshine](#):
>
> See `allowed iframes` setting:

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

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/0/f/80fabe5327e7fbf2729b392f95f195b4eb6ee57c.png)

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [November 8, 2023, 3:20pm UTC](https://meta.discourse.org/t/videos-not-embedding/284682/9 "2023-11-08T15:20:51Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Viktor09](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viktor09/32/202618_2.png) [@Viktor09](https://meta.discourse.org/u/Viktor09)
#### Post date: [November 8, 2023, 3:30pm UTC](https://meta.discourse.org/t/videos-not-embedding/284682/10 "2023-11-08T15:30:27Z")

</div>

Okay, I’m starting to get somewhere 😅

Thanks again @Arkshine
