我的页面中的iframe中嵌入了抽搐视频,其中src是动态的。
代码:
<iframe src="https://player.twitch.tv/?autoplay=false&video=v410582421"
allowfullscreen></iframe>
<iframe src="https://player.twitch.tv/?channel=summit1g"
allowfullscreen></iframe>
问题: 该视频按预期运行,但我看到如下控制台错误
Invalid operation: t.channel is not implemented
value @ player.c121e93a8ba044cc73a2.js:25.
Uncaught (in promise) DOMException: Failed to execute 'postMessage' on
'Window': Invalid target origin '' in a call to 'postMessage'.
at https://player.twitch.tv/js/player.c121e93a8ba044cc73a2.js:35:683828
at Array.forEach (<anonymous>)
at e.value
(https://player.twitch.tv/js/player.c121e93a8ba044cc73a2.js:35:683806)
at e.value
(https://player.twitch.tv/js/player.c121e93a8ba044cc73a2.js:35:681357)
GET https://api.twitch.tv/kraken/user 401
failed to resolve properties promise Response {type: "cors", url:
"https://api.twitch.tv/kraken/user", redirected: false, status: 401,
ok: false, …}
Failed to load resource: the server responded with a status of 401 ().
请让我知道为什么会出现这些错误以及如何消除这些错误?