【发布时间】:2017-01-12 01:58:17
【问题描述】:
我尝试在 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);
【问题讨论】:
-
“它不起作用” - 太笼统了.. 你应该解释你得到的结果是什么,以及预期的结果是什么。这将帮助人们确定问题所在。 stackoverflow.com/help/mcve
-
我的意思是视频没有出现在播放器上是行不通的
标签: exoplayer