我想知道在使用 API 时是否有“nocookie”选项?
https://developers.google.com/youtube/iframe_api_reference
最佳答案
可以使用无 cookie 域覆盖默认主机。例子:
player = new YT.Player('youtubePlayer', {
videoId : ID,
height : '300px',
width : '100%',
host: 'http://www.youtube-nocookie.com',
playerVars: {rel: 0},
events : {
'onReady' : onPlayerReady,
'onStateChange' : onPlayerStateChange
}
});
关于youtube - 是否可以禁用 YouTube API iFrame Player 的 cookie,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46161026/