Stay organized with collections
Save and categorize content based on your preferences.
OnDrmConfigHelper
interface OnDrmConfigHelper
Interface definition of a callback to be invoked when the app can do DRM configuration (get/set properties) before the session is opened. This facilitates configuration of the properties, like 'securityLevel', which has to be set after DRM scheme creation but before the DRM session is opened. The only allowed DRM calls in this listener are getDrmPropertyString
and setDrmPropertyString
.
Summary
Public methods |
abstract Unit |
Called to give the app the opportunity to configure DRM before the session is created
|
Public methods
onDrmConfig
abstract fun onDrmConfig(mp: MediaPlayer!): Unit
Called to give the app the opportunity to configure DRM before the session is created
Parameters |
mp |
MediaPlayer!: the MediaPlayer associated with this callback |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# MediaPlayer.OnDrmConfigHelper\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnDrmConfigHelper\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaPlayer.OnDrmConfigHelper \"View this page in Java\") \n\n```\ninterface OnDrmConfigHelper\n```\n\n|--------------------------------------------------|\n| [android.media.MediaPlayer.OnDrmConfigHelper](#) |\n\nInterface definition of a callback to be invoked when the app can do DRM configuration (get/set properties) before the session is opened. This facilitates configuration of the properties, like 'securityLevel', which has to be set after DRM scheme creation but before the DRM session is opened. The only allowed DRM calls in this listener are `getDrmPropertyString` and `setDrmPropertyString`.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDrmConfig](#onDrmConfig(android.media.MediaPlayer))`(`mp:` `[MediaPlayer](/reference/kotlin/android/media/MediaPlayer)!`)` Called to give the app the opportunity to configure DRM before the session is created |\n\nPublic methods\n--------------\n\n### onDrmConfig\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDrmConfig(mp: MediaPlayer!): Unit\n```\n\nCalled to give the app the opportunity to configure DRM before the session is created\n\n| Parameters ||\n|------|--------------------------------------------------------------------------------------------------------------|\n| `mp` | [MediaPlayer](/reference/kotlin/android/media/MediaPlayer)!: the `MediaPlayer` associated with this callback |"]]