SourceConfig
open class SourceConfig(val url: String, val type: SourceType, var title: String? = null, var description: String? = null, var posterSource: String? = null, var isPosterPersistent: Boolean = false, var subtitleTracks: List<SubtitleTrack> = emptyList(), var thumbnailTrack: ThumbnailTrack? = null, var drmConfig: DrmConfig? = null, var labelingConfig: LabelingConfig = LabelingConfig(), var vrConfig: VrConfig = VrConfig(), var videoCodecPriority: List<String> = emptyList(), var audioCodecPriority: List<String> = emptyList(), var options: SourceOptions = SourceOptions(), var metadata: Map<String, String>? = null, var liveConfig: SourceLiveConfig? = null, var networkConfig: SourceNetworkConfig = SourceNetworkConfig(), var adaptationConfig: SourceAdaptationConfig = SourceAdaptationConfig(), var cmcdConfig: CmcdConfig = CmcdConfig.Disabled) : Parcelable
Configures a Source that can be loaded into a Player.
Inheritors
Constructors
| SourceConfig | constructor(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, liveConfig: SourceLiveConfig? = null, networkConfig: SourceNetworkConfig = SourceNetworkConfig(), adaptationConfig: SourceAdaptationConfig = SourceAdaptationConfig(), cmcdConfig: CmcdConfig = CmcdConfig.Disabled)constructor(url: String, type: SourceType) Creates a new SourceConfig for a given type. constructor(url: String) Creates a new SourceConfig based on the provided url to a DASH, HLS, SMOOTH or Progressive MP4 source. constructor(adaptiveSource: AdaptiveSource)constructor(progressiveSource: ProgressiveSource) |
Types
| Name | Summary |
|---|---|
| Companion | object Companion |
Properties
| Name | Summary |
|---|---|
| adaptationConfig | var adaptationConfig: SourceAdaptationConfig Configures the adaptation logic. |
| audioCodecPriority | var audioCodecPriority: List<String> The audio codec priority for the Source. First index has the highest priority. |
| cmcdConfig | var cmcdConfig: CmcdConfig Configures Common Media Client Data (CMCD) for this Source. |
| dashSource | val The current DASHSource. |
| description | var description: String? The descriptions of the Source. |
| drmConfig | var drmConfig: DrmConfig? The current DrmConfig or null. |
| drmConfigs | val |
| hlsSource | val The current HLSSource. |
| isPosterPersistent | var isPosterPersistent: Boolean Whether the poster is persistent. |
| labelingConfig | var labelingConfig: LabelingConfig The LabelingConfig for the Source. |
| liveConfig | var liveConfig: SourceLiveConfig? The SourceLiveConfig for the Source. Ignored if the Source is not a live stream. |
| metadata | var metadata: Map<String, String>? The optional custom metadata. Also sent to the cast receiver when loading the Source. |
| networkConfig | var networkConfig: SourceNetworkConfig Configures network functionalities. |
| options | var options: SourceOptions The additional SourceOptions for the Source. |
| posterSource | var posterSource: String? The HTTP or HTTPS URL pointing to the poster image or an asset file name for AssetManager.open. |
| progressiveSource | val The current ProgressiveSource. |
| smoothSource | val The current SmoothSource. |
| subtitleTracks | var subtitleTracks: List<SubtitleTrack> A list of additional SubtitleTracks available for the Source. |
| thumbnailTrack | var thumbnailTrack: ThumbnailTrack? The current ThumbnailTrack or null. |
| title | var title: String? The title of the Source. |
| type | val type: SourceType The SourceType of the Source. |
| url | val url: String The URL pointing to the media stream with the specified type. |
| videoCodecPriority | var videoCodecPriority: List<String> The video codec priority for the Source. First index has the highest priority. |
| vrConfig | var vrConfig: VrConfig The current VrConfig. |
Functions
| Name | Summary |
|---|---|
| addDrmConfig | fun fun Sets a DrmConfig to this SourceConfig. Returns the DrmConfig that was set on the SourceConfig. |
| addSubtitleTrack | fun addSubtitleTrack(subtitleTrack: SubtitleTrack): SubtitleTrack Adds the provided SubtitleTrack to this SourceConfig. Returns the SubtitleTrack that was added. fun Generates a SubtitleTrack with the provided url and adds it to this SourceConfig. Returns the SubtitleTrack that was added. fun fun Generates a SubtitleTrack with the provided parameter and adds it to this SourceConfig. |
| getDrmConfig | fun Returns the DrmConfig if the uuid matches the config in this SourceConfig. |
| setPosterImage | fun setPosterImage(url: String, keepPersistent: Boolean = false) Sets the poster image and its persistent state for this SourceConfig. |
| setThumbnailTrack | fun Generates a ThumbnailTrack with the provided url and sets it on this SourceConfig. |
| toString | open override fun toString(): String |