MediaPlayer.PrepareDrm(UUID) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prepares the DRM for the current source
[Android.Runtime.Register("prepareDrm", "(Ljava/util/UUID;)V", "GetPrepareDrm_Ljava_util_UUID_Handler", ApiSince=26)]
public virtual void PrepareDrm (Java.Util.UUID uuid);
[<Android.Runtime.Register("prepareDrm", "(Ljava/util/UUID;)V", "GetPrepareDrm_Ljava_util_UUID_Handler", ApiSince=26)>]
abstract member PrepareDrm : Java.Util.UUID -> unit
override this.PrepareDrm : Java.Util.UUID -> unit
Parameters
- uuid
- UUID
The UUID of the crypto scheme. If not known beforehand, it can be retrieved
from the source through getDrmInfo
or registering a onDrmInfoListener
.
- Attributes
Remarks
Prepares the DRM for the current source
If OnDrmConfigHelper
is registered, it will be called during preparation to allow configuration of the DRM properties before opening the DRM session. Note that the callback is called synchronously in the thread that called prepareDrm
. It should be used only for a series of getDrmPropertyString
and setDrmPropertyString
calls and refrain from any lengthy operation.
If the device has not been provisioned before, this call also provisions the device which involves accessing the provisioning server and can take a variable time to complete depending on the network connectivity. If OnDrmPreparedListener
is registered, prepareDrm() runs in non-blocking mode by launching the provisioning in the background and returning. The listener will be called when provisioning and preparation has finished. If a OnDrmPreparedListener
is not registered, prepareDrm() waits till provisioning and preparation has finished, i.e., runs in blocking mode.
If OnDrmPreparedListener
is registered, it is called to indicate the DRM session being ready. The application should not make any assumption about its call sequence (e.g., before or after prepareDrm returns), or the thread context that will execute the listener (unless the listener is registered with a handler thread).
Java documentation for android.media.MediaPlayer.prepareDrm(java.util.UUID)
.
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.