# 全屏视频插件

**URL:** https://meta.discourse.org/t/full-screen-videos-plugin/90869
**Category:** Plugin
**Created:** [2018年六月27日 11:42 UTC](https://meta.discourse.org/t/full-screen-videos-plugin/90869 "2018-06-27T11:42:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2018年六月27日 11:42 UTC](https://meta.discourse.org/t/full-screen-videos-plugin/90869/1 "2018-06-27T11:42:55Z")

</div>

When you embed a video via iframe from Vimeo, Kaltura, or MS Stream, the embed code requires a few html attributes that make it possible to view the videos in full-screen mode. However, those attributes are stripped from the iframe code during the cooking process. This plugin whitelists the attributes required to allow full-screen buttons and capabilities.

I should also note that in order for this to work, you’ll need to add the source domain for these iframes to the `allowed iframes` site setting. Otherwise, the iframe will be ignored entirely.

[https://github.com/procourse/discourse-full-screen-videos-plugin](https://github.com/procourse/discourse-full-screen-videos-plugin)

Sidenote: This is work that was sponsored by a client who wanted to remain anonymous, but wanted to share their project with the community.

---

<div class="post-metadata">

### Author: ![rishabh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabh/32/179446_2.png) [@rishabh](https://meta.discourse.org/u/rishabh)
#### Post date: [2019年九月11日 15:10 UTC](https://meta.discourse.org/t/full-screen-videos-plugin/90869/2 "2019-09-11T15:10:58Z")

</div>

> [@joebuhlig](#):
>
> 然而，这些属性在“烹饪”过程中会从 iframe 代码中被移除。

根据 [https://github.com/discourse/discourse/commit/d93586c63f257b658fc72e4f9e4edbd1276a140f，`allowfullscreen`](https://github.com/discourse/discourse/commit/d93586c63f257b658fc72e4f9e4edbd1276a140f%EF%BC%8C%60allowfullscreen%60) iframe 属性不再被移除，因此全屏按钮应如预期显示：

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/d/dd98e9b7503a37e09aed649df3d32a6de19e1539.jpeg)  
请注意，您仍然需要将这些 iframe 的源域名添加到站点的“允许的 iframe”设置中。未来可能不再需要此插件，但感谢 @joebuhlig 的贡献：🙌

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2019年九月12日 02:30 UTC](https://meta.discourse.org/t/full-screen-videos-plugin/90869/3 "2019-09-12T02:30:01Z")

</div>


