当我在嵌入的youtube视频上按播放时,我得到“视频不可用”。我在控制台中得到的错误是:
A cookie associated with a cross-site resource at https://youtube.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.我的HTML代码如下:
<iframe width="560" height="315" src={{ embedURL }} frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>我也尝试过硬编码的嵌入链接,但它产生了相同的结果。我的标签中是否遗漏了某个属性?
发布于 2020-10-14 23:42:16
您可以尝试使用www.youtube-nocookie.com/embed/+ VideoID。
例如https://www.youtube-nocookie.com/embed/N4Keb583jf0
请注意,这是唯一一个URL语法,应该一直有效:您需要www和/embed/...
在你的代码中,嵌入your应该是:https://www.youtube-nocookie.com/embed/+VideoID (+表示“连接”)
https://stackoverflow.com/questions/62984682
复制相似问题