Video

data class Video(val videoUrl: String = "", val videoTitle: String = "", val resolution: Int? = null, val bitrate: Int? = null, val headers: Headers? = null, val preferred: Boolean = false, val subtitleTracks: List<Track> = emptyList(), val audioTracks: List<Track> = emptyList(), val timestamps: List<TimeStamp> = emptyList(), val mpvArgs: List<Pair<String, String>> = emptyList(), val ffmpegStreamArgs: List<Pair<String, String>> = emptyList(), val ffmpegVideoArgs: List<Pair<String, String>> = emptyList(), val internalData: String = "", val initialized: Boolean = false)(source)

The instance that contains the data needed to watch a video.

Parameters

videoUrl

The url of the video that's passed to mpv.

videoTitle

The title of the video displayed in the app.

resolution

The video resolution. Useful for sorting.

bitrate

The video bitrate. Useful for sorting.

headers

The headers of the video.

preferred

Set to preferred to give priority when loading. Note that multiple videos may have this to true.

subtitleTracks

The list of external subtitle tracks.

audioTracks

The list of external audio tracks.

timestamps

The list of timestamps.

mpvArgs

Extra arguments passed to mpv.

ffmpegStreamArgs

Extra arguments passed to the video stream when downloading.

ffmpegVideoArgs

Extra arguments passed to ffmpeg when downloading.

internalData

Internal data used by resolveVideo.

initialized

Whether to call resolveVideo.

Constructors

Link copied to clipboard
constructor(url: String, quality: String, videoUrl: String?, headers: Headers? = null, subtitleTracks: List<Track> = emptyList(), audioTracks: List<Track> = emptyList())
constructor(videoUrl: String = "", videoTitle: String = "", resolution: Int? = null, bitrate: Int? = null, headers: Headers? = null, preferred: Boolean = false, subtitleTracks: List<Track> = emptyList(), audioTracks: List<Track> = emptyList(), timestamps: List<TimeStamp> = emptyList(), mpvArgs: List<Pair<String, String>> = emptyList(), ffmpegStreamArgs: List<Pair<String, String>> = emptyList(), ffmpegVideoArgs: List<Pair<String, String>> = emptyList(), internalData: String = "", initialized: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
val bitrate: Int? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val headers: Headers? = null
Link copied to clipboard
val initialized: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val preferred: Boolean = false
Link copied to clipboard
val resolution: Int? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard