I am using the YouTube Player API.
I want to make my own custom playlist directly in my code (not to use playlist ID from youtube)
Here is my playlist code which doesn’t work
player.loadPlaylist({
list:['mGalEx6ufUw', 'TaCUBtzKAnA', '4v8SPz4VfsU'],
listType: 'playlist',
index:0,
startSeconds:0,
suggestedQuality:'medium'
});
As the documentation says I can pass playlist ID or array with video IDs to parameter list, but it’s not working.
If I write playlist ID instead of the array with video IDs it works.
I’ve found the answer for this problem with the help of Jeffrey Posnick in Google Groups.
You can make this working with the argument syntax instead of object syntax. More info here