Added in API level 24

DrmInitData


abstract class DrmInitData
kotlin.Any
   ↳ android.media.DrmInitData

Encapsulates initialization data required by a MediaDrm instance.

Summary

Nested classes

Scheme initialization data.

Public methods
abstract DrmInitData.SchemeInitData!
get(schemeUuid: UUID!)

Retrieves initialization data for a given DRM scheme, specified by its UUID.

open DrmInitData.SchemeInitData

Returns the SchemeInitData with the given index.

open Int

Returns the number of SchemeInitData elements available through getSchemeInitDataAt.

Public methods

get

Added in API level 24
Deprecated in API level 30
abstract fun get(schemeUuid: UUID!): DrmInitData.SchemeInitData!

Deprecated: Use getSchemeInitDataCount and getSchemeInitDataAt instead.

Retrieves initialization data for a given DRM scheme, specified by its UUID.

Parameters
schemeUuid UUID!: The DRM scheme's UUID.
Return
DrmInitData.SchemeInitData! The initialization data for the scheme, or null if the scheme is not supported.

getSchemeInitDataAt

Added in API level 30
open fun getSchemeInitDataAt(index: Int): DrmInitData.SchemeInitData

Returns the SchemeInitData with the given index.

Parameters
index Int: The index of the SchemeInitData to return.
Return
DrmInitData.SchemeInitData The SchemeInitData associated with the given index. This value cannot be null.
Exceptions
java.lang.IndexOutOfBoundsException If the given index is negative or greater than getSchemeInitDataCount- 1.

getSchemeInitDataCount

Added in API level 30
open fun getSchemeInitDataCount(): Int

Returns the number of SchemeInitData elements available through getSchemeInitDataAt.