Embedding most recent YouTube video with Channel ID

拈花ヽ惹草 提交于 2019-12-04 20:40:05
KENdi

It is stated in the Player Parameter of Iframe API that the list parameter, in conjunction with the listType parameter, identifies the content that will load in the player.

  • If the listType parameter value is user_uploads, then the list parameter value identifies the YouTube channel whose uploaded videos will be loaded.

It is not stated here that you need to place Channel ID in the list parameter. The list parameter value identifies the YouTube channel whose uploaded videos will be loaded.

So what you need to place here is the USER NAME.

example

https://www.youtube.com/user/Nightblue3

Try to use the Nightblue3 here in the list parameter of your request. And your embed video will work.

For more information, check this related SO question.

With new channels, that do not have a username, you should use:

http://www.youtube.com/embed/videoseries?list=USERID

And the USERID is your youtube user id with 'UU' appended.

For example, if your user id is TlQ5niAIDsLdEHpQKQsupg then you should put UUTlQ5niAIDsLdEHpQKQsupg. If you only have the channel id (which you can find in your channel URL) then just replace the first two characters (UC) with UU.

So in the end you would have an URL like this: http://www.youtube.com/embed/videoseries?list=UCTlQ5niAIDsLdEHpQKQsupg

BTW. you can append &index=1 to specify which video should be played.

See answer on duplicate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!