全屏视频插件

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.

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

18 个赞

根据 https://github.com/discourse/discourse/commit/d93586c63f257b658fc72e4f9e4edbd1276a140f,`allowfullscreen` iframe 属性不再被移除,因此全屏按钮应如预期显示:


请注意,您仍然需要将这些 iframe 的源域名添加到站点的“允许的 iframe”设置中。未来可能不再需要此插件,但感谢 @joebuhlig 的贡献::raising_hands:

6 个赞