我正在使用iframe在自己的网站中嵌入YouTube频道,但显示“发生错误。请重试。”。奇怪的是,如果我设置另一个频道ID,它会起作用。
The channel ID that doesn't work
我复制了调试信息,以防万一:
{
"cpn": "hWjSQIlGKWCb1Abv",
"vct": "0.000",
"vd": "NaN",
"vpl": "",
"vbu": "",
"vpa": "1",
"vsk": "0",
"ven": "0",
"vpr": "1",
"vrs": "0",
"vns": "0",
"vec": "null",
"vvol": "1",
"creationTime": 65805,
"totalVideoFrames": 0,
"droppedVideoFrames": 0,
"corruptedVideoFrames": 0,
"state": "80",
"debug_error": {
"errorCode": "api.invalidparam",
"errorDetail": "invalidVideodata.1",
"message": "Se ha producido un error. Vuelve a intentarlo más tarde.",
"messageKey": "GENERIC_WITHOUT_LINK",
"subreason": ""
},
"relative_loudness": "NaN",
"user_qual": "auto",
"0sz": false,
"op": "",
"yof": false,
"dis": "",
"gpu": "Intel_Iris_Pro_OpenGL_Engine",
"cgr": true,
"debug_playbackQuality": "unknown",
"debug_date": "Fri Nov 16 2018 14:20:11 GMT-0400 (hora de Bolivia)"
}
这是我使用的代码:
player = new YT.Player('player', {
videoId: 'live_stream',
playerVars: {
channel: 'UCJC7T__QoftT5B3QkLUv7pQ',
controls: 0,
disablekb: 1,
fs: 0,
modestbranding: 1,
rel: 0,
showinfo: 0
},
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
请帮帮我。