我正在开发一个基于drm播放器的应用程序我能够获得drm信息但我不知道如何将drm集成到android本机播放器 为此,我正在使用
mVideoView =(VideoView)findViewById(R.id.Trailer_VV);
String android_id = Secure.getString(getContentResolver(),Secure.ANDROID_ID);
url = "https://s3-us-west-2.amazonaws.com/amgo/SECOND.wvm";
System.out.println("Print android_id " + android_id);
DrmInfoRequest request = new DrmInfoRequest(DrmInfoRequest. TYPE_REGISTRATION_INFO, "video/wvm");
request.put("WVDRMServerKey", "http://widevine.ezdrm.com/widevine/cypherpc/cgi-bin/GetEMMs-ezdrm.cgi");
request.put("WVAssetURIKey", "https://s3-us-west-2.amazonaws.com/amgo/SECOND.wvm");
request.put("WVDeviceIDKey", "movidone");
request.put("WVPortalKey", "movidone");
request.put("WVCAUserDataKey", "ezE7B1D1");
client = new DrmManagerClient(VideoViewActivity.this);
client.acquireRights(request);
DrmInfo response = client.acquireDrmInfo(request);
if (response != null) {
System.out.println("DrmInfo " + response.getMimeType().toString());
//System.out.println("DrmInfo " + response.getData());
String drmInfoReqStatusKey = (String)response.get("WVDrmInfoRequestStatusKey");
if (null != drmInfoReqStatusKey && !drmInfoReqStatusKey.equals("")) {
long mWVDrmInfoReqStatusKey = Long.parseLong(drmInfoReqStatusKey);
System.out.println("mWVDrmInfoReqStatusKey: "+mWVDrmInfoReqStatusKey);
}
String mPluginVersion = (String)response.get("WVDrmInfoRequestVersionKey");
System.out.println("mPluginVersion: "+mPluginVersion);
} else {
System.out.println("no result");
}
mVideoView.setVideoURI(Uri.parse(url));
mVideoView.start();