Skip to content

Player not parsing Clearkey license acquisition url. #10246

Closed

Description

@sr1990

ExoPlayer Version

2.17.1

Devices that reproduce the issue

Pixel 5

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

Added

      {
        "name": "CLEARKEY (cenc)",
        "uri": "https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p_ClearKey.mpd",
        "drm_scheme": "clearkey"
      },

to media.exolist.json.

Works if I specify the drm license uri

      {
        "name": "CLEARKEY (cenc)",
        "uri": "https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p_ClearKey.mpd",
        "drm_scheme": "clearkey",
        "drm_license_uri": "https://drm-clearkey-testvectors.axtest.net/AcquireLicense"
      },

Expected result

The media plays successfully.

Actual result

Playback crashes with the following error:
E/EventLogger: playerFailed [eventTime=4.38, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED

One workaround is
in DashManifestParser.java

  1. in parseContentProtection(),
  • add the case to parse clearkey
case "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":
          uuid = C.CLEARKEY_UUID;
          schemeType = "clearkey";
          break;
  • Parse the clearkey url in the same method
if (XmlPullParserUtil.isStartTag(xpp, "clearkey:Laurl")) {
        if (xpp.next() == XmlPullParser.TEXT) {
          licenseServerUrl = xpp.getText();
        }
 } 
  1. In parseAdaptationSet(), after line 416 while parsing the Content Protection, add
     } else if (XmlPullParserUtil.isStartTag(xpp, "ContentProtection")) {
        Pair<String, SchemeData> contentProtection = parseContentProtection(xpp);
        if (contentProtection.first != null) {
          drmSchemeType = contentProtection.first;
        }
        if (contentProtection.second != null) {
          if (drmSchemeType != null && drmSchemeType == "clearkey") {
            // update the license url of cenc
            for (int i = 0;i<drmSchemeDatas.size();i++) {
              if (drmSchemeDatas.get(i).uuid == C.COMMON_PSSH_UUID &&
                  drmSchemeDatas.get(i).licenseServerUrl == null)
                drmSchemeDatas.get(i).licenseServerUrl = contentProtection.second.licenseServerUrl;
            }
          }
          drmSchemeDatas.add(contentProtection.second);
        }

Please let me know what you think OR if I am missing anything.
Thanks.

Media

https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p_ClearKey.mpd

Bug Report

Activity

  1. changed the title [-]Player not parsing Clearkey license acquisition url string.[/-] [+]Player not parsing Clearkey license acquisition url.[/+] on May 7, 2022
  2. tonihei commented on May 13, 2022

    @tonihei
    Collaborator

    I think the content is configured as expected (see #3138 (comment) as a verification that both ContentProtection tags are expected, and Dash-Industry-Forum/dash.js#3343 for another example where parsing the license url is requested).

    And the proposed solution also looks sensible to me. Would you be willing to send a PR with the suggested changes?

    I'll mark the issue as an enhancement in the meantime (because it's not a bug, more a new feature to detect Clearkey LicenseURLs).

  3. self-assigned this
    on May 13, 2022
  4. tonihei commented on Jul 15, 2022

    @tonihei
    Collaborator

    This is now supported after merging a modified version of #10260.

  5. sr1990 commented on Jul 16, 2022

    @sr1990
    ContributorAuthor

    Thanks @tonihei !

  6. locked and limited conversation to collaborators on Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions