Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
MediaPlayer.OnDrmConfigHelper
android.media.MediaPlayer.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
void
|
onDrmConfig(MediaPlayer mp)
Called to give the app the opportunity to configure DRM before the session is created
|
Public methods
public abstract void onDrmConfig (MediaPlayer mp)
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaPlayer.OnDrmConfigHelper\n=============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaPlayer.OnDrmConfigHelper \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaPlayer.OnDrmConfigHelper\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------|\n| android.media.MediaPlayer.OnDrmConfigHelper |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition of a callback to be invoked when the app\ncan do DRM configuration (get/set properties) before the session\nis opened. This facilitates configuration of the properties, like\n'securityLevel', which has to be set after DRM scheme creation but\nbefore the DRM session is opened.\n\nThe only allowed DRM calls in this listener are `getDrmPropertyString`\nand `setDrmPropertyString`.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onDrmConfig](/reference/android/media/MediaPlayer.OnDrmConfigHelper#onDrmConfig(android.media.MediaPlayer))`(`[MediaPlayer](/reference/android/media/MediaPlayer)` mp) ` 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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onDrmConfig (MediaPlayer mp)\n```\n\nCalled to give the app the opportunity to configure DRM before the session is created\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------|-----------------------------------------------------------------------|\n| `mp` | `MediaPlayer`: the `MediaPlayer` associated with this callback \u003cbr /\u003e |"]]