load

abstract fun load(source: Source)

Starts a new playback session consisting of the source.

If a playback session is already active, its sources are unloaded before the new session starts.

Performance

Replacing an active source can be faster when the player can reuse its local playback resources instead of releasing and recreating them. This is possible when all of the following apply:

A new playback session is started in either case.


abstract fun load(sourceConfig: SourceConfig)

Starts a new playback session consisting of a Source based on the provided sourceConfig.

If a playback session is already active, its sources are unloaded before the new session starts.

Performance

Replacing an active source can be faster when the player can reuse its local playback resources instead of releasing and recreating them. This is possible when all of the following apply:

A new playback session is started in either case.


abstract fun load(playlistConfig: PlaylistConfig)

Starts a new playback session consisting of PlaylistConfig.sources. The first source in the playlistConfig becomes active immediately.

If a playback session is already active, its sources are unloaded before the new session starts.

Performance

Replacing an active source can be faster when the player can reuse its local playback resources instead of releasing and recreating them. This is possible when all of the following apply:

A new playback session is started in either case.