如何在没有 cookie 的情况下嵌入 YouTube 视频? [英] How to embed YouTube videos without cookies?
问题描述
过去,我们可以通过简单地指向不同的 URL 来嵌入没有 cookie 的 YouTube 视频,例如 https://youtube-nocookie.com/embed/sRrqF8eXs38 获取没有 cookie 的版本.
In the past we could embed YouTube videos without cookies by simply pointing to a different URL, so for example https://youtube-nocookie.com/embed/sRrqF8eXs38 to get the version without cookies.
这不再起作用了.URL 返回 404,其中 cookie 版本仍然存在.
This does not work any longer. The URL returns a 404, where the cookie version still exists.
我现在找不到任何关于如何操作的参考.
I could not find any reference on how to do it now.
推荐答案
使用 www 版本,效果很好:https://www.youtube-nocookie.com/embed/sRrqF8eXs38
Use the www version, that works perfectly fine: https://www.youtube-nocookie.com/embed/sRrqF8eXs38
当您选择扩展隐私选项时,这也是他们的自动代码生成器输出的版本.
That is the version their automatic code generator outputs as well, when you chose the extended privacy option.
看起来他们出于某种原因删除了非 www 版本.(尽管在不添加自动重定向的情况下这样做会有点奇怪.也许这只是一个暂时的问题或错误.)
Looks like they removed the non-www version for some reason. (Although doing that without adding an automatic redirect would be kind of a weird move. Perhaps it is just a temporary problem or error.)
这篇关于如何在没有 cookie 的情况下嵌入 YouTube 视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!