Udostępnij za pośrednictwem


MediaCrypto.SetMediaDrmSession(Byte[]) Method

Definition

Associate a new MediaDrm session with this MediaCrypto instance.

[Android.Runtime.Register("setMediaDrmSession", "([B)V", "", ApiSince=23)]
public void SetMediaDrmSession (byte[] sessionId);
[<Android.Runtime.Register("setMediaDrmSession", "([B)V", "", ApiSince=23)>]
member this.SetMediaDrmSession : byte[] -> unit

Parameters

sessionId
Byte[]

The MediaDrm sessionId to associate with this MediaCrypto instance. The session's scheme must match the scheme UUID used when constructing this MediaCrypto instance.

Attributes

Remarks

Associate a new MediaDrm session with this MediaCrypto instance.

The MediaDrm session is used to securely load decryption keys for a crypto scheme. The crypto keys loaded through the MediaDrm session may be selected for use during the decryption operation performed by android.media.MediaCodec#queueSecureInputBuffer by specifying their key IDs in the android.media.MediaCodec.CryptoInfo#key field.

Java documentation for android.media.MediaCrypto.setMediaDrmSession(byte[]).

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.

Applies to