new DrmSupport()
A component that provides DRM support detection.
- Source
Extends
- Component
Members
(static) DRM_CONFIG
Returns static DRM configuration matrix.
Methods
(async) check(optionsopt) → {Promise.<Object>}
Checks DRM and HDCP capabilities.
| Name | Type | Attributes | Default | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | {} | configuration options Properties
|
- Source
object containing supported levels and HDCP per vendor
- Type:
- Promise.<Object>
player.drmSupport.check().then((results) => {
console.log('DRM Support Results:', results);
// Example output:
// {
// widevine: { level: 'L1', hdcp: '2.2' },
// playReady: null,
// fairPlay: null,
// clearKey: { level: 'Supported', hdcp: null }
// }
});player.drmSupport().check({
contentType: 'video/mp4; codecs="avc1.4d401e"',
initDataTypes: ['cenc', 'keyids']
}).then((results) => {
console.log('DRM Support Results:', results)
});(async) checkVendor(vendor, levels, initDataTypes, contentType) → {Promise.<({level: string, hdcp: (string|null)}|null)>}
Tests robustness levels and HDCP for specific DRM vendor.
| Name | Type | Description |
|---|---|---|
vendor | string | key system identifier |
levels | Array.<{robustness: string, label: string}> | array of robustness levels to test |
initDataTypes | Array.<string> | initialization data types |
contentType | string | video content type |
- Source
supported level and HDCP or null
- Type:
- Promise.<({level: string, hdcp: (string|null)}|null)>
(async) findMaxHdcp(mediaKeys) → {Promise.<(string|null)>}
Iterates through HDCP versions to find maximum supported version.
| Name | Type | Description |
|---|---|---|
mediaKeys | MediaKeys | instantiated MediaKeys object |
maximum usable HDCP version or null
- Type:
- Promise.<(string|null)>
pillarbox-web