create

open fun create(context: Context, video: Video, downloadEventListener: MediaDownloadable.DownloadEventListener, requestConfig: RequestConfig): MediaDownloadable

Creates the best MediaDownloadable for the given video based on the supported delivery types.

Return

null if the video is not flagged for offline playback or if no suitable delivery type was found in the video, otherwise reference to a MediaDownloadable that can be used download/manage the video.

Parameters

context

the context of the application.

video

the video to be downloaded.

requestConfig

the request configuration object passed to the android.app.DownloadManager.


open fun create(context: Context, videoUrl: String, downloadEventListener: MediaDownloadable.DownloadEventListener, requestConfig: RequestConfig): MediaDownloadable

Creates the best MediaDownloadable for the given video url on the supported delivery types.

Return

null if no suitable delivery type was found in the video, otherwise reference to a MediaDownloadable that can be used download/managed the video.

Parameters

context

the context of the application.

videoUrl

the fully qualified URL of the video to be downloaded.

requestConfig

the request configuration object passed to the download manager.