@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
@@ -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
  */
@@ -539,13 +502,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
539
502
  * @param selector - query selector of the HTML element where player will render
540
503
  * @param config - Configuration of the flowplayer and the attached plugins
541
504
  */
542
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
505
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
543
506
  /**
544
507
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
545
508
  * @param element - HTML element where player will render
546
509
  * @param config - Configuration of the flowplayer and the attached plugins
547
510
  */
548
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
511
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
549
512
  }
550
513
 
551
514
  /**
@@ -605,6 +568,53 @@ declare type HasSrcExtensions<PluginBareConfigs extends unknown[]> = TupleToUnio
605
568
 
606
569
  declare const HOVERED = "is-hovered";
607
570
 
571
+ /**
572
+ * @public
573
+ * Defines the attributes for HTML track elements.
574
+ */
575
+ declare type HTMLTrackAttributes = {
576
+ /**
577
+ * WebVTT file URL.
578
+ * The URL for the WebVTT file.
579
+ */
580
+ src: string;
581
+ /**
582
+ * The language of the subtitle (2 letter BCP47 code).
583
+ * The language of the subtitle.
584
+ */
585
+ lang?: string;
586
+ /**
587
+ * Label to show in the menu.
588
+ * Mandatory label to show in the menu.
589
+ */
590
+ label?: string;
591
+ /**
592
+ * Adds a crossorigin attribute to the element.
593
+ * Possible values: 'use-credentials', 'anonymous'.
594
+ */
595
+ crossorigin?: string | null;
596
+ /**
597
+ * Defines which track to show as default.
598
+ * One per tracks array. If set, this track will be on at player start.
599
+ */
600
+ default?: boolean;
601
+ /**
602
+ * Possible options: 'captions', 'subtitles', 'descriptions'.
603
+ * The kind of track.
604
+ */
605
+ kind?: "captions" | "chapters" | "subtitles";
606
+ /**
607
+ * The mode of the track.
608
+ * Possible options: 'hidden', 'showing', 'disabled'.
609
+ */
610
+ mode?: "hidden" | "showing" | "disabled";
611
+ /**
612
+ * The ID of the subtitle.
613
+ * The unique identifier for the subtitle track.
614
+ */
615
+ id?: string;
616
+ };
617
+
608
618
  declare const IN_VIEWPORT = "is-in-viewport";
609
619
 
610
620
  /* Excluded from this release type: INTERSECTIONCHANGE */
@@ -1168,6 +1178,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1168
1178
  */
1169
1179
  declare type PlayerWith<T> = T & Player;
1170
1180
 
1181
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1182
+ opts: PluginConfig;
1183
+ setOpts: (config: PluginConfig) => void;
1184
+ };
1185
+
1171
1186
  declare const PLAYING = "is-playing";
1172
1187
 
1173
1188
  /**
@@ -1217,6 +1232,9 @@ export declare type PlaylistAPI = {
1217
1232
  */
1218
1233
  export declare type PlaylistConfig = ConfigWith<{
1219
1234
  src: UnsafeSource<PlaylistSource>;
1235
+ /**
1236
+ * Playlist plugin configuration
1237
+ */
1220
1238
  playlist?: PlaylistProperties;
1221
1239
  }>;
1222
1240
 
@@ -1268,6 +1286,12 @@ export declare type PlaylistPlayer = PlayerWith<{
1268
1286
  on(name: PlaylistEvents["PLAYLIST_ENDED"], handler: (e: PlaylistEndedEvent) => void): PlaylistPlayer;
1269
1287
  /* Excluded from this release type: skip_controls */
1270
1288
  /* Excluded from this release type: on */
1289
+ /* Excluded from this release type: emit */
1290
+ /* Excluded from this release type: emit */
1291
+ /* Excluded from this release type: emit */
1292
+ /* Excluded from this release type: emit */
1293
+ /* Excluded from this release type: on */
1294
+ /* Excluded from this release type: on */
1271
1295
  }>;
1272
1296
 
1273
1297
  /**
@@ -1350,8 +1374,11 @@ export declare type PlaylistReadyEvent = FPEvent<PlaylistReadyEventDetail>;
1350
1374
  */
1351
1375
  export declare type PlaylistReadyEventDetail = {
1352
1376
  queue: VideoQueue;
1377
+ /* Excluded from this release type: should_play */
1353
1378
  };
1354
1379
 
1380
+ /* Excluded from this release type: PlaylistRemoveDetail */
1381
+
1355
1382
  /**
1356
1383
  * @public
1357
1384
  */
@@ -1477,7 +1504,7 @@ declare enum QualityOpts {
1477
1504
  /**
1478
1505
  * @public
1479
1506
  */
1480
- export declare type QueueMembers = Array<Config>;
1507
+ export declare type QueueMembers = Array<SubtitlesConfig>;
1481
1508
 
1482
1509
  /**
1483
1510
  * @public
@@ -1694,7 +1721,6 @@ declare type SourceObj<T = unknown> = {
1694
1721
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1695
1722
  */
1696
1723
  type?: string;
1697
- drm?: DRMSourceConfiguration;
1698
1724
  } & T;
1699
1725
 
1700
1726
  /**
@@ -1754,6 +1780,33 @@ declare namespace states {
1754
1780
  }
1755
1781
  }
1756
1782
 
1783
+ /**
1784
+ * @public
1785
+ * Subtitles are configured in the src (for playlists) or player level object subtitles and the child object tracks, which can contain multiple subtitle tracks in different languages.
1786
+ */
1787
+ declare type SubtitlesConfig = ConfigWith<{
1788
+ /**
1789
+ * Subtitles plugin configuration. Requires Subtitles plugin to be attached.
1790
+ */
1791
+ subtitles?: {
1792
+ /**
1793
+ * When set to true, enables native rendering of subtitles by the browser.
1794
+ * Helpful when injecting CSS rules or defining subtitle styles directly in WebVTT files.
1795
+ * Default: false.
1796
+ */
1797
+ native?: boolean;
1798
+ /**
1799
+ * To disable existing subtitles with subtitles: show: false.
1800
+ */
1801
+ show?: boolean;
1802
+ /**
1803
+ * Required for sideloaded WebVTT track files only.
1804
+ * Contains one or multiple track source objects.
1805
+ */
1806
+ tracks?: HTMLTrackAttributes[];
1807
+ };
1808
+ }>;
1809
+
1757
1810
  /**
1758
1811
  * @public
1759
1812
  */
@@ -1939,6 +1992,4 @@ declare const WILL_PLAY = "will-play";
1939
1992
 
1940
1993
  declare const WILL_SEEK = "will-seek";
1941
1994
 
1942
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1943
-
1944
1995
  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
  /**
@@ -1158,6 +1121,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1158
1121
  */
1159
1122
  declare type PlayerWith<T> = T & Player;
1160
1123
 
1124
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1125
+ opts: PluginConfig;
1126
+ setOpts: (config: PluginConfig) => void;
1127
+ };
1128
+
1161
1129
  declare const PLAYING = "is-playing";
1162
1130
 
1163
1131
  /**
@@ -1556,7 +1524,6 @@ declare type SourceObj<T = unknown> = {
1556
1524
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1557
1525
  */
1558
1526
  type?: string;
1559
- drm?: DRMSourceConfiguration;
1560
1527
  } & T;
1561
1528
 
1562
1529
  /**
@@ -1794,6 +1761,4 @@ declare const WILL_PLAY = "will-play";
1794
1761
 
1795
1762
  declare const WILL_SEEK = "will-seek";
1796
1763
 
1797
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1798
-
1799
1764
  export { }
package/plugins/qsel.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
  */
@@ -530,13 +493,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
530
493
  * @param selector - query selector of the HTML element where player will render
531
494
  * @param config - Configuration of the flowplayer and the attached plugins
532
495
  */
533
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
496
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
534
497
  /**
535
498
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
536
499
  * @param element - HTML element where player will render
537
500
  * @param config - Configuration of the flowplayer and the attached plugins
538
501
  */
539
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
502
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
540
503
  }
541
504
 
542
505
  /**
@@ -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
  /**
@@ -1551,7 +1519,6 @@ declare type SourceObj<T = unknown> = {
1551
1519
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1552
1520
  */
1553
1521
  type?: string;
1554
- drm?: DRMSourceConfiguration;
1555
1522
  } & T;
1556
1523
 
1557
1524
  /**
@@ -1779,6 +1746,4 @@ declare const WILL_PLAY = "will-play";
1779
1746
 
1780
1747
  declare const WILL_SEEK = "will-seek";
1781
1748
 
1782
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1783
-
1784
1749
  export { }
package/plugins/qul.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
  */
@@ -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
  /**
@@ -1146,6 +1109,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1146
1109
  */
1147
1110
  declare type PlayerWith<T> = T & Player;
1148
1111
 
1112
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1113
+ opts: PluginConfig;
1114
+ setOpts: (config: PluginConfig) => void;
1115
+ };
1116
+
1149
1117
  declare const PLAYING = "is-playing";
1150
1118
 
1151
1119
  /**
@@ -1495,7 +1463,6 @@ declare type SourceObj<T = unknown> = {
1495
1463
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1496
1464
  */
1497
1465
  type?: string;
1498
- drm?: DRMSourceConfiguration;
1499
1466
  } & T;
1500
1467
 
1501
1468
  /**
@@ -1719,6 +1686,4 @@ declare const WILL_PLAY = "will-play";
1719
1686
 
1720
1687
  declare const WILL_SEEK = "will-seek";
1721
1688
 
1722
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1723
-
1724
1689
  export { }
package/plugins/rts.d.ts CHANGED
@@ -5,10 +5,8 @@ import type { ConnectionStats } from '@millicast/sdk';
5
5
  import type { DiagnosticsResponse } from '@millicast/sdk';
6
6
  import type { Get } from 'type-fest';
7
7
  import type { Level } from 'hls.js';
8
- import type { MediaKeyFunc } from 'hls.js';
9
8
  import type { MediaStreamSource } from '@millicast/sdk';
10
9
  import type { OnStats } from '@dolbyio/webrtc-stats';
11
- import type { SetFieldType } from 'type-fest';
12
10
  import type { TupleToUnion } from 'type-fest';
13
11
 
14
12
  /* Excluded from this release type: AnyLoader */
@@ -266,41 +264,6 @@ declare const DESTROYED = "is-destroyed";
266
264
 
267
265
  declare const DISABLED = "is-disabled";
268
266
 
269
- /**
270
- * @public
271
- */
272
- declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
273
-
274
- /**
275
- * @public
276
- */
277
- declare type DRMConfiguration = {
278
- license_server: string;
279
- http_headers?: Record<string, string>;
280
- certificate?: string;
281
- vendor?: string | DRMVendorImplementation;
282
- request_media_key_system_access_function?: MediaKeyFunc;
283
- query_params?: Record<string, string>;
284
- };
285
-
286
- /**
287
- * @public
288
- */
289
- declare type DRMSourceConfiguration = {
290
- [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
291
- };
292
-
293
- /**
294
- * @public
295
- */
296
- declare type DRMVendorImplementation = {
297
- fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
298
- fairplay_request_license: (url: string, params: {
299
- message: any;
300
- assetId: string;
301
- }, cb: (license_data: Uint8Array) => void) => void;
302
- };
303
-
304
267
  /**
305
268
  * @public
306
269
  */
@@ -535,13 +498,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
535
498
  * @param selector - query selector of the HTML element where player will render
536
499
  * @param config - Configuration of the flowplayer and the attached plugins
537
500
  */
538
- (selector: string, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
501
+ (selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
539
502
  /**
540
503
  * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
541
504
  * @param element - HTML element where player will render
542
505
  * @param config - Configuration of the flowplayer and the attached plugins
543
506
  */
544
- (element: HTMLElement, config?: ConfigWithPlugins): WithOpts<PluginPlayer, ConfigWithPlugins>;
507
+ (element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
545
508
  }
546
509
 
547
510
  /**
@@ -1181,6 +1144,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1181
1144
  */
1182
1145
  declare type PlayerWith<T> = T & Player;
1183
1146
 
1147
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1148
+ opts: PluginConfig;
1149
+ setOpts: (config: PluginConfig) => void;
1150
+ };
1151
+
1184
1152
  declare const PLAYING = "is-playing";
1185
1153
 
1186
1154
  /**
@@ -1635,7 +1603,6 @@ declare type SourceObj<T = unknown> = {
1635
1603
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1636
1604
  */
1637
1605
  type?: string;
1638
- drm?: DRMSourceConfiguration;
1639
1606
  } & T;
1640
1607
 
1641
1608
  /**
@@ -1865,8 +1832,6 @@ declare const WILL_PLAY = "will-play";
1865
1832
 
1866
1833
  declare const WILL_SEEK = "will-seek";
1867
1834
 
1868
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1869
-
1870
1835
  /**
1871
1836
  * @public
1872
1837
  */
@@ -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
  /**
@@ -1146,6 +1109,11 @@ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1146
1109
  */
1147
1110
  declare type PlayerWith<T> = T & Player;
1148
1111
 
1112
+ declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
1113
+ opts: PluginConfig;
1114
+ setOpts: (config: PluginConfig) => void;
1115
+ };
1116
+
1149
1117
  declare const PLAYING = "is-playing";
1150
1118
 
1151
1119
  /**
@@ -1513,7 +1481,6 @@ declare type SourceObj<T = unknown> = {
1513
1481
  * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1514
1482
  */
1515
1483
  type?: string;
1516
- drm?: DRMSourceConfiguration;
1517
1484
  } & T;
1518
1485
 
1519
1486
  /**
@@ -1739,6 +1706,4 @@ declare const WILL_PLAY = "will-play";
1739
1706
 
1740
1707
  declare const WILL_SEEK = "will-seek";
1741
1708
 
1742
- declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
1743
-
1744
1709
  export { }