MediaDrm MediaDrm Class

Definition

MediaDrm can be used to obtain keys for decrypting protected media streams, in conjunction with MediaCrypto.

[Android.Runtime.Register("android/media/MediaDrm", ApiSince=18, DoNotGenerateAcw=true)]
public sealed class MediaDrm : Java.Lang.Object
type MediaDrm = class
    inherit Object
Inheritance
MediaDrmMediaDrm
Attributes

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

MediaDrm(UUID) MediaDrm(UUID)

Instantiate a MediaDrm object

Fields

EventKeyExpired EventKeyExpired

This event type indicates that the licensed usage duration for keys in a session has expired.

EventKeyRequired EventKeyRequired

This event type indicates that the app needs to request keys from a license server.

EventProvisionRequired EventProvisionRequired

This event type indicates that the app needs to request a certificate from the provisioning server.

EventSessionReclaimed EventSessionReclaimed
EventVendorDefined EventVendorDefined

This event may indicate some specific vendor-defined condition, see your DRM provider documentation for details

KeyTypeOffline KeyTypeOffline

This key request type specifies that the keys will be for offline use, they will be saved to the device for use when the device is not connected to a network.

KeyTypeRelease KeyTypeRelease

This key request type specifies that previously saved offline keys should be released.

KeyTypeStreaming KeyTypeStreaming

This key request type species that the keys will be for online use, they will not be saved to the device for subsequent use when the device is not connected to a network.

PropertyAlgorithms PropertyAlgorithms

String property name: a comma-separated list of cipher and mac algorithms supported by CryptoSession.

PropertyDescription PropertyDescription

String property name: describes the DRM engine plugin

PropertyDeviceUniqueId PropertyDeviceUniqueId

Byte array property name: the device unique identifier is established during device provisioning and provides a means of uniquely identifying each device.

PropertyVendor PropertyVendor

String property name: identifies the maker of the DRM engine plugin

PropertyVersion PropertyVersion

String property name: identifies the version of the DRM engine plugin

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
SecureStops SecureStops

A means of enforcing limits on the number of concurrent streams per subscriber across devices is provided via SecureStop.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CloseSession(Byte[]) CloseSession(Byte[])

Close a session on the MediaDrm object that was previously opened with OpenSession().

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetCryptoSession(Byte[], String, String) GetCryptoSession(Byte[], String, String)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetKeyRequest(Byte[], Byte[], String, Int32, IDictionary<String,String>) GetKeyRequest(Byte[], Byte[], String, Int32, IDictionary<String,String>)
GetPropertyByteArray(String) GetPropertyByteArray(String)

Read a DRM engine plugin byte array property value, given the property name string.

GetPropertyString(String) GetPropertyString(String)

Read a DRM engine plugin String property value, given the property name string.

GetProvisionRequest() GetProvisionRequest()

A provision request/response exchange occurs between the app and a provisioning server to retrieve a device certificate.

GetSecureStop(Byte[]) GetSecureStop(Byte[])
IsCryptoSchemeSupported(UUID) IsCryptoSchemeSupported(UUID)

Query if the given scheme identified by its UUID is supported on this device.

IsCryptoSchemeSupported(UUID, String) IsCryptoSchemeSupported(UUID, String)

Query if the given scheme identified by its UUID is supported on this device, and whether the drm plugin is able to handle the media container format specified by mimeType.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
OpenSession() OpenSession()

Open a new session with the MediaDrm object.

ProvideKeyResponse(Byte[], Byte[]) ProvideKeyResponse(Byte[], Byte[])

A key response is received from the license server by the app, then it is provided to the DRM engine plugin using provideKeyResponse.

ProvideProvisionResponse(Byte[]) ProvideProvisionResponse(Byte[])

After a provision response is received by the app, it is provided to the DRM engine plugin using this method.

QueryKeyStatus(Byte[]) QueryKeyStatus(Byte[])

Request an informative description of the key status for the session.

Release() Release()
ReleaseAllSecureStops() ReleaseAllSecureStops()
ReleaseSecureStops(Byte[]) ReleaseSecureStops(Byte[])

Process the SecureStop server response message ssRelease.

RemoveKeys(Byte[]) RemoveKeys(Byte[])

Remove the current keys from a session.

RestoreKeys(Byte[], Byte[]) RestoreKeys(Byte[], Byte[])

Restore persisted offline keys into a new session. keySetId identifies the keys to load, obtained from a prior call to ProvideKeyResponse(Byte[], Byte[]).

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetOnEventListener(MediaDrm+IOnEventListener) SetOnEventListener(MediaDrm+IOnEventListener)

Register a callback to be invoked when an event occurs

SetOnExpirationUpdateListener(MediaDrm+IOnExpirationUpdateListener, Handler) SetOnExpirationUpdateListener(MediaDrm+IOnExpirationUpdateListener, Handler)
SetOnKeyStatusChangeListener(MediaDrm+IOnKeyStatusChangeListener, Handler) SetOnKeyStatusChangeListener(MediaDrm+IOnKeyStatusChangeListener, Handler)
SetPropertyByteArray(String, Byte[]) SetPropertyByteArray(String, Byte[])

Set a DRM engine plugin byte array property value.

SetPropertyString(String, String) SetPropertyString(String, String)

Set a DRM engine plugin String property value.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Events

MediaDrmEvent MediaDrmEvent

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to