# How to embed flash as onebox

**URL:** <https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366>\
**Category:** Product Support\
**Created:** [March 1, 2016, 3:48am UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366 "2016-03-01T03:48:41Z")\
**Posts on this page:** 9\
**Page:** 1

## AI-generated summary

User [zh99998](/t/-/40366/1) is trying to embed a Flash SWF file from Bilibili using Discourse’s flash video onebox feature, but it’s not working despite enabling the setting and whitelisting the domain. They shared screenshots showing the URL and control panel settings. [pfaffman](/t/-/40366/2) suggests the SWF URL may not provide the required metadata for oneboxing, unlike YouTube, as shown via iframely.com. [DeanMarkTaylor](/t/-/40366/3) proposes modifying the URL by appending `&.swf` or `&format=1.swf` to match Discourse’s regex pattern for Flash oneboxing, but [zh99998](/t/-/40366/4) confirms these tweaks don’t work. [DeanMarkTaylor](/t/-/40366/5) then asks if Discourse was restarted, since some settings require it — [zh99998](/t/-/40366/6) confirms they’ve restarted and rebuilt the forum multiple times without success. The issue remains unresolved, pointing to either a limitation in Discourse’s Flash onebox engine or the SWF’s lack of embeddable metadata.

<div class="post-metadata">

**Author:** ![zh99998](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zh99998/32/100179_2.png) [@zh99998](https://meta.discourse.org/u/zh99998)\
**Post date:** [March 1, 2016, 3:48am UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/1 "2016-03-01T03:48:41Z")

</div>

I have set “enable flash video onebox” on but still can’t embed swf link

flash url:  
[https://static-s.bilibili.com/live-static/swf/LivePlayerEx\_1.swf?room\_id=10694&cid=10694&state=LIVE](https://static-s.bilibili.com/live-static/swf/LivePlayerEx_1.swf?room_id=10694&cid=10694&state=LIVE)

control panel:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/8/e8887c67f6ea6a0ae26f59a554149aace89f5b62.png)

what it looks like in posts:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/c/2cdfeb6944de6d74a6e4805961dbe8448339b59d.png)

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [March 1, 2016, 7:55pm UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/2 "2016-03-01T19:55:42Z")

</div>

I’m no expert, but checking the site in [iframely.com](http://iframely.com/debug?uri=https%3A%2F%2Fstatic-s.bilibili.com%2Flive-static%2Fswf%2FLivePlayerEx_1.swf%3Froom_id%3D10694%26cid%3D10694%26state%3DLIVE) it doesn’t look like it’s providing the stuff needed to onebox it. Contrast [this youtube](http://iframely.com/debug?uri=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DA3PDXmYoF5U).

---

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [March 1, 2016, 11:32pm UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/3 "2016-03-01T23:32:42Z")

</div>

Looking at the regular expression URL matching I believe is in play here:

> <https://github.com/discourse/discourse/blob/0f7aaf5ab19f593416a0012f223e2f91e6cb0329/lib/onebox/engine/flash_video_onebox.rb#L6>

You may get it to work by modifying the URL from:  
`https://static-s.bilibili.com/live-static/swf/LivePlayerEx_1.swf?room_id=10694&cid=10694&state=LIVE2`  
to:  
`https://static-s.bilibili.com/live-static/swf/LivePlayerEx_1.swf?room_id=10694&cid=10694&state=LIVE2&.swf`

But really this is not something I’ve tried.

---

<div class="post-metadata">

**Author:** ![zh99998](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zh99998/32/100179_2.png) [@zh99998](https://meta.discourse.org/u/zh99998)\
**Post date:** [March 2, 2016, 2:36am UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/4 "2016-03-02T02:36:12Z")

</div>

> [@DeanMarkTaylor](#):
>
> [https://static-s.bilibili.com/live-static/swf/LivePlayerEx\_1.swf?room\_id=10694&cid=10694&state=LIVE2&.swf](https://static-s.bilibili.com/live-static/swf/LivePlayerEx_1.swf?room_id=10694&cid=10694&state=LIVE2&.swf)

I’ve tried

[https://static-s.bilibili.com/live-static/swf/LivePlayerEx\_1.swf?room\_id=10694&cid=10694&state=LIVE2&.swf](https://static-s.bilibili.com/live-static/swf/LivePlayerEx_1.swf?room_id=10694&cid=10694&state=LIVE2&.swf)

[https://static-s.bilibili.com/live-static/swf/LivePlayerEx\_1.swf?room\_id=10694&cid=10694&state=LIVE2&format=1.swf](https://static-s.bilibili.com/live-static/swf/LivePlayerEx_1.swf?room_id=10694&cid=10694&state=LIVE2&format=1.swf)

still nothing happened.

---

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [March 2, 2016, 2:37am UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/5 "2016-03-02T02:37:36Z")

</div>

Have you tried restarting discourse? some settings are not immediately updated and require a restart.

---

<div class="post-metadata">

**Author:** ![zh99998](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zh99998/32/100179_2.png) [@zh99998](https://meta.discourse.org/u/zh99998)\
**Post date:** [March 2, 2016, 2:39am UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/6 "2016-03-02T02:39:44Z")

</div>

I have set enable flash video and onebox whitelist very lone before. forum restarted and rebuild many times until now.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [May 9, 2019, 6:44pm UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/8 "2019-05-09T18:44:24Z")

</div>

Automatically bumped on May 9, 2019, 6:44pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [September 9, 2022, 4:16pm UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/9 "2022-09-09T16:16:05Z")

</div>

Automatically bumped on September 9, 2022, 4:16pm UTC



---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [September 9, 2022, 4:21pm UTC](https://meta.discourse.org/t/how-to-embed-flash-as-onebox/40366/10 "2022-09-09T16:21:47Z")

</div>

Closed on September 9, 2022, 4:21pm UTC


