OfflineSourceConfig

com.bitmovin.player.api.offline

OfflineSourceConfig

open class OfflineSourceConfig(url: String, type: SourceType, val drmId: ByteArray?, cacheDirectory: File, trackStateFile: File?, val isRestrictToOffline: Boolean, resourceIdentifierCallback: ResourceIdentifierCallback? = null) : SourceConfig

Represents the offline version of a SourceConfig. Altering this object could result in undefined behaviour.

Constructors

OfflineSourceConfigconstructor(url: String, type: SourceType, drmId: ByteArray?, cacheDirectory: File, trackStateFile: File?, isRestrictToOffline: Boolean, resourceIdentifierCallback: ResourceIdentifierCallback? = null)

Types

NameSummary
CREATORobject CREATOR : Parcelable.Creator<OfflineSourceConfig>

Properties

NameSummary
adaptationConfigvar adaptationConfig: SourceAdaptationConfig
Configures the adaptation logic.
audioCodecPriorityvar audioCodecPriority: List<String>
The audio codec priority for the Source. First index has the highest priority.
cmcdConfigvar cmcdConfig: CmcdConfig
Configures Common Media Client Data (CMCD) for this Source.
dashSourceval dashSource: DASHSource?
The current DASHSource.
descriptionvar description: String?
The descriptions of the Source.
drmConfigvar drmConfig: DrmConfig?
The current DrmConfig or null.
drmConfigsval drmConfigs: List<DrmConfig?>
drmIdval drmId: ByteArray?
hlsSourceval hlsSource: HLSSource?
The current HLSSource.
isPosterPersistentvar isPosterPersistent: Boolean
Whether the poster is persistent.
isRestrictToOfflineval isRestrictToOffline: Boolean
If the playback is restricted to offline data only.
labelingConfigvar labelingConfig: LabelingConfig
The LabelingConfig for the Source.
liveConfigvar liveConfig: SourceLiveConfig?
The SourceLiveConfig for the Source. Ignored if the Source is not a live stream.
metadatavar metadata: Map<String, String>?
The optional custom metadata. Also sent to the cast receiver when loading the Source.
networkConfigvar networkConfig: SourceNetworkConfig
Configures network functionalities.
optionsvar options: SourceOptions
The additional SourceOptions for the Source.
posterSourcevar posterSource: String?
The HTTP or HTTPS URL pointing to the poster image or an asset file name for AssetManager.open.
preferredAudioLanguagesvar preferredAudioLanguages: List<String>
The preferred audio languages for the Source as a priority list of language codes (e.g. ["de", "en"]). First index has the highest priority.
progressiveSourceval progressiveSource: ProgressiveSource?
The current ProgressiveSource.
smoothSourceval smoothSource: SmoothSource?
The current SmoothSource.
subtitleTracksvar subtitleTracks: List<SubtitleTrack>
A list of additional SubtitleTracks available for the Source.
thumbnailTrackvar thumbnailTrack: ThumbnailTrack?
The current ThumbnailTrack or null.
titlevar title: String?
The title of the Source.
typeval type: SourceType
The SourceType of the Source.
urlval url: String
The URL pointing to the media stream with the specified type.
videoCodecPriorityvar videoCodecPriority: List<String>
The video codec priority for the Source. First index has the highest priority.
vrConfigvar vrConfig: VrConfig
The current VrConfig.

Functions

NameSummary
addDrmConfigfun addDrmConfig(drmConfig: DrmConfig)
fun addDrmConfig(uuid: UUID, licenseUrl: String): DrmConfig?
Sets a DrmConfig to this SourceConfig. Returns the DrmConfig that was set on the SourceConfig.
addSubtitleTrackfun addSubtitleTrack(subtitleTrack: SubtitleTrack): SubtitleTrack
Adds the provided SubtitleTrack to this SourceConfig. Returns the SubtitleTrack that was added.
fun addSubtitleTrack(url: String?): SubtitleTrack
Generates a SubtitleTrack with the provided url and adds it to this SourceConfig. Returns the SubtitleTrack that was added.
fun addSubtitleTrack(url: String?, label: String?, id: String, isDefault: Boolean, language: String?): SubtitleTrack
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.
describeContentsabstract fun describeContents(): Int
getDrmConfigfun getDrmConfig(uuid: UUID): DrmConfig?
Returns the DrmConfig if the uuid matches the config in this SourceConfig.
setPosterImagefun setPosterImage(url: String, keepPersistent: Boolean = false)
Sets the poster image and its persistent state for this SourceConfig.
setThumbnailTrackfun setThumbnailTrack(url: String?)
Generates a ThumbnailTrack with the provided url and sets it on this SourceConfig.
toStringopen override fun toString(): String
writeToParcelopen override fun writeToParcel(dest: Parcel, flags: Int)