ApiVideoExoPlayerMediaFactory

class ApiVideoExoPlayerMediaFactory(videoOptions: VideoOptions, onError: (Exception) -> Unit)

ApiVideoExoPlayerMediaFactory has the same purpose as ApiVideoMediaFactory but dedicated to ExoPlayer. It also stores the token session for private videos.

Parameters

videoOptions

The VideoOptions to use

onError

The callback to call when an error occurs

Constructors

Link copied to clipboard
constructor(videoOptions: VideoOptions, onError: (Exception) -> Unit)

Functions

Link copied to clipboard
fun getMediaItem(onSuccess: (MediaItem) -> Unit)

Gets a MediaItem for a Player instance to read from api.video HLS.

Link copied to clipboard
fun getMediaSource(onSuccess: (MediaSource) -> Unit)

Gets a MediaSource for an ExoPlayer instance to read from api.video HLS.

Link copied to clipboard
fun getMp4MediaItem(onSuccess: (MediaItem) -> Unit)

Gets a MediaItem for a Player instance to read from api.video HLS.

Link copied to clipboard
fun getMp4MediaSource(onSuccess: (MediaSource) -> Unit)

Gets a MediaSource for an ExoPlayer instance to read from api.video MP4.

Link copied to clipboard
fun getThumbnailUrl(onSuccess: (String) -> Unit)

Gets the thumbnail url for the video.