Playlist represents a list of videos that can be played and observed, with build-in support for video loading and pagination. This is the recommended way of fetching and playing videos through our player.
To create video playlist you simply need to initialize a new instance:
This playlist will load all videos from the current application. When you initialize it, it will load the first page of videos.
More examples of different playlists:
To load the next page of videos you can call
Playlist instance has a
totalCount property with the total number of all videos from this playlist. It could be useful to check if there are more videos to load or if the playlist is fully loaded.
To get a video from a playlist you can do following:
You could also add or remove videos from the playlist:
You could also subscribe to updates of playlist videos.