setDataSource

fun MediaPlayer.setDataSource(context: Context, videoOptions: VideoOptions, onError: (Exception) -> Unit = { error -> Log.e( TAG, "Failed to create session $error" ) })

Sets a media source to MediaPlayer to read from api.video HLS.

Parameters

videoOptions

The VideoOptions to play


fun MediaPlayer.setDataSource(context: Context, videoUrlFactory: ApiVideoMediaFactory)

Sets a media source to MediaPlayer to read from api.video HLS. Use this method if you want to keep the session token for later usage.

Parameters

videoUrlFactory