SourceConfig

open class SourceConfig(url: String, type: SourceType, title: String?, description: String?, posterSource: String?, isPosterPersistent: Boolean, subtitleTracks: List<SubtitleTrack>, thumbnailTrack: ThumbnailTrack?, drmConfig: DrmConfig?, labelingConfig: LabelingConfig, vrConfig: VrConfig, videoCodecPriority: List<String>, audioCodecPriority: List<String>, options: SourceOptions, metadata: Map<String, String>?) : Parcelable

Configures a Source that can be loaded into a Player.

Constructors

SourceConfig
Link copied to clipboard
fun SourceConfig(url: String, type: SourceType)
Creates a new SourceConfig for a given type.
SourceConfig
Link copied to clipboard
fun SourceConfig(url: String)
Creates a new SourceConfig based on the provided url to a DASH, HLS, SMOOTH or Progressive MP4 source.
SourceConfig
Link copied to clipboard
fun SourceConfig(adaptiveSource: AdaptiveSource)
SourceConfig
Link copied to clipboard
fun SourceConfig(progressiveSource: ProgressiveSource)
SourceConfig
Link copied to clipboard
fun SourceConfig(url: String, type: SourceType, title: String? = null, description: String? = null, posterSource: String? = null, isPosterPersistent: Boolean = false, subtitleTracks: List<SubtitleTrack> = emptyList(), thumbnailTrack: ThumbnailTrack? = null, drmConfig: DrmConfig? = null, labelingConfig: LabelingConfig = LabelingConfig(), vrConfig: VrConfig = VrConfig(), videoCodecPriority: List<String> = emptyList(), audioCodecPriority: List<String> = emptyList(), options: SourceOptions = SourceOptions(), metadata: Map<String, String>? = null)

Types

Companion
Link copied to clipboard
object Companion

Properties

audioCodecPriority
Link copied to clipboard
var audioCodecPriority: List<String>
The audio codec priority for the Source.
dashSource
Link copied to clipboard
val dashSource: DASHSource?
The current DASHSource.
description
Link copied to clipboard
var description: String? = null
The descriptions of the Source.
drmConfig
Link copied to clipboard
var drmConfig: DrmConfig? = null
The current DrmConfig or null.
drmConfigs
Link copied to clipboard
val drmConfigs: List<DrmConfig?>
hlsSource
Link copied to clipboard
val hlsSource: HLSSource?
The current HLSSource.
isPosterPersistent
Link copied to clipboard
var isPosterPersistent: Boolean = false
Whether the poster is persistent.
labelingConfig
Link copied to clipboard
var labelingConfig: LabelingConfig
The LabelingConfig for the Source.
metadata
Link copied to clipboard
var metadata: Map<String, String>? = null
The optional custom metadata.
options
Link copied to clipboard
var options: SourceOptions
The additional SourceOptions for the Source.
posterSource
Link copied to clipboard
var posterSource: String? = null
The URL pointing to the poster image.
progressiveSource
Link copied to clipboard
val progressiveSource: ProgressiveSource?
The current ProgressiveSource.
smoothSource
Link copied to clipboard
val smoothSource: SmoothSource?
The current SmoothSource.
subtitleTracks
Link copied to clipboard
var subtitleTracks: List<SubtitleTrack>
A list of additional SubtitleTracks available for the Source.
thumbnailTrack
Link copied to clipboard
var thumbnailTrack: ThumbnailTrack? = null
The current ThumbnailTrack or null.
title
Link copied to clipboard
var title: String? = null
The title of the Source.
type
Link copied to clipboard
val type: SourceType
The SourceType of the Source.
url
Link copied to clipboard
val url: String
The URL pointing to the media stream with the specified type.
videoCodecPriority
Link copied to clipboard
var videoCodecPriority: List<String>
The video codec priority for the Source.
vrConfig
Link copied to clipboard
var vrConfig: VrConfig
The current VrConfig.

Functions

addDrmConfig
Link copied to clipboard
fun addDrmConfig(drmConfig: DrmConfig)
Sets a DrmConfig to this SourceConfig.
fun addDrmConfig(uuid: UUID, licenseUrl: String): DrmConfig?
Sets a DrmConfig to this SourceConfig.
addSubtitleTrack
Link copied to clipboard
fun addSubtitleTrack(subtitleTrack: SubtitleTrack): SubtitleTrack
Adds the provided SubtitleTrack to this SourceConfig.
fun addSubtitleTrack(url: String?): SubtitleTrack
Generates a SubtitleTrack with the provided url and adds it to this SourceConfig.
fun addSubtitleTrack(url: String?, label: String?, id: String, isDefault: Boolean, language: String?): SubtitleTrack
Generates a SubtitleTrack with the provided parameter and adds it to this SourceConfig.
fun addSubtitleTrack(url: String?, mimeType: String?, label: String?, id: String, isDefault: Boolean, language: String?): SubtitleTrack
Generates a SubtitleTrack with the provided parameter and adds it to this SourceConfig.
getDrmConfig
Link copied to clipboard
fun getDrmConfig(uuid: UUID): DrmConfig?
Returns the DrmConfig if the uuid matches the config in this SourceConfig.
setPosterImage
Link copied to clipboard
fun setPosterImage(url: String, keepPersistent: Boolean = false)
Sets the poster image and its persistent state for this SourceConfig.
setThumbnailTrack
Link copied to clipboard
fun setThumbnailTrack(url: String?)
Generates a ThumbnailTrack with the provided url and sets it on this SourceConfig.

Inherited functions

describeContents
Link copied to clipboard
abstract fun describeContents(): Int
writeToParcel
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Inheritors

OfflineSourceConfig
Link copied to clipboard