prepare

abstract fun prepare(loadSource: Boolean)

Prepare the resource for a media. This method should:

  • Request for new Player instance if there is not a usable one.

  • Configure callbacks for the player implementation.

  • If there is non-trivial PlaybackInfo, update it to the SimpleExoPlayer.

  • If client request to prepare MediaSource, then prepare it.

This method must be called before .setPlayerView.

Parameters

loadSource

if true, also prepare the MediaSource when preparing the Player, if false just do nothing for the MediaSource.