PlaylistItem class enables you to add content to your player and define the unique characteristics of that content:
- Poster image
- Media ID
There are multiple ways to load and play content in your player. As best practice approaches, we recommend the following:
PlayerConfig.Builder()to create single-item or multiple-item playlists with media hosted in your JWP account
PlaylistItem.Builder()to create single-item or multiple-item playlists with self-hosted media
PlayerConfig.Builder()to associate a playlist to a player and to initiate media playback
While you can use other approaches to create, associate, and play playlists,
PlayerConfig.Builder()enable you to add functionality like customization and advertising.
The following sections explain how to create a single-item playlist, create a multiple-item playlist, and add multiple sources to a playlist item.
When your content is hosted with JWP, the metadata added to a media item when it is uploaded to your account is used in your mobile app. Additionally, you have the ability to query the Analytics API to access SDK video metrics.
Use the following recipe to create a single-item playlist.
If you are self-hosting your content, you can set metadata for manually building the following type of playlists:
- Single-item playlists
- Multiple-item playlists
- Playlists with multiple-source playlist items
Use the following recipes to learn how to build each of these playlists.
The following tables list frequently used methods and callbacks. To view all available methods and callbacks, visit our SDK reference.
|Returns the player's current playlist|
|Returns the index of the currently active item in the playlist|
|Returns the currently playing |
|Fired when a new playlist has been loaded into the player|
|Fired when the playlist index changes to a new playlist item|
|Fired when the player is done playing all items in the playlist|
However, if the repeat option is set
Updated 30 days ago