Can we provide a list of videoIDs to the Angular youtube player
Feature Description
I want to be able to provide a custom play list which should be an array of video IDs .
Use Case
When the first video is finished it will move on to the next one in a form of a loop.
Describe the use case(s) that the proposed feature would enable. We would be able to advertise a set of video and loop on it .
Is this a feature of the underlying YouTube API? In general, we don't want to start adding features on top of that API.
@jelbourn
Normally we used to do this before using angular youtube-player component :
let playlist= ["L-YenoF-RD8", "K5rC-26KCHs", "DDQCbwgUhTQ"];
this.player = new window["YT"].Player("player", {
videoId: this.playlist[0],
playerVars: {
playlist: this.playlist.join(",")
},
events: {
onStateChange: this.onPlayerStateChange.bind(this),
onError: this.onPlayerError.bind(this),
onReady: this.onPlayerReady.bind(this)
}
});
as you can see inside the playerVars Object we used to provide them with the playlist that iframe should play and form a loop.It should be possible to do this as well in angular youtube-player using the youtube api i think
Example of what I want it to do: When video L-YenoF-RD8 finishes it plays K5rC-26KCHs and when DDQCbwgUhTQ finishes it restarts the array as a form of a loop.
Thanks for providing this information! Looks like this is part of supporting playerVars. Closing as we track this with https://github.com/angular/components/issues/19267
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.