ExperimentalReadonly ExperimentalnativeThe native player id that this playlist api is attached to.
Experimental
Adds the source to the active playback session, either at index or at the end if index is omitted.
Has no effect if index is < 0 or > the number of sources. Has no effect and emits a PlayerWarning if
there is no active playback session.
On iOS and tvOS, no PlayerWarning is emitted; the native SDK logs a warning instead.
On iOS and tvOS, only HLS, progressive and movpkg sources can be part of a playlist.
Optionalindex: numbera promise that rejects if the source is already attached to a player, was destroyed, or (on iOS
and tvOS) has an unsupported type.
Experimental
Gets the Sources currently in the playback session. Exactly one source is always active in a playback session.
the sources of the playback session, or an empty list if there is no active playback session. Sources that were not created through a Source instance (e.g. offline content) are not included.
Experimental
Removes the source from the active playback session.
A removed source is not destroyed with the player. Destroy it via Source.destroy once it is no
longer needed.
Has no effect if the source is not part of the playback session. Has no effect and emits a PlayerWarning
if there is no active playback session or if the source is the active source.
On iOS and tvOS, no PlayerWarning is emitted; the native SDK logs a warning instead.
Experimental
Removes the source at index from the active playback session, like PlaylistApi.remove.
Has no effect if index is < 0 or >= the number of sources. Has no effect and emits a PlayerWarning if
there is no active playback session or if the source at index is the active source.
On iOS and tvOS, no PlayerWarning is emitted; the native SDK logs a warning instead.
Experimental
Seeks to the specified time in seconds in the specified source.
The source must be part of the playback session.
Has no effect and emits a PlayerWarning if there is no active playback session, or if source is the
active source and a live stream (use Player.timeShift instead).
On iOS and tvOS, no PlayerWarning is emitted.
Provides the means to manage multiple Sources inside a playback session.
When the player transitions from one source in the playback session to another (either by normal playback or by seeking), a
PlaylistTransitionevent is emitted and the new source becomes active while the old one becomes inactive.Accessible through Player.playlist.
Known limitations:
See Player.destroy for all known limitations of the source lifecycle.