DrmInitData
@UnstableApi
class DrmInitData : Comparator, Parcelable
Initialization data for one or more DRM schemes.
Summary
Nested types |
|---|
class DrmInitData.SchemeData : ParcelableScheme initialization data. |
Constants |
|
|---|---|
const Parcelable.Creator<DrmInitData!>! |
Public constructors |
|---|
DrmInitData(schemeDatas: Array<DrmInitData.SchemeData!>!) |
DrmInitData(schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!) |
DrmInitData( |
DrmInitData( |
Public functions |
|
|---|---|
Int |
compare(first: DrmInitData.SchemeData!, second: DrmInitData.SchemeData!) |
DrmInitData! |
copyWithSchemeType(schemeType: String?)Returns a copy with the specified protection scheme type. |
java-static DrmInitData? |
createSessionCreationData(Merges |
Int |
|
Boolean |
|
DrmInitData.SchemeData! |
Retrieves the |
Int |
hashCode() |
DrmInitData! |
merge(drmInitData: DrmInitData!)Returns an instance containing the |
Unit |
writeToParcel(dest: Parcel!, flags: Int) |
Public properties |
|
|---|---|
Int |
Number of |
String? |
The protection scheme type, or null if not applicable or unknown. |
Inherited functions |
||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
Public constructors
DrmInitData
DrmInitData(schemeDatas: Array<DrmInitData.SchemeData!>!)
| Parameters | |
|---|---|
schemeDatas: Array<DrmInitData.SchemeData!>! |
Scheme initialization data for possibly multiple DRM schemes. |
DrmInitData
DrmInitData(schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!)
| Parameters | |
|---|---|
schemeDatas: (Mutable)List<DrmInitData.SchemeData!>! |
Scheme initialization data for possibly multiple DRM schemes. |
DrmInitData
DrmInitData(
schemeType: String?,
schemeDatas: Array<DrmInitData.SchemeData!>!
)
| Parameters | |
|---|---|
schemeType: String? |
See |
schemeDatas: Array<DrmInitData.SchemeData!>! |
Scheme initialization data for possibly multiple DRM schemes. |
DrmInitData
DrmInitData(
schemeType: String?,
schemeDatas: (Mutable)List<DrmInitData.SchemeData!>!
)
| Parameters | |
|---|---|
schemeType: String? |
See |
schemeDatas: (Mutable)List<DrmInitData.SchemeData!>! |
Scheme initialization data for possibly multiple DRM schemes. |
Public functions
copyWithSchemeType
fun copyWithSchemeType(schemeType: String?): DrmInitData!
Returns a copy with the specified protection scheme type.
| Parameters | |
|---|---|
schemeType: String? |
A protection scheme type. May be null. |
| Returns | |
|---|---|
DrmInitData! |
A copy with the specified protection scheme type. |
createSessionCreationData
java-static fun createSessionCreationData(
manifestData: DrmInitData?,
mediaData: DrmInitData?
): DrmInitData?
Merges DrmInitData obtained from a media manifest and a media stream.
The result is generated as follows.
- Include all
SchemeDatas frommanifestDatawherehasDatais true. - Include all
SchemeDatas inmediaDatawherehasDatais true and for which we did not include an entry from the manifest targeting the same UUID. - If available, the scheme type from the manifest is used. If not, the scheme type from the media is used.
| Parameters | |
|---|---|
manifestData: DrmInitData? |
DRM session acquisition data obtained from the manifest. |
mediaData: DrmInitData? |
DRM session acquisition data obtained from the media. |
| Returns | |
|---|---|
DrmInitData? |
A |
get
fun get(index: Int): DrmInitData.SchemeData!
Retrieves the SchemeData at a given index.
| Parameters | |
|---|---|
index: Int |
The index of the scheme to return. Must not exceed |
| Returns | |
|---|---|
DrmInitData.SchemeData! |
The |
merge
fun merge(drmInitData: DrmInitData!): DrmInitData!
Returns an instance containing the schemeDatas from both this and other. The schemeType of the instances being merged must either match, or at least one scheme type must be null.
| Parameters | |
|---|---|
drmInitData: DrmInitData! |
The instance to merge. |
| Returns | |
|---|---|
DrmInitData! |
The merged result. |
Public properties
schemeType
val schemeType: String?
The protection scheme type, or null if not applicable or unknown.