mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Parse ms:laurl from ContentProtection in DASH
Issue:#3393 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201694813
This commit is contained in:
parent
78d83304af
commit
b031c3d6bb
1 changed files with 9 additions and 3 deletions
|
|
@ -355,6 +355,7 @@ public class DashManifestParser extends DefaultHandler
|
|||
protected Pair<String, SchemeData> parseContentProtection(XmlPullParser xpp)
|
||||
throws XmlPullParserException, IOException {
|
||||
String schemeType = null;
|
||||
String licenseServerUrl = null;
|
||||
byte[] data = null;
|
||||
UUID uuid = null;
|
||||
boolean requiresSecureDecoder = false;
|
||||
|
|
@ -389,7 +390,9 @@ public class DashManifestParser extends DefaultHandler
|
|||
|
||||
do {
|
||||
xpp.next();
|
||||
if (XmlPullParserUtil.isStartTag(xpp, "widevine:license")) {
|
||||
if (XmlPullParserUtil.isStartTag(xpp, "ms:laurl")) {
|
||||
licenseServerUrl = xpp.getAttributeValue(null, "licenseUrl");
|
||||
} else if (XmlPullParserUtil.isStartTag(xpp, "widevine:license")) {
|
||||
String robustnessLevel = xpp.getAttributeValue(null, "robustness_level");
|
||||
requiresSecureDecoder = robustnessLevel != null && robustnessLevel.startsWith("HW");
|
||||
} else if (data == null) {
|
||||
|
|
@ -409,8 +412,11 @@ public class DashManifestParser extends DefaultHandler
|
|||
}
|
||||
}
|
||||
} while (!XmlPullParserUtil.isEndTag(xpp, "ContentProtection"));
|
||||
SchemeData schemeData = uuid != null
|
||||
? new SchemeData(uuid, MimeTypes.VIDEO_MP4, data, requiresSecureDecoder) : null;
|
||||
SchemeData schemeData =
|
||||
uuid != null
|
||||
? new SchemeData(
|
||||
uuid, licenseServerUrl, MimeTypes.VIDEO_MP4, data, requiresSecureDecoder)
|
||||
: null;
|
||||
return Pair.create(schemeType, schemeData);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue