Constructor
new ContentProtection()
A set of functions for parsing and interpreting Protection elements.
- Source:
Members
licenseUrlParsers_ :Map.<string, function(!shaka.extern.xml.Node)>
A map of key system name to license server url parser.
Type:
- Map.<string, function(!shaka.extern.xml.Node)>
- Source:
Methods
convertElements_(elementsnon-null, keySystemsBySystemIdnon-null) → {Array.<shaka.extern.DrmInfo>}
Creates DrmInfo objects from an array of elements.
Parameters:
Name | Type | Description |
---|---|---|
elements |
Array.<!shaka.extern.xml.Node> | |
keySystemsBySystemId |
Object.<string, string> |
- Source:
Returns:
- Type
- Array.<shaka.extern.DrmInfo>
getInitDataFromPro_(elementnon-null, systemID, keyIdnullable) → {Array.<shaka.extern.InitDataOverride>}
Gets a initData from a protection element.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
element |
shaka.extern.xml.Node | ||
systemID |
string | ||
keyId |
string |
<nullable> |
- Source:
Returns:
- Type
- Array.<shaka.extern.InitDataOverride>
getPlayReadyKID_(elementnon-null) → {string}
Gets a PlayReady KID from a protection element
containing a PlayReady Header Object
Parameters:
Name | Type | Description |
---|---|---|
element |
shaka.extern.xml.Node |
- Source:
Returns:
- Type
- string
getPlayReadyLicenseUrl(elementnon-null) → {string}
Gets a PlayReady license URL from a protection element
containing a PlayReady Header Object
Parameters:
Name | Type | Description |
---|---|---|
element |
shaka.extern.xml.Node |
- Source:
Returns:
- Type
- string
parseFromProtection(elementsnon-null, keySystemsBySystemIdnon-null) → {Array.<shaka.extern.DrmInfo>}
Parses info from the Protection elements.
Parameters:
Name | Type | Description |
---|---|---|
elements |
Array.<!shaka.extern.xml.Node> | |
keySystemsBySystemId |
Object.<string, string> |
- Source:
Returns:
- Type
- Array.<shaka.extern.DrmInfo>