ApiVideoMediaFactory

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

ApiVideoMediaFactory is a wrapper around VideoOptions to create URL for the different api.video media items (HLS, MP4, thumbnails). 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

Gets the URL to read from api.video MP4.

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

Gets the URL for the video's thumbnail.

Link copied to clipboard
fun getVideoUrl(onSuccess: (PlayerMediaRequest) -> Unit)

Gets the URL to read from api.video HLS.