@flowplayer/player 3.23.0 → 3.24.0-rc.1

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 (50) hide show
  1. package/core/events.js +148 -74
  2. package/core.js +1 -1
  3. package/default.js +1 -1
  4. package/embed.js +2 -2
  5. package/index.d.ts +7 -37
  6. package/package.json +3 -2
  7. package/plugins/ads.d.ts +12 -42
  8. package/plugins/ads.js +2 -2
  9. package/plugins/airplay.d.ts +7 -42
  10. package/plugins/analytics.d.ts +7 -42
  11. package/plugins/analytics.js +1 -1
  12. package/plugins/asel.d.ts +7 -42
  13. package/plugins/audio.d.ts +7 -42
  14. package/plugins/chapters.d.ts +7 -42
  15. package/plugins/chromecast.d.ts +7 -42
  16. package/plugins/comscore.d.ts +7 -42
  17. package/plugins/consent.d.ts +7 -42
  18. package/plugins/context-menu.d.ts +7 -42
  19. package/plugins/cuepoints.d.ts +7 -42
  20. package/plugins/dash.d.ts +7 -42
  21. package/plugins/drm.d.ts +69 -8
  22. package/plugins/endscreen.d.ts +7 -42
  23. package/plugins/fas.d.ts +7 -42
  24. package/plugins/float-on-scroll.d.ts +7 -42
  25. package/plugins/ga4.d.ts +7 -42
  26. package/plugins/gemius.d.ts +7 -42
  27. package/plugins/google-analytics.d.ts +7 -42
  28. package/plugins/hls.d.ts +7 -42
  29. package/plugins/id3.d.ts +7 -42
  30. package/plugins/iframe.d.ts +7 -42
  31. package/plugins/keyboard.d.ts +7 -42
  32. package/plugins/media-session.d.ts +7 -42
  33. package/plugins/message.d.ts +7 -42
  34. package/plugins/ovp.d.ts +7 -42
  35. package/plugins/playlist.d.ts +94 -43
  36. package/plugins/preview.d.ts +7 -42
  37. package/plugins/qsel.d.ts +7 -42
  38. package/plugins/qul.d.ts +7 -42
  39. package/plugins/rts.d.ts +7 -42
  40. package/plugins/share.d.ts +7 -42
  41. package/plugins/speed.d.ts +7 -42
  42. package/plugins/ssai.d.ts +7 -42
  43. package/plugins/ssai.js +1 -1
  44. package/plugins/subtitles.d.ts +10 -42
  45. package/plugins/thumbnails.d.ts +7 -42
  46. package/plugins/tizen.d.ts +7 -42
  47. package/plugins/vtsel.d.ts +7 -42
  48. package/plugins/webos.d.ts +7 -42
  49. package/util/loader.d.ts +7 -42
  50. package/util/loader.js +9 -8
package/plugins/id3.d.ts CHANGED
@@ -3,8 +3,6 @@
3
3
  import type { BitrateInfo } from 'dashjs';
4
4
  import type { Get } from 'type-fest';
5
5
  import type { Level } from 'hls.js';
6
- import type { MediaKeyFunc } from 'hls.js';
7
- import type { SetFieldType } from 'type-fest';
8
6
  import type { TupleToUnion } from 'type-fest';
9
7
 
10
8
  /* Excluded from this release type: AnyLoader */
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
262
260
 
263
261
  declare const DISABLED = "is-disabled";
264
262
 
265
- /**
266
- * @public
267
- */
268
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
269
-
270
- /**
271
- * @public
272
- */
273
- declare type DRMConfiguration = {
274
- license_server: string;
275
- http_headers?: Record<string, string>;
276
- certificate?: string;
277
- vendor?: string | DRMVendorImplementation;
278
- request_media_key_system_access_function?: MediaKeyFunc;
279
- query_params?: Record<string, string>;
280
- };
281
-
282
- /**
283
- * @public
284
- */
285
- declare type DRMSourceConfiguration = {
286
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
287
- };
288
-
289
- /**
290
- * @public
291
- */
292
- declare type DRMVendorImplementation = {
293
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
294
- fairplay_request_license: (url: string, params: {
295
- message: any;
296
- assetId: string;
297
- }, cb: (license_data: Uint8Array) => void) => void;
298
- };
299
-
300
263
  /**
301
264
  * @public
302
265
  */
@@ -529,13 +492,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
529
492
  * @param selector - query selector of the HTML element where player will render
530
493
  * @param config - Configuration of the flowplayer and the attached plugins
531
494
  */
532
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
495
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
533
496
  /**
534
497
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
535
498
  * @param element - HTML element where player will render
536
499
  * @param config - Configuration of the flowplayer and the attached plugins
537
500
  */
538
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
501
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
539
502
  }
540
503
 
541
504
  /**
@@ -1218,6 +1181,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1218
1181
  */
1219
1182
  declare type PlayerWith<T> = T & Player;
1220
1183
 
1184
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1185
+ opts: PluginConfig;
1186
+ setOpts: (config: PluginConfig) => void;
1187
+ };
1188
+
1221
1189
  declare const PLAYING = "is-playing";
1222
1190
 
1223
1191
  /**
@@ -1546,7 +1514,6 @@ declare type SourceObj<T = unknown> = {
1546
1514
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1547
1515
  */
1548
1516
  type?: string;
1549
- drm?: DRMSourceConfiguration;
1550
1517
  } & T;
1551
1518
 
1552
1519
  /**
@@ -1770,6 +1737,4 @@ declare const WILL_PLAY = "will-play";
1770
1737
 
1771
1738
  declare const WILL_SEEK = "will-seek";
1772
1739
 
1773
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1774
-
1775
1740
  export { }
@@ -3,8 +3,6 @@
3
3
  import type { BitrateInfo } from 'dashjs';
4
4
  import type { Get } from 'type-fest';
5
5
  import type { Level } from 'hls.js';
6
- import type { MediaKeyFunc } from 'hls.js';
7
- import type { SetFieldType } from 'type-fest';
8
6
  import type { TupleToUnion } from 'type-fest';
9
7
 
10
8
  /* Excluded from this release type: AnyLoader */
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
262
260
 
263
261
  declare const DISABLED = "is-disabled";
264
262
 
265
- /**
266
- * @public
267
- */
268
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
269
-
270
- /**
271
- * @public
272
- */
273
- declare type DRMConfiguration = {
274
- license_server: string;
275
- http_headers?: Record<string, string>;
276
- certificate?: string;
277
- vendor?: string | DRMVendorImplementation;
278
- request_media_key_system_access_function?: MediaKeyFunc;
279
- query_params?: Record<string, string>;
280
- };
281
-
282
- /**
283
- * @public
284
- */
285
- declare type DRMSourceConfiguration = {
286
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
287
- };
288
-
289
- /**
290
- * @public
291
- */
292
- declare type DRMVendorImplementation = {
293
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
294
- fairplay_request_license: (url: string, params: {
295
- message: any;
296
- assetId: string;
297
- }, cb: (license_data: Uint8Array) => void) => void;
298
- };
299
-
300
263
  /**
301
264
  * @public
302
265
  */
@@ -523,13 +486,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
523
486
  * @param selector - query selector of the HTML element where player will render
524
487
  * @param config - Configuration of the flowplayer and the attached plugins
525
488
  */
526
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
489
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
527
490
  /**
528
491
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
529
492
  * @param element - HTML element where player will render
530
493
  * @param config - Configuration of the flowplayer and the attached plugins
531
494
  */
532
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
495
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
533
496
  }
534
497
 
535
498
  /**
@@ -1153,6 +1116,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1153
1116
  */
1154
1117
  declare type PlayerWith<T> = T & Player;
1155
1118
 
1119
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1120
+ opts: PluginConfig;
1121
+ setOpts: (config: PluginConfig) => void;
1122
+ };
1123
+
1156
1124
  declare const PLAYING = "is-playing";
1157
1125
 
1158
1126
  /**
@@ -1481,7 +1449,6 @@ declare type SourceObj<T = unknown> = {
1481
1449
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1482
1450
  */
1483
1451
  type?: string;
1484
- drm?: DRMSourceConfiguration;
1485
1452
  } & T;
1486
1453
 
1487
1454
  /**
@@ -1705,6 +1672,4 @@ declare const WILL_PLAY = "will-play";
1705
1672
 
1706
1673
  declare const WILL_SEEK = "will-seek";
1707
1674
 
1708
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1709
-
1710
1675
  export { }
@@ -3,8 +3,6 @@
3
3
  import type { BitrateInfo } from 'dashjs';
4
4
  import type { Get } from 'type-fest';
5
5
  import type { Level } from 'hls.js';
6
- import type { MediaKeyFunc } from 'hls.js';
7
- import type { SetFieldType } from 'type-fest';
8
6
  import type { TupleToUnion } from 'type-fest';
9
7
 
10
8
  /* Excluded from this release type: AnyLoader */
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
262
260
 
263
261
  declare const DISABLED = "is-disabled";
264
262
 
265
- /**
266
- * @public
267
- */
268
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
269
-
270
- /**
271
- * @public
272
- */
273
- declare type DRMConfiguration = {
274
- license_server: string;
275
- http_headers?: Record<string, string>;
276
- certificate?: string;
277
- vendor?: string | DRMVendorImplementation;
278
- request_media_key_system_access_function?: MediaKeyFunc;
279
- query_params?: Record<string, string>;
280
- };
281
-
282
- /**
283
- * @public
284
- */
285
- declare type DRMSourceConfiguration = {
286
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
287
- };
288
-
289
- /**
290
- * @public
291
- */
292
- declare type DRMVendorImplementation = {
293
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
294
- fairplay_request_license: (url: string, params: {
295
- message: any;
296
- assetId: string;
297
- }, cb: (license_data: Uint8Array) => void) => void;
298
- };
299
-
300
263
  /**
301
264
  * @public
302
265
  */
@@ -523,13 +486,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
523
486
  * @param selector - query selector of the HTML element where player will render
524
487
  * @param config - Configuration of the flowplayer and the attached plugins
525
488
  */
526
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
489
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
527
490
  /**
528
491
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
529
492
  * @param element - HTML element where player will render
530
493
  * @param config - Configuration of the flowplayer and the attached plugins
531
494
  */
532
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
495
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
533
496
  }
534
497
 
535
498
  /**
@@ -1152,6 +1115,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1152
1115
  */
1153
1116
  declare type PlayerWith<T> = T & Player;
1154
1117
 
1118
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1119
+ opts: PluginConfig;
1120
+ setOpts: (config: PluginConfig) => void;
1121
+ };
1122
+
1155
1123
  declare const PLAYING = "is-playing";
1156
1124
 
1157
1125
  /**
@@ -1480,7 +1448,6 @@ declare type SourceObj<T = unknown> = {
1480
1448
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1481
1449
  */
1482
1450
  type?: string;
1483
- drm?: DRMSourceConfiguration;
1484
1451
  } & T;
1485
1452
 
1486
1453
  /**
@@ -1704,6 +1671,4 @@ declare const WILL_PLAY = "will-play";
1704
1671
 
1705
1672
  declare const WILL_SEEK = "will-seek";
1706
1673
 
1707
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1708
-
1709
1674
  export { }
@@ -3,8 +3,6 @@
3
3
  import type { BitrateInfo } from 'dashjs';
4
4
  import type { Get } from 'type-fest';
5
5
  import type { Level } from 'hls.js';
6
- import type { MediaKeyFunc } from 'hls.js';
7
- import type { SetFieldType } from 'type-fest';
8
6
  import type { TupleToUnion } from 'type-fest';
9
7
 
10
8
  /* Excluded from this release type: AnyLoader */
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
262
260
 
263
261
  declare const DISABLED = "is-disabled";
264
262
 
265
- /**
266
- * @public
267
- */
268
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
269
-
270
- /**
271
- * @public
272
- */
273
- declare type DRMConfiguration = {
274
- license_server: string;
275
- http_headers?: Record<string, string>;
276
- certificate?: string;
277
- vendor?: string | DRMVendorImplementation;
278
- request_media_key_system_access_function?: MediaKeyFunc;
279
- query_params?: Record<string, string>;
280
- };
281
-
282
- /**
283
- * @public
284
- */
285
- declare type DRMSourceConfiguration = {
286
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
287
- };
288
-
289
- /**
290
- * @public
291
- */
292
- declare type DRMVendorImplementation = {
293
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
294
- fairplay_request_license: (url: string, params: {
295
- message: any;
296
- assetId: string;
297
- }, cb: (license_data: Uint8Array) => void) => void;
298
- };
299
-
300
263
  /**
301
264
  * @public
302
265
  */
@@ -523,13 +486,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
523
486
  * @param selector - query selector of the HTML element where player will render
524
487
  * @param config - Configuration of the flowplayer and the attached plugins
525
488
  */
526
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
489
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
527
490
  /**
528
491
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
529
492
  * @param element - HTML element where player will render
530
493
  * @param config - Configuration of the flowplayer and the attached plugins
531
494
  */
532
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
495
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
533
496
  }
534
497
 
535
498
  /**
@@ -1152,6 +1115,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1152
1115
  */
1153
1116
  declare type PlayerWith<T> = T & Player;
1154
1117
 
1118
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1119
+ opts: PluginConfig;
1120
+ setOpts: (config: PluginConfig) => void;
1121
+ };
1122
+
1155
1123
  declare const PLAYING = "is-playing";
1156
1124
 
1157
1125
  /**
@@ -1480,7 +1448,6 @@ declare type SourceObj<T = unknown> = {
1480
1448
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1481
1449
  */
1482
1450
  type?: string;
1483
- drm?: DRMSourceConfiguration;
1484
1451
  } & T;
1485
1452
 
1486
1453
  /**
@@ -1704,6 +1671,4 @@ declare const WILL_PLAY = "will-play";
1704
1671
 
1705
1672
  declare const WILL_SEEK = "will-seek";
1706
1673
 
1707
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1708
-
1709
1674
  export { }
@@ -3,8 +3,6 @@
3
3
  import type { BitrateInfo } from 'dashjs';
4
4
  import type { Get } from 'type-fest';
5
5
  import type { Level } from 'hls.js';
6
- import type { MediaKeyFunc } from 'hls.js';
7
- import type { SetFieldType } from 'type-fest';
8
6
  import type { TupleToUnion } from 'type-fest';
9
7
 
10
8
  /* Excluded from this release type: AnyLoader */
@@ -264,41 +262,6 @@ declare const DISABLED = "is-disabled";
264
262
 
265
263
  /* Excluded from this release type: DISMISS_MESSAGE */
266
264
 
267
- /**
268
- * @public
269
- */
270
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
271
-
272
- /**
273
- * @public
274
- */
275
- declare type DRMConfiguration = {
276
- license_server: string;
277
- http_headers?: Record<string, string>;
278
- certificate?: string;
279
- vendor?: string | DRMVendorImplementation;
280
- request_media_key_system_access_function?: MediaKeyFunc;
281
- query_params?: Record<string, string>;
282
- };
283
-
284
- /**
285
- * @public
286
- */
287
- declare type DRMSourceConfiguration = {
288
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
289
- };
290
-
291
- /**
292
- * @public
293
- */
294
- declare type DRMVendorImplementation = {
295
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
296
- fairplay_request_license: (url: string, params: {
297
- message: any;
298
- assetId: string;
299
- }, cb: (license_data: Uint8Array) => void) => void;
300
- };
301
-
302
265
  /**
303
266
  * @public
304
267
  */
@@ -531,13 +494,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
531
494
  * @param selector - query selector of the HTML element where player will render
532
495
  * @param config - Configuration of the flowplayer and the attached plugins
533
496
  */
534
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
497
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
535
498
  /**
536
499
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
537
500
  * @param element - HTML element where player will render
538
501
  * @param config - Configuration of the flowplayer and the attached plugins
539
502
  */
540
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
503
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
541
504
  }
542
505
 
543
506
  /**
@@ -1206,6 +1169,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1206
1169
  */
1207
1170
  declare type PlayerWith<T> = T & Player;
1208
1171
 
1172
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1173
+ opts: PluginConfig;
1174
+ setOpts: (config: PluginConfig) => void;
1175
+ };
1176
+
1209
1177
  declare const PLAYING = "is-playing";
1210
1178
 
1211
1179
  /**
@@ -1539,7 +1507,6 @@ declare type SourceObj<T = unknown> = {
1539
1507
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1540
1508
  */
1541
1509
  type?: string;
1542
- drm?: DRMSourceConfiguration;
1543
1510
  } & T;
1544
1511
 
1545
1512
  /**
@@ -1763,6 +1730,4 @@ declare const WILL_PLAY = "will-play";
1763
1730
 
1764
1731
  declare const WILL_SEEK = "will-seek";
1765
1732
 
1766
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1767
-
1768
1733
  export { }
package/plugins/ovp.d.ts CHANGED
@@ -3,8 +3,6 @@
3
3
  import type { BitrateInfo } from 'dashjs';
4
4
  import type { Get } from 'type-fest';
5
5
  import type { Level } from 'hls.js';
6
- import type { MediaKeyFunc } from 'hls.js';
7
- import type { SetFieldType } from 'type-fest';
8
6
  import type { TupleToUnion } from 'type-fest';
9
7
 
10
8
  /* Excluded from this release type: AnyLoader */
@@ -262,41 +260,6 @@ declare const DESTROYED = "is-destroyed";
262
260
 
263
261
  declare const DISABLED = "is-disabled";
264
262
 
265
- /**
266
- * @public
267
- */
268
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
269
-
270
- /**
271
- * @public
272
- */
273
- declare type DRMConfiguration = {
274
- license_server: string;
275
- http_headers?: Record<string, string>;
276
- certificate?: string;
277
- vendor?: string | DRMVendorImplementation;
278
- request_media_key_system_access_function?: MediaKeyFunc;
279
- query_params?: Record<string, string>;
280
- };
281
-
282
- /**
283
- * @public
284
- */
285
- declare type DRMSourceConfiguration = {
286
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
287
- };
288
-
289
- /**
290
- * @public
291
- */
292
- declare type DRMVendorImplementation = {
293
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
294
- fairplay_request_license: (url: string, params: {
295
- message: any;
296
- assetId: string;
297
- }, cb: (license_data: Uint8Array) => void) => void;
298
- };
299
-
300
263
  /**
301
264
  * @public
302
265
  */
@@ -540,13 +503,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
540
503
  * @param selector - query selector of the HTML element where player will render
541
504
  * @param config - Configuration of the flowplayer and the attached plugins
542
505
  */
543
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
506
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
544
507
  /**
545
508
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
546
509
  * @param element - HTML element where player will render
547
510
  * @param config - Configuration of the flowplayer and the attached plugins
548
511
  */
549
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
512
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
550
513
  }
551
514
 
552
515
  /**
@@ -1186,6 +1149,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1186
1149
  */
1187
1150
  declare type PlayerWith<T> = T & Player;
1188
1151
 
1152
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1153
+ opts: PluginConfig;
1154
+ setOpts: (config: PluginConfig) => void;
1155
+ };
1156
+
1189
1157
  declare const PLAYING = "is-playing";
1190
1158
 
1191
1159
  /**
@@ -1536,7 +1504,6 @@ declare type SourceObj<T = unknown> = {
1536
1504
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1537
1505
  */
1538
1506
  type?: string;
1539
- drm?: DRMSourceConfiguration;
1540
1507
  } & T;
1541
1508
 
1542
1509
  /**
@@ -1760,6 +1727,4 @@ declare const WILL_PLAY = "will-play";
1760
1727
 
1761
1728
  declare const WILL_SEEK = "will-seek";
1762
1729
 
1763
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1764
-
1765
1730
  export { }