But how do we avoid everything bouncing? We need the iframes to have a fixed height.
Yeah it has to be fixed height, that’s not negotiable. Fixed height is the starting point.
Onebox hits their oEmbed API and grabs the width and height and creates an iframe of fixed width/height respecting the TikTok video aspect ratio.
How that sounds @sam / @codinghorror ?
这个是否曾被列入路线图?
我认为强制设置 iframe 的高度和宽度是合理的。不过,我对所有 iframe onebox 都有普遍担忧。
既然我们已经集成了 onebox,我们应该在设置中详尽地列出所有我们开箱即用的允许的 IFRAME,以便我们明确这一点。
我感觉 allowed onebox iframes 开箱即用不应该是 *,而应该列出我们允许的所有 iframe。
我们有这些数据——它可以在站点设置下拉列表中找到。除非OneBox引擎首先将源添加到列表中,否则不允许渲染iframes:
它们通过 requires_iframe_origins 指令添加到列表中:
如果关联的源未启用,则引擎会自动禁用。
我们可以那样做……但这将意味着新的onebox将不会自动添加到列表中。
您是想添加所有现有选项吗?还是只是一部分最常见的?![]()
是的,我明白了,我忘了展开 * :),我认为我们在这里不需要做任何额外的事情,除非 @Falco 最初的建议(使用 oembed API 获取高度并将 iframe 添加到页面),然后用户可以选择退出。
我将在此处添加一个 pr-welcome,以防社区想尝试一下。
哇,你是怎么做到的?你是怎么嵌入的?
我想知道TikTok的URL是否有任何进展,以便它们像YouTube视频一样做出反应。
谢谢! ![]()
此主题已在 20 小时后自动关闭。不再允许回复。
