继续讨论:Peertube 嵌入?
尝试将 PeerTube 实例添加到 allowed_onebox_iframes 时,我收到以下错误:invalid choice。嗯,什么意思?如何解决?
嵌入 Peertube 视频的提示/注意事项
在 allowed_iframes 站点设置中使用 https://peertube.instance.example/videos,以同时支持 /videos/watch/<uuid> 和 /videos/embed/<uuid> 两种情况。后者是当你粘贴前者时,Peertube 的 onebox 所使用的格式!
david
(David Taylor)
2
在“允许的 onebox iframe”列表中,您只能从 onebox gem 提供的预定义域名中进行选择。
如果您要允许来自其他域的 iframe,请使用“允许的 iframe”设置。
1 个赞
哎呀,谢谢。
我刚才尝试将 Peertube 的视频进行 onebox 显示。以前只需粘贴链接即可生效,而且我的 allowed_iframes 条目也是正确的。最近 CSP 的变更让我有些困惑,这些变更似乎导致新实例出现问题,而旧实例却不受影响。
比如,这个链接 https://peertube.public.cat/videos/watch/392c393e-1fde-4356-bb25-8a92e7ce2057 以前是可以正常显示视频的……
david
(David Taylor)
4
在我将其添加到允许的 iframe 设置后,它在测试站点上可以正常工作:
你为 allowed_iframes 添加的是什么值?
1 个赞
https://peertube.public.cat/videos/watch/
david
(David Taylor)
6
啊,去掉末尾的 /watch 应该就能工作了。iframe 的 URL 看起来像这样:
https://peertube.public.cat/videos/embed/392c393e-1fde-4356-bb25-8a92e7ce2057
我在设置中添加了以下值:
https://peertube.public.cat/videos
2 个赞
system
(system)
关闭
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.