How to instantiate a MediaDrm object

£可爱£侵袭症+ 提交于 2019-12-13 05:22:58

问题


I am using Nexus4 with Android 4.3, and I am try to use the new API public MediaDrm (UUID uuid), but I only can got the following exception:UnsupportedSchemeException.

The exception looks which arise from UUID is incorrect.

I've tried to use the UUID which is converted from deviceId, from network MAC address or from token which is sent from DRM server. all of I mentioned is incorrect.

Then is there anyone knows what is the correct way to get this UUID?

More info are in below:

Parameters:

uuid 

The UUID of the crypto scheme.

Thanks in advance.


回答1:


The UUID is a plugin identifiler, so please contact sansung.

The snip code as bellow comes from MediaDrmMockTest.java(try to use mock plugin)

static final UUID mockScheme = new UUID(0x0102030405060708L, 0x090a0b0c0d0e0f10L);



回答2:


This UUID parameter depends on which DRM scheme you would like to use. Each MediaDRM plugin defines its own UUID. If you take a look at the Mock DRM example, it is using 0102030405060708090a0b0c0d0e0f10



来源:https://stackoverflow.com/questions/18170252/how-to-instantiate-a-mediadrm-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!