mirror of
https://github.com/androidx/media.git
synced 2025-05-21 23:56:32 +08:00
Support setting properties on MediaDrm
This commit is contained in:
parent
5ca5df0bb2
commit
1469f11aa3
@ -213,6 +213,18 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
|
||||
return mediaDrm.getPropertyString(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides access to {@link MediaDrm#setPropertyString(String, String)}.
|
||||
* <p>
|
||||
* This method may be called when the manager is in any state.
|
||||
*
|
||||
* @param key The property to write.
|
||||
* @param value The value to write.
|
||||
*/
|
||||
public final void setPropertyString(String key, String value) {
|
||||
mediaDrm.setPropertyString(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides access to {@link MediaDrm#getPropertyByteArray(String)}.
|
||||
* <p>
|
||||
@ -225,6 +237,18 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
|
||||
return mediaDrm.getPropertyByteArray(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides access to {@link MediaDrm#setPropertyByteArray(String, byte[])}.
|
||||
* <p>
|
||||
* This method may be called when the manager is in any state.
|
||||
*
|
||||
* @param key The property to write.
|
||||
* @param value The value to write.
|
||||
*/
|
||||
public final void setPropertyByteArray(String key, byte[] value) {
|
||||
mediaDrm.setPropertyByteArray(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open(DrmInitData drmInitData) {
|
||||
if (++openCount != 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user