clearThenAddMediaItem

Clears the current playlist and then adds a single media item.

This method is equivalent to calling clearMediaItems() followed by addMediaItem(item).

Parameters

item

The media item to add to the playlist.


Clears the current playlist and then adds a single media item at a specific index.

This method is equivalent to calling clearMediaItems() followed by addMediaItem(index, item).

Parameters

index

The index at which to insert the media item in the playlist.

item

The media item to add.