我尝试在Android应用上使用drmtoday在exoplayer中阅读视频,但它无效。 我添加了关键请求属性的所有参数,但仍然无效。请帮我解决这个问题。
我试试这段代码:
String uri = "https://origin.cdn.afrostream.net/vod/24hourlovebis/d4eed726882a4be3-drm.ism/.mpd";
String extension = "mpd";
String name="WV: HDCP not specified";
UUID drmSchemeUuid= null;
try {
drmSchemeUuid = getDrmUuid("widevine");
// drmSchemeUuid = getDrmUuid("");
} catch (ParserException e) {
e.printStackTrace();
}
String drmLicenseUrl="https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/";
//String drmLicenseUrl="http://lic.staging.drmtoday.com/license-proxy-widevine/";
String[] drmKeyRequestProperties=null;
ArrayList<String> drmKeyRequestPropertiesList = new ArrayList<>();
JSONObject js=new JSONObject ();
try {
js.put("userId", "12345");
js.put("sessionId", "12345");
js.put("merchant", "afrostream");
}catch ( Exception ee)
{
ee.printStackTrace();
}
drmKeyRequestPropertiesList.add("dt-custom-data");
drmKeyRequestPropertiesList.add(js.toString());
drmKeyRequestProperties = drmKeyRequestPropertiesList.toArray(new String[0]);
Sample smp=new UriSample( name, drmSchemeUuid, drmLicenseUrl, drmKeyRequestProperties, false,uri,extension) ;
Intent nb=smp.buildIntent(getApplicationContext());
startActivity(nb);
答案 0 :(得分:0)