【问题标题】:Android exoplayer with drmtodayAndroid exoplayer 与 drmtoday
【发布时间】: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


【解决方案1】:

快速查看似乎缺少assetID 和variantId 信息。

【讨论】:

  • 虽然这可能是解决问题的宝贵提示,但一个好的答案也可以证明解决方案。请edit 提供示例代码来说明您的意思。或者,考虑将其写为评论。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-03-30
  • 1970-01-01
  • 1970-01-01
  • 2015-12-25
  • 2016-08-20
  • 2016-11-11
相关资源
最近更新 更多