📌  相关文章
📜  提供的目标来源('https:www.youtube.com')与收件人窗口的来源('http:localhost')不匹配 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:25.209000             🧑  作者: Mango

代码示例1
//Add the parameter "origin" with the URL of your site in the paramVars attribute of the player
this.player = new window['YT'].Player('player', {
    videoId: this.mediaid,
    width: '100%',
    playerVars: { 
        'autoplay': 1,
        'controls': 0,
        'autohide': 1,
        'wmode': 'opaque',
        'origin': 'http://localhost:8100' 
    },
}