VideoState

data class VideoState(val subtitles: PersistentSet<SubtitleData> = persistentSetOf(), val links: PersistentSet<VideoLink> = persistentSetOf(), val stamps: PersistentList<VideoSkipStamp> = persistentListOf(), val loading: Resource<Unit> = Resource.Loading(), val generatorState: GeneratorState? = null, val instance: Int)(source)

Immutable state of all current links relevant to displaying the video

Constructors

Link copied to clipboard
constructor(subtitles: PersistentSet<SubtitleData> = persistentSetOf(), links: PersistentSet<VideoLink> = persistentSetOf(), stamps: PersistentList<VideoSkipStamp> = persistentListOf(), loading: Resource<Unit> = Resource.Loading(), generatorState: GeneratorState? = null, instance: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val links: PersistentSet<VideoLink>
Link copied to clipboard
Link copied to clipboard
val stamps: PersistentList<VideoSkipStamp>
Link copied to clipboard
val subtitles: PersistentSet<SubtitleData>

Functions

Link copied to clipboard
@Contract(pure = true)
fun add(item: SubtitleData): VideoState
@Contract(pure = true)
fun add(item: VideoSkipStamp): VideoState
@Contract(pure = true)
fun add(item: VideoLink): VideoState
@JvmName(name = "addSubtitleData")
@Contract(pure = true)
fun add(items: Collection<SubtitleData>): VideoState
@JvmName(name = "addVideoSkipStamp")
@Contract(pure = true)
fun add(items: Collection<VideoSkipStamp>): VideoState
@JvmName(name = "addVideoLink")
@Contract(pure = true)
fun add(items: Collection<VideoLink>): VideoState
Link copied to clipboard
Link copied to clipboard
@Contract(pure = true)
fun set(item: SubtitleData): VideoState
@Contract(pure = true)
fun set(item: VideoSkipStamp): VideoState
@Contract(pure = true)
fun set(item: VideoLink): VideoState
@JvmName(name = "setSubtitleData")
@Contract(pure = true)
fun set(items: Collection<SubtitleData>): VideoState
@JvmName(name = "setVideoSkipStamp")
@Contract(pure = true)
fun set(items: Collection<VideoSkipStamp>): VideoState
@JvmName(name = "setVideoLink")
@Contract(pure = true)
fun set(items: Collection<VideoLink>): VideoState
Link copied to clipboard
@Contract(pure = true)
fun sortLinks(qualityProfile: Int): List<VideoLink>

Returns .links in the sorted order according to the qualityProfile. Use .links if order is not needed