@srgssr/pillarbox-web 1.32.2 → 1.33.0

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.
@@ -11,6 +11,33 @@ declare class Drm {
11
11
  * @returns {import('./typedef').KeySystems} The resulting keySystems.
12
12
  */
13
13
  static buildKeySystems(drmList?: Array<import("../dataProvider/model/typedef").DrmMetadata>): import("./typedef").KeySystems;
14
+ /**
15
+ * Builds the configuration for Apple FairPlay.
16
+ *
17
+ * @param {import('../dataProvider/model/typedef').DrmMetadata} drmVendor the DRM metadata for FairPlay
18
+ *
19
+ * @returns {import('./typedef').KeySystemConfiguration} the FairPlay configuration
20
+ */
21
+ static buildFairplayConfig(drmVendor: import("../dataProvider/model/typedef").DrmMetadata): import("./typedef").KeySystemConfiguration;
22
+ /**
23
+ * Fetch a DRM license from a license server.
24
+ *
25
+ * _If required this logic can also be used for widevine/playready_
26
+ *
27
+ * @param {string} url the license server URL
28
+ * @param {ArrayBuffer} keyMessage the challenge generated by the browser's CDM
29
+ * @param {(function(Error|null, ArrayBuffer):void)} callback the callback provided by videojs-contrib-eme receives (err, key)
30
+ * @see https://github.com/videojs/videojs-contrib-eme/tree/main?tab=readme-ov-file#get-certificatecontent-idlicense-by-functions
31
+ */
32
+ static requestLicense(url: string, keyMessage: ArrayBuffer, callback: ((arg0: Error | null, arg1: ArrayBuffer) => void)): Promise<void>;
33
+ /**
34
+ * Parses the error response from the license server.
35
+ *
36
+ * @param {Response} response the fetch response object
37
+ *
38
+ * @returns {Promise<string>} the formatted error message
39
+ */
40
+ static parseLicenseError(response: Response): Promise<string>;
14
41
  /**
15
42
  * Check if some of the resources have DRM.
16
43
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Drm.d.ts","sourceRoot":"","sources":["../../../../src/utils/Drm.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IACE;;;;;;OAMG;IACH,iCAJW,KAAK,CAAE,OAAO,+BAA+B,EAAE,WAAW,CAAC,GAEzD,OAAO,WAAW,EAAE,UAAU,CAwB1C;IAED;;;;;;OAMG;IACH,yBAJW,KAAK,CAAE,OAAO,+BAA+B,EAAE,YAAY,CAAC,GAE1D,OAAO,CAInB;IAED;;OAEG;IACH;;;;MAEC;CACF"}
1
+ {"version":3,"file":"Drm.d.ts","sourceRoot":"","sources":["../../../../src/utils/Drm.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IACE;;;;;;OAMG;IACH,iCAJW,KAAK,CAAE,OAAO,+BAA+B,EAAE,WAAW,CAAC,GAEzD,OAAO,WAAW,EAAE,UAAU,CAkB1C;IAED;;;;;;OAMG;IACH,sCAJW,OAAO,+BAA+B,EAAE,WAAW,GAEjD,OAAO,WAAW,EAAE,sBAAsB,CActD;IAED;;;;;;;;;OASG;IACH,2BALW,MAAM,cACN,WAAW,YACX,CAAC,CAAS,IAAU,EAAV,KAAK,GAAC,IAAI,EAAE,IAAW,EAAX,WAAW,KAAE,IAAI,CAAC,iBAqBlD;IAED;;;;;;OAMG;IACH,mCAJW,QAAQ,GAEN,OAAO,CAAC,MAAM,CAAC,CAY3B;IAED;;;;;;OAMG;IACH,yBAJW,KAAK,CAAE,OAAO,+BAA+B,EAAE,YAAY,CAAC,GAE1D,OAAO,CAInB;IAED;;OAEG;IACH;;;;MAEC;CACF"}
@@ -1,17 +1,32 @@
1
1
  /**
2
- * Represents the result of building key systems.
2
+ * The specific DRM vendor keys supported by the player.
3
3
  */
4
- export interface KeySystems {
4
+ export type DrmVendorKey = 'com.widevine.alpha' | 'com.apple.fps.1_0' | 'com.microsoft.playready';
5
+ /**
6
+ * Represents the configuration for a specific DRM system used by videojs-contrib-eme.
7
+ */
8
+ export type KeySystemConfiguration = {
9
+ /**
10
+ * The license URL.
11
+ */
12
+ url?: string;
13
+ /**
14
+ * The certificate URI.
15
+ */
16
+ certificateUri?: string;
17
+ /**
18
+ * Function to extract the content ID.
19
+ */
20
+ getContentId?: (emeOptions: any, contentId: string) => string;
5
21
  /**
6
- * A mapping of DRM types to their corresponding key systems information.
7
- * For "FAIRPLAY" type, it includes a structure with certificate and license URIs;
8
- * for other types, it's a string representing the license URL.
22
+ * Asynchronous function to retrieve the license for the DRM system.
9
23
  */
10
- keySystems: {
11
- [x: string]: {
12
- certificateUri: string;
13
- licenseUri: string;
14
- } | string;
15
- };
16
- }
24
+ getLicense?: Function;
25
+ };
26
+ /**
27
+ * Dictionary of DRM configurations mapped by specific vendor keys.
28
+ */
29
+ export type KeySystems = {
30
+ [vendor in DrmVendorKey]?: KeySystemConfiguration;
31
+ };
17
32
  //# sourceMappingURL=typedef.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../../../src/utils/typedef.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,UAAU,EAAE;QACV,CAAC,CAAC,EAAE,MAAM,GAAG;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,UAAU,EAAE,MAAM,CAAC;SACpB,GAAG,MAAM,CAAC;KACZ,CAAC;CACH"}
1
+ {"version":3,"file":"typedef.d.ts","sourceRoot":"","sources":["../../../../src/utils/typedef.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,yBAAyB,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;KACtB,MAAM,IAAI,YAAY,CAAC,CAAC,EAAE,sBAAsB;CAClD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@srgssr/pillarbox-web",
3
3
  "description": "Pillarbox is the modern SRG SSR player",
4
- "version": "1.32.2",
4
+ "version": "1.33.0",
5
5
  "type": "module",
6
6
  "module": "dist/pillarbox.es.js",
7
7
  "main": "dist/pillarbox.cjs",
@@ -91,7 +91,7 @@
91
91
  "stylelint-config-rational-order": "^0.1.2",
92
92
  "stylelint-order": "^6.0.4",
93
93
  "typescript": "^5.3.3",
94
- "video.js": "8.21.0",
94
+ "video.js": "8.23.7",
95
95
  "vite": "^7.1.9"
96
96
  },
97
97
  "dependencies": {