@svta/cml-drm 1.1.9 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -11,5 +11,18 @@ npm i @svta/cml-drm
11
11
  ## Usage
12
12
 
13
13
  ```typescript
14
+ import { parsePsshList, W3C_CLEAR_KEY_UUID } from "@svta/cml-drm";
14
15
 
16
+ // A minimal pssh box: size, type, version and flags, system ID, data size.
17
+ const initData = new Uint8Array([
18
+ 0x00, 0x00, 0x00, 0x20, 0x70, 0x73, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00,
19
+ 0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2, 0x4d, 0x02, 0xac, 0xe3, 0x3c, 0x1e, 0x52, 0xe2, 0xfb, 0x4b,
20
+ 0x00, 0x00, 0x00, 0x00,
21
+ ]);
22
+
23
+ const psshList = parsePsshList(initData);
24
+ console.log(Object.keys(psshList));
25
+ // [ '1077efec-c0b2-4d02-ace3-3c1e52e2fb4b' ]
26
+ console.log(Object.keys(psshList)[0] === W3C_CLEAR_KEY_UUID);
27
+ // true
15
28
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svta/cml-drm",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Digital Rights Management (DRM) functionality",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -56,6 +56,6 @@
56
56
  "peerDependencies": {
57
57
  "@svta/cml-iso-bmff": "1.0.5",
58
58
  "@svta/cml-utils": "1.6.0",
59
- "@svta/cml-xml": "1.1.6"
59
+ "@svta/cml-xml": "1.2.0"
60
60
  }
61
61
  }