嵌入需要父级的 iframe
Embedding an iframe that requires parent
抱歉,我什至不知道如何正确地提出这个问题。
要嵌入 Twitch iframe I need to define 'parent' field. My website uses a port to get access to it. Like https://example.com:447,但是 'parent' 字段需要不带“:”的值,所以我不能在这里使用我的 url。如果我像 example.com 那样使用它,它就不起作用,因为它没有端口。求个vector求解决方法
let options = {
width: '640',
height: '360',
[contentType]: data['twitch-content'],
parent: ['example.com:447', 'example.com'],
autoplay: !!data['twitch-autoplay'],
muted: !!data['twitch-muted']
};
let player = new Twitch.Player(el.id, options);
https://discuss.dev.twitch.tv/t/embedding-on-a-private-website/26366/4
Twitch does not support non standard ports on domains that are not localhost.
It’s expecting to be on port 443 for SSL. [...]
Non standard ports are only support for localhost/127.0.0.1
似乎唯一可能的解决方案是您在本地开发环境中使用 localhost
进行测试,或者使用将端口 80 用于 HTTP 或端口 443 用于 HTTPS 的网站。
抱歉,我什至不知道如何正确地提出这个问题。 要嵌入 Twitch iframe I need to define 'parent' field. My website uses a port to get access to it. Like https://example.com:447,但是 'parent' 字段需要不带“:”的值,所以我不能在这里使用我的 url。如果我像 example.com 那样使用它,它就不起作用,因为它没有端口。求个vector求解决方法
let options = {
width: '640',
height: '360',
[contentType]: data['twitch-content'],
parent: ['example.com:447', 'example.com'],
autoplay: !!data['twitch-autoplay'],
muted: !!data['twitch-muted']
};
let player = new Twitch.Player(el.id, options);
https://discuss.dev.twitch.tv/t/embedding-on-a-private-website/26366/4
Twitch does not support non standard ports on domains that are not localhost. It’s expecting to be on port 443 for SSL. [...] Non standard ports are only support for localhost/127.0.0.1
似乎唯一可能的解决方案是您在本地开发环境中使用 localhost
进行测试,或者使用将端口 80 用于 HTTP 或端口 443 用于 HTTPS 的网站。