问题
I'm using iframe for embed youtube channel in my site, but it shows "An error ocurred. Please try again.". Strangely, if I set another channel ID it works.
The channel ID that doesn't work
The channel ID that works
I copied the debug information just in case:
{
"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)"
}
And this is the code I used:
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
}
});
Please, help me.
来源:https://stackoverflow.com/questions/53343771/youtube-channel-livestream-embedded-doesnt-work