@flowplayer/player 3.14.1 → 3.15.0-rc.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 (81) hide show
  1. package/core/events.d.ts +575 -68
  2. package/core/events.js +286 -34
  3. package/core.js +1 -1
  4. package/default.js +1 -1
  5. package/embed.js +2 -2
  6. package/flowplayer.css +1 -1
  7. package/index.d.ts +1480 -91
  8. package/package.json +1 -1
  9. package/plugins/ads.d.ts +3744 -112
  10. package/plugins/ads.js +1 -1
  11. package/plugins/airplay.d.ts +1440 -116
  12. package/plugins/airplay.js +1 -1
  13. package/plugins/analytics.d.ts +1409 -82
  14. package/plugins/analytics.js +1 -1
  15. package/plugins/asel.d.ts +1409 -82
  16. package/plugins/asel.js +1 -1
  17. package/plugins/audio.d.ts +1409 -82
  18. package/plugins/audio.js +1 -1
  19. package/plugins/chapters.d.ts +1409 -82
  20. package/plugins/chapters.js +1 -1
  21. package/plugins/chromecast.d.ts +1464 -80
  22. package/plugins/chromecast.js +1 -1
  23. package/plugins/comscore.d.ts +1409 -82
  24. package/plugins/consent.d.ts +1409 -82
  25. package/plugins/consent.js +1 -1
  26. package/plugins/context-menu.d.ts +1443 -116
  27. package/plugins/cuepoints.d.ts +1443 -116
  28. package/plugins/cuepoints.js +1 -1
  29. package/plugins/dash.d.ts +1445 -115
  30. package/plugins/dash.js +1 -1
  31. package/plugins/drm.d.ts +1409 -82
  32. package/plugins/drm.js +1 -1
  33. package/plugins/endscreen.d.ts +1442 -115
  34. package/plugins/endscreen.js +1 -1
  35. package/plugins/fas.d.ts +1409 -82
  36. package/plugins/float-on-scroll.d.ts +1443 -116
  37. package/plugins/float-on-scroll.js +1 -1
  38. package/plugins/ga4.d.ts +1409 -82
  39. package/plugins/gemius.d.ts +1439 -112
  40. package/plugins/google-analytics.d.ts +1409 -82
  41. package/plugins/health.d.ts +1435 -107
  42. package/plugins/health.js +1 -1
  43. package/plugins/hls.d.ts +1431 -104
  44. package/plugins/hls.js +1 -1
  45. package/plugins/id3.d.ts +1409 -82
  46. package/plugins/id3.js +1 -1
  47. package/plugins/iframe.d.ts +1440 -116
  48. package/plugins/iframe.js +1 -1
  49. package/plugins/keyboard.d.ts +1409 -82
  50. package/plugins/media-session.d.ts +1409 -82
  51. package/plugins/message.d.ts +1409 -82
  52. package/plugins/message.js +1 -1
  53. package/plugins/ovp.d.ts +1435 -110
  54. package/plugins/ovp.js +1 -1
  55. package/plugins/playlist.d.ts +1409 -82
  56. package/plugins/playlist.js +1 -1
  57. package/plugins/preview.d.ts +1409 -82
  58. package/plugins/preview.js +1 -1
  59. package/plugins/qsel.d.ts +1409 -82
  60. package/plugins/qsel.js +1 -1
  61. package/plugins/qul.d.ts +1441 -114
  62. package/plugins/qul.js +1 -1
  63. package/plugins/rts.d.ts +1409 -82
  64. package/plugins/rts.js +1 -1
  65. package/plugins/share.d.ts +1409 -82
  66. package/plugins/share.js +1 -1
  67. package/plugins/speed.d.ts +1434 -107
  68. package/plugins/speed.js +1 -1
  69. package/plugins/ssai.d.ts +1412 -82
  70. package/plugins/ssai.js +1 -1
  71. package/plugins/subtitles.d.ts +1426 -102
  72. package/plugins/thumbnails.d.ts +1434 -107
  73. package/plugins/thumbnails.js +1 -1
  74. package/plugins/tizen.d.ts +1409 -82
  75. package/plugins/tizen.js +1 -1
  76. package/plugins/vtsel.d.ts +1409 -82
  77. package/plugins/vtsel.js +1 -1
  78. package/plugins/webos.d.ts +1409 -82
  79. package/plugins/webos.js +1 -1
  80. package/util/loader.d.ts +1436 -101
  81. package/util/loader.js +13 -2
@@ -1,11 +1,32 @@
1
+ /// <reference types="node" />
2
+
3
+ import type { BitrateInfo } from 'dashjs';
1
4
  import type { LevelAttributes } from 'hls.js';
2
5
  import type { MediaKeyFunc } from 'hls.js';
3
6
 
7
+ /* Excluded from this release type: AnyLoader */
8
+
4
9
  declare type ArrayToIntersection<T extends Array<unknown>> = T extends [
5
10
  infer Current,
6
11
  ...infer Remaining
7
12
  ] ? Current & ArrayToIntersection<Remaining> : unknown;
8
13
 
14
+ /**
15
+ * Each loader must
16
+ */
17
+ declare type _AttachedEventCheck = {
18
+ on(event: `${string}:attached`, handler: (e: FPEvent<unknown>) => void): Player;
19
+ };
20
+
21
+ /* Excluded from this release type: AUDIO_ONLY_SOURCE */
22
+
23
+ /* Excluded from this release type: AudioOnlySourceEventDetail */
24
+
25
+ declare const AUTOPLAY = "is-autoplay";
26
+
27
+ /**
28
+ * @public
29
+ */
9
30
  declare type Autoplay = BitOpts | boolean;
10
31
 
11
32
  declare enum AutoplayOpts {
@@ -14,19 +35,60 @@ declare enum AutoplayOpts {
14
35
  AUDIO_REQUIRED = 2
15
36
  }
16
37
 
17
- declare type BitOpts = number;
38
+ /* Excluded from this release type: BEFORE_PAUSE */
39
+
40
+ /* Excluded from this release type: BEFORE_PLAY */
41
+
42
+ /**
43
+ * @public
44
+ */
45
+ declare type BeforePauseEventDetail = {
46
+ forced: boolean;
47
+ };
18
48
 
19
- declare type Component = {
20
- onrender?: (config: Config, root: PlayerRoot, player: Player) => void;
21
- onremove?: (config: Config, root: PlayerRoot, player: Player) => void;
49
+ /**
50
+ * @public
51
+ */
52
+ declare type BeforePlayEventDetail = {
53
+ forced: boolean;
22
54
  };
23
55
 
24
- declare interface Components {
25
- render(key: string, args: any[]): void;
26
- remove(key: string, args: any[]): void;
27
- put(key: string, args: Component): void;
28
- }
56
+ /**
57
+ * @public
58
+ */
59
+ declare type BitOpts = number;
60
+
61
+ /**
62
+ * @public
63
+ */
64
+ declare const /**
65
+ @public
66
+ * when a new player is inserted into the HTML
67
+ */ /**
68
+ * @public
69
+ */
70
+ CAN_PLAY = "canplay";
71
+
72
+ /**
73
+ * @public
74
+ */
75
+ declare const /**
76
+ @public
77
+ * when a new player is inserted into the HTML
78
+ */ /**
79
+ * @public
80
+ */
81
+ CLICK = "click";
82
+
83
+ /* Excluded from this release type: Component */
29
84
 
85
+ /* Excluded from this release type: Components */
86
+
87
+ /* Excluded from this release type: CONFIG */
88
+
89
+ /**
90
+ * @public
91
+ */
30
92
  declare interface Config {
31
93
  src?: UnsafeSource;
32
94
  preload?: "none" | "metadata" | "auto";
@@ -36,7 +98,7 @@ declare interface Config {
36
98
  autopause?: boolean;
37
99
  rewind?: boolean;
38
100
  loop?: boolean;
39
- seamless?: boolean;
101
+ /* Excluded from this release type: seamless */
40
102
  retry?: boolean;
41
103
  autoplay?: Autoplay;
42
104
  start_quality?: BitOpts;
@@ -44,10 +106,7 @@ declare interface Config {
44
106
  poster?: string;
45
107
  disabled?: boolean;
46
108
  muted?: boolean;
47
- /**
48
- * is src handled by one of plugins loaders
49
- */
50
- is_native?: boolean;
109
+ /* Excluded from this release type: is_native */
51
110
  /**
52
111
  * bitflags for UI options
53
112
  */
@@ -56,10 +115,7 @@ declare interface Config {
56
115
  * your user access token
57
116
  */
58
117
  token?: string;
59
- /**
60
- * manually configured duration for pre-rendering usually
61
- */
62
- duration?: number;
118
+ /* Excluded from this release type: duration */
63
119
  /**
64
120
  * can the content be seeked to any position
65
121
  */
@@ -77,14 +133,122 @@ declare interface Config {
77
133
  seconds_to_dvr?: number;
78
134
  }
79
135
 
136
+ /* Excluded from this release type: ConfigEventDetail */
137
+
138
+ /**
139
+ * @public
140
+ */
80
141
  declare type ConfigWith<T> = Config & T;
81
142
 
143
+ /* Excluded from this release type: CONTENT_REAL_LOAD_START */
144
+
145
+ /**
146
+ * @public
147
+ */
148
+ declare const /**
149
+ @public
150
+ * when a new player is inserted into the HTML
151
+ */ /**
152
+ * @public
153
+ */
154
+ CONTEXT_MENU = "contextmenu";
155
+
156
+ /**
157
+ * @public
158
+ */
159
+ declare type ContextMenuEventDetail = null;
160
+
161
+ /**
162
+ * @public
163
+ * when a cuepoint becomes inactive
164
+ */
165
+ declare const /**
166
+ @public
167
+ * when a new player is inserted into the HTML
168
+ */ /**
169
+ * @public
170
+ * when a cuepoint becomes inactive
171
+ */
172
+ CUEPOINT_END = "cuepointend";
173
+
174
+ /**
175
+ * @public
176
+ * when a cuepoint is active
177
+ */
178
+ declare const /**
179
+ @public
180
+ * when a new player is inserted into the HTML
181
+ */ /**
182
+ * @public
183
+ * when a cuepoint is active
184
+ */
185
+ CUEPOINT_START = "cuepointstart";
186
+
187
+ /**
188
+ * @public
189
+ */
190
+ declare type CuePointEndEventDetail = null;
191
+
192
+ /**
193
+ * @public
194
+ * cuepoints parsing is asynchronous
195
+ * you cannot rely on them existing until
196
+ * this event is emitted
197
+ */
198
+ declare const /**
199
+ @public
200
+ * when a new player is inserted into the HTML
201
+ */ /**
202
+ * @public
203
+ * cuepoints parsing is asynchronous
204
+ * you cannot rely on them existing until
205
+ * this event is emitted
206
+ */
207
+ CUEPOINTS = "cuepoints";
208
+
209
+ /**
210
+ * @public
211
+ */
212
+ declare type CuePointStartEventDetail = null;
213
+
82
214
  /* Excluded from this release type: CUES_PARSED */
83
215
 
84
- declare type DeviceId = string;
216
+ /**
217
+ * @public
218
+ */
219
+ declare const /**
220
+ @public
221
+ * when a new player is inserted into the HTML
222
+ */ /**
223
+ * @public
224
+ */
225
+ DATA = "loadeddata";
226
+
227
+ /**
228
+ * @public
229
+ */
230
+ declare const /**
231
+ @public
232
+ * when a new player is inserted into the HTML
233
+ */ /**
234
+ * @public
235
+ */
236
+ DBL_CLICK = "dblclick";
237
+
238
+ declare const DESTROYED = "is-destroyed";
239
+
240
+ /* Excluded from this release type: DeviceId */
85
241
 
242
+ declare const DISABLED = "is-disabled";
243
+
244
+ /**
245
+ * @public
246
+ */
86
247
  declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
87
248
 
249
+ /**
250
+ * @public
251
+ */
88
252
  declare type DRMConfiguration = {
89
253
  license_server: string;
90
254
  http_headers?: Record<string, string>;
@@ -94,10 +258,16 @@ declare type DRMConfiguration = {
94
258
  query_params?: Record<string, string>;
95
259
  };
96
260
 
261
+ /**
262
+ * @public
263
+ */
97
264
  declare type DRMSourceConfiguration = {
98
265
  [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
99
266
  };
100
267
 
268
+ /**
269
+ * @public
270
+ */
101
271
  declare type DRMVendorImplementation = {
102
272
  fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
103
273
  fairplay_request_license: (url: string, params: {
@@ -106,7 +276,133 @@ declare type DRMVendorImplementation = {
106
276
  }, cb: (license_data: Uint8Array) => void) => void;
107
277
  };
108
278
 
279
+ /**
280
+ * @public
281
+ */
282
+ declare const /**
283
+ @public
284
+ * when a new player is inserted into the HTML
285
+ */ /**
286
+ * @public
287
+ */
288
+ DURATION_CHANGE = "durationchange";
289
+
290
+ /**
291
+ * @public
292
+ * when the player has started playing dvr content
293
+ */
294
+ declare const /**
295
+ @public
296
+ * when a new player is inserted into the HTML
297
+ */ /**
298
+ * @public
299
+ * when the player has started playing dvr content
300
+ */
301
+ DVR = "dvr";
302
+
303
+ /**
304
+ * @public
305
+ */
306
+ declare type DvrEventDetail = number;
307
+
308
+ declare const ENDED = "is-ended";
309
+
310
+ /**
311
+ * @public
312
+ */
313
+ declare const /**
314
+ @public
315
+ * when a new player is inserted into the HTML
316
+ */ /**
317
+ * @public
318
+ */
319
+ ENDED_2 = "ended";
320
+
321
+ declare type EnsureOnAttached<P extends Function, T extends Player> = ExtractPureAPI<T> extends _AttachedEventCheck ? P : "Loaders must implement on('<pluginname>:attached') event";
322
+
323
+ /**
324
+ * @public
325
+ */
326
+ declare const /**
327
+ @public
328
+ * when a new player is inserted into the HTML
329
+ */ /**
330
+ * @public
331
+ */
332
+ ERROR = "error";
333
+
334
+ declare const ERRORED = "is-error";
335
+
336
+ /**
337
+ * @public
338
+ */
339
+ declare type ErrorEventDetail = {
340
+ src?: string;
341
+ type?: string;
342
+ code?: number | string;
343
+ };
344
+
345
+ /* Excluded from this release type: _ErrorEventDetail */
346
+
109
347
  declare namespace events {
348
+ export {
349
+ MOUNT,
350
+ ERROR,
351
+ CONTEXT_MENU,
352
+ CLICK,
353
+ DBL_CLICK,
354
+ KEYUP,
355
+ KEYDOWN,
356
+ LOAD,
357
+ MOUSE_ENTER,
358
+ MOUSE_LEAVE,
359
+ MOUSE_UP,
360
+ MOUSE_DOWN,
361
+ MOUSE_MOVE,
362
+ TOUCH_START,
363
+ TOUCH_MOVE,
364
+ TOUCH_END,
365
+ TOUCH_CANCEL,
366
+ RESIZE,
367
+ SCROLL,
368
+ FULLSCREEN_ENTER,
369
+ FULLSCREEN_EXIT,
370
+ FULLSCREEN_CHANGE,
371
+ METADATA,
372
+ DATA,
373
+ PROGRESS,
374
+ TIME_UPDATE,
375
+ LOAD_START,
376
+ VOLUME_CHANGE,
377
+ PAUSE,
378
+ PLAYING_2 as PLAYING,
379
+ PLAY,
380
+ WAITING_2 as WAITING,
381
+ CAN_PLAY,
382
+ ENDED_2 as ENDED,
383
+ SEEKED,
384
+ SEEKING_2 as SEEKING,
385
+ DURATION_CHANGE,
386
+ CUEPOINTS,
387
+ CUEPOINT_START,
388
+ CUEPOINT_END,
389
+ VIEW_ENTER,
390
+ VIEW_LEAVE,
391
+ SOURCE,
392
+ REAP,
393
+ QUALITIES,
394
+ VIDEO_TRACKS,
395
+ SET_QUALITY,
396
+ VIDEO_TRACK_SELECT,
397
+ RECOMMENDATIONS_READY,
398
+ LANDSCAPE,
399
+ PORTRAIT,
400
+ DVR,
401
+ LIVE_2 as LIVE
402
+ }
403
+ }
404
+
405
+ declare namespace events_2 {
110
406
  export {
111
407
  TRACK_UPDATED,
112
408
  TRACKS,
@@ -114,41 +410,103 @@ declare namespace events {
114
410
  }
115
411
  }
116
412
 
413
+ declare type ExtractPureAPI<T> = T extends PlayerWith<infer PureAPI> ? PureAPI : never;
414
+
415
+ /**
416
+ * @public
417
+ */
117
418
  declare type FlowplayerCustomElementRegistry = Map<string, string>;
118
419
 
420
+ /**
421
+ * @public
422
+ */
423
+ declare type FlowplayerStates = typeof states;
424
+
425
+ /**
426
+ * @public
427
+ */
119
428
  declare interface FlowplayerUMD extends FlowplayerUMDBase {
429
+ /**
430
+ * Configure flowplayer and display it in the UI
431
+ * @param selector - query selector of the HTML element where player will render
432
+ * @param config - configuration of flowplayer
433
+ */
120
434
  (selector: string, config?: Config): Player;
435
+ /**
436
+ * Configure flowplayer and display it in the UI
437
+ * @param element - HTML element where player will render
438
+ * @param config - configuration of flowplayer
439
+ */
121
440
  (element: HTMLElement, config?: Config): Player;
441
+ /**
442
+ * Configure flowplayer and display it in the UI
443
+ * @param selector - query selector of the HTML element where player will render
444
+ * @param config - configuration of flowplayer
445
+ */
122
446
  <T>(selector: string, config?: ConfigWith<T>): Player;
447
+ /**
448
+ * Configure flowplayer and display it in the UI
449
+ * @param element - HTML element where player will render
450
+ * @param config - configuration of flowplayer
451
+ */
123
452
  <T>(element: HTMLElement, config?: ConfigWith<T>): Player;
453
+ /**
454
+ * Register plugins in flowplayer
455
+ * @returns flowplayer instance with registered plugins
456
+ */
124
457
  <PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<ConfigWith<MergeConfigs<PluginCtors>>, PlayerWith<MergePlayerAPIExtensions<PluginCtors>>>;
125
458
  }
126
459
 
127
460
  declare interface FlowplayerUMDBase {
461
+ /**
462
+ * All player instances on the page
463
+ */
128
464
  instances: Player[];
129
- extensions: PluginCtor<KeyValue, any>[];
130
- events: Record<string, string>;
131
- ads?: {
132
- events: Record<string, string>;
133
- };
134
- states: Record<string, string>;
465
+ /**
466
+ * Flowplayer core events
467
+ */
468
+ events: typeof events;
469
+ /**
470
+ * Flowplayer ui states map
471
+ */
472
+ states: FlowplayerStates;
135
473
  quality: typeof QualityOpts;
474
+ autoplay: typeof AutoplayOpts;
136
475
  commit: string;
137
476
  version: string;
477
+ /**
478
+ * Flowplayer's custom element registry
479
+ */
138
480
  customElements: FlowplayerCustomElementRegistry;
139
- defaultElements: Record<string, string>;
140
- components: Components;
141
- support: any;
142
- autoplay: typeof AutoplayOpts;
143
- jwt: any;
144
- loaders: any;
481
+ /* Excluded from this release type: extensions */
482
+ /* Excluded from this release type: defaultElements */
483
+ /* Excluded from this release type: components */
484
+ /* Excluded from this release type: support */
485
+ /* Excluded from this release type: jwt */
486
+ /* Excluded from this release type: loaders */
145
487
  }
146
488
 
147
- declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config, PluginPlayerAPIExtension extends Player = Player> extends FlowplayerUMDBase {
148
- (selector: string, config?: ConfigWithPlugins): PluginPlayerAPIExtension;
149
- (element: HTMLElement, config?: ConfigWithPlugins): PluginPlayerAPIExtension;
489
+ /**
490
+ * @public
491
+ */
492
+ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config, PluginPlayer extends Player = Player> extends FlowplayerUMDBase {
493
+ /**
494
+ * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
495
+ * @param selector - query selector of the HTML element where player will render
496
+ * @param config - Configuration of the flowplayer and the attached plugins
497
+ */
498
+ (selector: string, config?: ConfigWithPlugins): PluginPlayer;
499
+ /**
500
+ * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
501
+ * @param element - HTML element where player will render
502
+ * @param config - Configuration of the flowplayer and the attached plugins
503
+ */
504
+ (element: HTMLElement, config?: ConfigWithPlugins): PluginPlayer;
150
505
  }
151
506
 
507
+ /**
508
+ * @public
509
+ */
152
510
  declare interface FPEvent<T> extends CustomEvent<T> {
153
511
  /**
154
512
  * @deprecated
@@ -158,6 +516,47 @@ declare interface FPEvent<T> extends CustomEvent<T> {
158
516
  data?: T;
159
517
  }
160
518
 
519
+ declare const FULLSCREEN = "is-fullscreen";
520
+
521
+ /**
522
+ * @public
523
+ */
524
+ declare const /**
525
+ @public
526
+ * when a new player is inserted into the HTML
527
+ */ /**
528
+ * @public
529
+ */
530
+ FULLSCREEN_CHANGE = "fullscreenchange";
531
+
532
+ /**
533
+ * @public
534
+ */
535
+ declare const /**
536
+ @public
537
+ * when a new player is inserted into the HTML
538
+ */ /**
539
+ * @public
540
+ */
541
+ FULLSCREEN_ENTER = "fullscreenenter";
542
+
543
+ /**
544
+ * @public
545
+ */
546
+ declare const /**
547
+ @public
548
+ * when a new player is inserted into the HTML
549
+ */ /**
550
+ * @public
551
+ */
552
+ FULLSCREEN_EXIT = "fullscreenexit";
553
+
554
+ declare const GRABBING = "is-grabbing";
555
+
556
+ declare const HAS_POSTER = "has-poster";
557
+
558
+ declare const HOVERED = "is-hovered";
559
+
161
560
  /**
162
561
  * @public
163
562
  * Defines the attributes for HTML track elements.
@@ -205,116 +604,876 @@ export declare type HTMLTrackAttributes = {
205
604
  id?: string;
206
605
  };
207
606
 
208
- declare type JSONPlayer = any;
607
+ declare const IN_VIEWPORT = "is-in-viewport";
209
608
 
210
- declare type KeyValue = Record<string, any>;
609
+ /* Excluded from this release type: INTERSECTIONCHANGE */
211
610
 
212
- declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue, PluginPlayerAPIExtension extends KeyValue = KeyValue> extends Plugin_2<PluginOwnConfig, PluginPlayerAPIExtension> {
213
- onload(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayerAPIExtension>, src?: SourceObj): void;
214
- wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
215
- wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
216
- }
611
+ /* Excluded from this release type: IntersectionChangeEventDetail */
217
612
 
218
- declare type MapToConfigs<Arr extends PluginCtor[]> = {
219
- [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
220
- };
613
+ declare const IS_SOURCE_PROCESSING = "is-source-processing";
221
614
 
222
- declare type MapToPlayerApiExtensions<Arr extends PluginCtor[]> = {
223
- [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer _uConfigType, infer PlayerAPIExtension> ? PlayerAPIExtension : never;
224
- };
615
+ declare type JSONPlayer = any;
225
616
 
226
- declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
617
+ /**
618
+ * @public
619
+ */
620
+ declare const /**
621
+ @public
622
+ * when a new player is inserted into the HTML
623
+ */ /**
624
+ * @public
625
+ */
626
+ KEYDOWN = "keydown";
227
627
 
228
- declare type MergePlayerAPIExtensions<Arr extends PluginCtor[]> = ArrayToIntersection<MapToPlayerApiExtensions<Arr>>;
628
+ /**
629
+ * @public
630
+ */
631
+ declare const /**
632
+ @public
633
+ * when a new player is inserted into the HTML
634
+ */ /**
635
+ * @public
636
+ */
637
+ KEYUP = "keyup";
229
638
 
230
- declare interface Player extends HTMLVideoElement {
231
- renderPlugin: (pluginContainer: HTMLElement) => void;
232
- toggleDisable: (flag: boolean) => void;
233
- original_src: string;
234
- root: PlayerRoot;
235
- playerState: Record<string, boolean>;
236
- reaper: Map<string, any> | 0;
237
- hasState(state: PlayerState): boolean;
238
- transitionState(to: PlayerState, from: PlayerState, timer?: number): void;
239
- togglePlay(on?: boolean): Promise<void>;
240
- toggleFullScreen(on?: boolean, state_only?: boolean): void;
241
- toggleMute(on?: boolean): void;
242
- destroy(): void;
243
- render(): void;
244
- render(component: string, args: any[]): void;
245
- createComponents(...args: string[]): HTMLElement[];
246
- setOpts(config: Config): void;
247
- setSrc(sources: UnsafeSource): Player;
248
- on<T>(event: string | string[], handler: (e: FPEvent<T>) => void): Player;
249
- once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
250
- off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
251
- poll<T>(event: string, data?: T): FPEvent<T>;
252
- emit<T>(event: string, data?: T): Player;
253
- setAttrs(attrs: Config): Player;
254
- opt<T>(key: string, fallback?: T): T;
255
- enqueueSeek(offset: number): any;
256
- setState(state: string, flag: boolean): Player;
257
- toJSON(): JSONPlayer;
258
- i18n(k: string, fallback?: string): string;
259
- deviceId(): DeviceId;
260
- live_state: {
261
- dvr?: boolean;
262
- dvr_window?: number;
263
- };
264
- opts: Config;
265
- plugins: Array<Plugin_2 | Loader>;
266
- dvr_offset?: number;
639
+ /**
640
+ * @public
641
+ */
642
+ declare type KeyValue = Record<string, any>;
643
+
644
+ /**
645
+ * @public
646
+ */
647
+ declare const /**
648
+ @public
649
+ * when a new player is inserted into the HTML
650
+ */ /**
651
+ * @public
652
+ */
653
+ LANDSCAPE = "landscape";
654
+
655
+ declare const LIVE = "is-live";
656
+
657
+ /**
658
+ * @public
659
+ * when src is a livestream
660
+ */
661
+ declare const /**
662
+ @public
663
+ * when a new player is inserted into the HTML
664
+ */ /**
665
+ * @public
666
+ * when src is a livestream
667
+ */
668
+ LIVE_2 = "live";
669
+
670
+ declare const LIVE_SEEKED = "is-live-seeked";
671
+
672
+ /**
673
+ * @public
674
+ */
675
+ declare type LiveEventDetail = null;
676
+
677
+ /**
678
+ * @public
679
+ */
680
+ declare const /**
681
+ @public
682
+ * when a new player is inserted into the HTML
683
+ */ /**
684
+ * @public
685
+ */
686
+ LOAD = "load";
687
+
688
+ /**
689
+ * @public
690
+ */
691
+ declare const /**
692
+ @public
693
+ * when a new player is inserted into the HTML
694
+ */ /**
695
+ * @public
696
+ */
697
+ LOAD_START = "loadstart";
698
+
699
+ declare const LOADED = "is-loaded";
700
+
701
+ /**
702
+ * @public A plugin that supports loading new media formats. Use 'class MyPlugin implements Loader\<...\>' when writing your custom Loader
703
+ * @typeParam PluginPlayer- Player API that will be implemented by the loader. Loader at least must implement on(\<loader-name\>:attached, ...) event handler
704
+ */
705
+ declare interface Loader<PluginOwnConfig extends KeyValue, // FIXME extends Config
706
+ PluginPlayer extends PlayerWith<_AttachedEventCheck>> extends Plugin_2<PluginOwnConfig, PluginPlayer> {
707
+ onload: EnsureOnAttached<(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayer>, src: SourceObj) => void, PluginPlayer>;
708
+ wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
709
+ wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
710
+ }
711
+
712
+ declare const LOADING = "is-loading";
713
+
714
+ declare type MapToConfigs<Arr extends PluginCtor[]> = {
715
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<ConfigWith<infer ConfigType>> ? ConfigType : never;
716
+ };
717
+
718
+ declare type MapToPlayerApiExtensions<Arr extends PluginCtor[]> = {
719
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer _uConfigType, PlayerWith<infer PlayerAPIExtension>> ? PlayerAPIExtension : never;
720
+ };
721
+
722
+ declare const MENU_OPENED = "has-menu-opened";
723
+
724
+ declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
725
+
726
+ declare type MergePlayerAPIExtensions<Arr extends PluginCtor[]> = ArrayToIntersection<MapToPlayerApiExtensions<Arr>>;
727
+
728
+ /**
729
+ * @public
730
+ * general video events flowplayer uses internally
731
+ * https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
732
+ */
733
+ declare const /**
734
+ @public
735
+ * when a new player is inserted into the HTML
736
+ */ /**
737
+ * @public
738
+ * general video events flowplayer uses internally
739
+ * https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
740
+ */
741
+ METADATA = "loadedmetadata";
742
+
743
+ /**
744
+ @public
745
+ * when a new player is inserted into the HTML
746
+ */
747
+ declare const /**
748
+ @public
749
+ * when a new player is inserted into the HTML
750
+ */ /**
751
+ @public
752
+ * when a new player is inserted into the HTML
753
+ */ MOUNT = "mount";
754
+
755
+ /**
756
+ * @public
757
+ */
758
+ declare type MountEventDetail = null;
759
+
760
+ /**
761
+ * @public
762
+ */
763
+ declare const /**
764
+ @public
765
+ * when a new player is inserted into the HTML
766
+ */ /**
767
+ * @public
768
+ */
769
+ MOUSE_DOWN = "mousedown";
770
+
771
+ /**
772
+ * @public
773
+ */
774
+ declare const /**
775
+ @public
776
+ * when a new player is inserted into the HTML
777
+ */ /**
778
+ * @public
779
+ */
780
+ MOUSE_ENTER = "mouseenter";
781
+
782
+ /**
783
+ * @public
784
+ */
785
+ declare const /**
786
+ @public
787
+ * when a new player is inserted into the HTML
788
+ */ /**
789
+ * @public
790
+ */
791
+ MOUSE_LEAVE = "mouseleave";
792
+
793
+ /**
794
+ * @public
795
+ */
796
+ declare const /**
797
+ @public
798
+ * when a new player is inserted into the HTML
799
+ */ /**
800
+ * @public
801
+ */
802
+ MOUSE_MOVE = "mousemove";
803
+
804
+ /**
805
+ * @public
806
+ */
807
+ declare const /**
808
+ @public
809
+ * when a new player is inserted into the HTML
810
+ */ /**
811
+ * @public
812
+ */
813
+ MOUSE_UP = "mouseup";
814
+
815
+ declare const MUTED = "is-muted";
816
+
817
+ declare const NO_CONTROLS = "no-controls";
818
+
819
+ declare const NO_DVR = "no-timeline";
820
+
821
+ /* Excluded from this release type: NON_RECOVERABLE_ERROR */
822
+
823
+ /* Excluded from this release type: NonRecoverableErrorEventDetail */
824
+
825
+ /* Excluded from this release type: NQState */
826
+
827
+ /**
828
+ * @public
829
+ */
830
+ declare type OVPMetadata = {
831
+ player_id?: string;
832
+ media_id?: string;
833
+ ad_keywords?: string;
834
+ title?: string;
835
+ description?: string;
836
+ category_name?: string;
837
+ duration?: number;
838
+ tags?: string;
839
+ };
840
+
841
+ /**
842
+ * @public
843
+ */
844
+ declare const /**
845
+ @public
846
+ * when a new player is inserted into the HTML
847
+ */ /**
848
+ * @public
849
+ */
850
+ PAUSE = "pause";
851
+
852
+ declare const PAUSED = "is-paused";
853
+
854
+ /**
855
+ * @public
856
+ */
857
+ declare const /**
858
+ @public
859
+ * when a new player is inserted into the HTML
860
+ */ /**
861
+ * @public
862
+ */
863
+ PLAY = "play";
864
+
865
+ /**
866
+ * @public
867
+ */
868
+ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
869
+ /* Excluded from this release type: renderPlugin */
870
+ /**
871
+ * Disables and enables the player.
872
+ * @param flag -Forces disabled mode (true) or enabled mode (false). Disabled player cannot be seeked forward.
873
+ */
874
+ toggleDisable: (flag?: boolean) => void;
875
+ /* Excluded from this release type: original_src */
876
+ /**
877
+ * The root element of the video player. This is the immediate parent element of the video tag.
878
+ */
879
+ root: PlayerRoot;
880
+ /* Excluded from this release type: playerState */
881
+ /* Excluded from this release type: reaper */
882
+ /* Excluded from this release type: hasState */
883
+ /* Excluded from this release type: transitionState */
884
+ /**
885
+ * Toggles between playing and paused mode.
886
+ * @param on - Forces the playback (true) or paused state (false). Use this for initial playback of a source configured with setSrc() and when changing the state.
887
+ */
888
+ togglePlay(on?: boolean): Promise<void>;
889
+ /* Excluded from this release type: toggleFullScreen */
890
+ /**
891
+ * @public
892
+ * Toggles between normal and fullscreen mode. The optional flag attribute forces the normal sized (false) or fullscreen (false) mode.
893
+ * The custom fullscreenenter and fullscreenexit events are sent respectively.
894
+ */
895
+ toggleFullScreen(on?: boolean): void;
896
+ /* Excluded from this release type: toggleMute */
897
+ /**
898
+ * Toggles between muted and original volume level.
899
+ */
900
+ toggleMute(): void;
901
+ /**
902
+ * Removes a Flowplayer instance from `flowplayer.instances` and emits the `flowplayer.events.REAP` event, enabling cleanup of unsafe resources.
903
+ */
904
+ destroy(): void;
905
+ /* Excluded from this release type: render */
906
+ /* Excluded from this release type: render */
907
+ createComponents(...args: string[]): HTMLElement[];
908
+ /**
909
+ * Adds or changes configuration object. Usually used in conjunction with `setSrc()`. You can use all top-level config options like `subtitle:` , `logo:`, `ima:` etc.
910
+ * @example
911
+ * ```
912
+ * setOpts({
913
+ * subtitles:{
914
+ * tracks:[
915
+ * {
916
+ * src: "1.vtt",
917
+ * label: "English",
918
+ * default: true
919
+ * }, {
920
+ * src: "2.vtt",
921
+ * label: "Spanish",
922
+ * default : false }]},
923
+ * logo: "https://myserver.com/logo.png"
924
+ * })
925
+ * ```
926
+ */
927
+ setOpts(config: Config): void;
928
+ /**
929
+ * Sets the video source to be played. The src attribute can be a string or an object similar to the src property.
930
+ */
931
+ setSrc(sources: UnsafeSource): void;
932
+ /* Excluded from this release type: setSrc */
933
+ /* Excluded from this release type: setAttrs */
934
+ /* Excluded from this release type: opt */
935
+ /* Excluded from this release type: enqueueSeek */
936
+ /* Excluded from this release type: setState */
937
+ setState(state: PlayerState, flag: boolean): void;
938
+ /* Excluded from this release type: toJSON */
939
+ /**
940
+ * Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
941
+ */
942
+ i18n(k: string, fallback?: string): string;
943
+ /* Excluded from this release type: deviceId */
944
+ /* Excluded from this release type: live_state */
945
+ /**
946
+ * A reference to the configuration state of the player.
947
+ */
948
+ opts: Config;
949
+ /* Excluded from this release type: plugins */
950
+ /* Excluded from this release type: dvr_offset */
267
951
  message?: {
268
952
  events: Record<string, string>;
269
953
  };
954
+ /**
955
+ * A boolean specifying whether the player is disabled and the user cannot seek forward using the mouse or keyboard.
956
+ * Player is disabled and enabled with the `toggleDisable()` method.
957
+ */
270
958
  disabled: boolean;
271
- started?: boolean;
272
- token: string;
959
+ /* Excluded from this release type: started */
960
+ /* Excluded from this release type: token */
273
961
  tracks?: VideoTrack[];
274
- _customElements: FlowplayerCustomElementRegistry;
275
- _storage: Storage;
276
- }
962
+ /* Excluded from this release type: _customElements */
963
+ /* Excluded from this release type: _storage */
964
+ };
965
+
966
+ declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
277
967
 
968
+ declare type PlayerCustomEventsDetailMap = {
969
+ [MOUNT]: MountEventDetail;
970
+ [ERROR]: ErrorEventDetail;
971
+ [CONTEXT_MENU]: ContextMenuEventDetail;
972
+ /* Excluded from this release type: beforeplay */
973
+ /* Excluded from this release type: beforepause */
974
+ /* Excluded from this release type: state */
975
+ [CUEPOINT_START]: CuePointStartEventDetail;
976
+ [CUEPOINT_END]: CuePointEndEventDetail;
977
+ [VIEW_ENTER]: ViewEnterEventDetail;
978
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
979
+ [SOURCE]: SourceEventDetail;
980
+ /* Excluded from this release type: recover */
981
+ [REAP]: ReapEventDetail;
982
+ /* Excluded from this release type: config */
983
+ [QUALITIES]: QualitiesEventDetail;
984
+ /* Excluded from this release type: "error:fatal" */
985
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
986
+ /* Excluded from this release type: audioonlysource */
987
+ /* Excluded from this release type: renderplugin */
988
+ [DVR]: DvrEventDetail;
989
+ [LIVE_2]: LiveEventDetail;
990
+ /* Excluded from this release type: "seek:queued" */
991
+ /* Excluded from this release type: "seek:cancel" */
992
+ /* Excluded from this release type: "plugin:registered" */
993
+ /* Excluded from this release type: intersectionchange */
994
+ /* Excluded from this release type: retry */
995
+ };
996
+
997
+ declare type PlayerCustomEventsOverloads = {
998
+ /**
999
+ * Sent when the player interface is completely rendered and you can access all the elements with CSS and JavaScript. Due to the way mounting works, this event is only accessible inside of a custom extension.
1000
+ */
1001
+ on(event: typeof MOUNT, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof MOUNT]>) => void): Player;
1002
+ /**
1003
+ * Sent when an error occurs. Learn more about error handling.
1004
+ */
1005
+ on(event: typeof ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof ERROR]>) => void): Player;
1006
+ on(// FIXME - this event is in context-menu plugin
1007
+ event: typeof CONTEXT_MENU, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CONTEXT_MENU]>) => void): Player;
1008
+ /* Excluded from this release type: on */
1009
+ /* Excluded from this release type: on */
1010
+ /* Excluded from this release type: on */
1011
+ /**
1012
+ * TODO - move to Cuepoints? Sent when a configured cuepoint is entered.
1013
+ */
1014
+ on(event: typeof CUEPOINT_START, // TODO: move to Cuepoints
1015
+ handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CUEPOINT_START]>) => void): Player;
1016
+ /**
1017
+ * Sent when a configured cuepoint is terminated.
1018
+ */
1019
+ on(event: typeof CUEPOINT_END, // TODO: move to Cuepoints
1020
+ handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CUEPOINT_END]>) => void): Player;
1021
+ /**
1022
+ * Sent when the player becomes visible for the user.
1023
+ */
1024
+ on(event: typeof VIEW_ENTER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_ENTER]>) => void): Player;
1025
+ /**
1026
+ * Sent when the player leaves the users viewport and is longer visible.
1027
+ */
1028
+ on(event: typeof VIEW_LEAVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_LEAVE]>) => void): Player;
1029
+ /**
1030
+ * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
1031
+ */
1032
+ on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
1033
+ /* Excluded from this release type: on */
1034
+ /**
1035
+ * Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
1036
+ */
1037
+ on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
1038
+ /* Excluded from this release type: on */
1039
+ /**
1040
+ * Emitted when the set of underlying qualities has changed.
1041
+ */
1042
+ on(event: typeof QUALITIES, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITIES]>) => void): Player;
1043
+ /* Excluded from this release type: on */
1044
+ /**
1045
+ * Listen to this event to create a recommendations grid using the data passed with the event.
1046
+ */
1047
+ on(event: typeof RECOMMENDATIONS_READY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOMMENDATIONS_READY]>) => void): Player;
1048
+ /* Excluded from this release type: on */
1049
+ /* Excluded from this release type: on */
1050
+ /**
1051
+ * when the player has started playing dvr content
1052
+ */
1053
+ on(event: typeof DVR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof DVR]>) => void): Player;
1054
+ /**
1055
+ * when src is a livestream
1056
+ */
1057
+ on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1058
+ /* Excluded from this release type: on */
1059
+ /* Excluded from this release type: on */
1060
+ /* Excluded from this release type: on */
1061
+ /* Excluded from this release type: on */
1062
+ /* Excluded from this release type: on */
1063
+ on<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1064
+ /* Excluded from this release type: on */
1065
+ /**
1066
+ * Same as `on()`, but the handler function is executed only once.
1067
+ */
1068
+ once<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
1069
+ /**
1070
+ * Same as `on()`, but the handler function is executed only once.
1071
+ */
1072
+ once<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
1073
+ once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1074
+ /**
1075
+ * Removes the event handler with the specified event type.
1076
+ */
1077
+ off<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
1078
+ /**
1079
+ * Removes the event handler with the specified event type.
1080
+ */
1081
+ off<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
1082
+ /**
1083
+ * Removes the event handler with the specified event type.
1084
+ */
1085
+ off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1086
+ /* Excluded from this release type: poll */
1087
+ emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1088
+ /* Excluded from this release type: emit */
1089
+ emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1090
+ };
1091
+
1092
+ declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1093
+
1094
+ declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
1095
+
1096
+ declare type PlayerNativeEventsDetailMap = Omit<HTMLVideoElementEventMap, "error">;
1097
+
1098
+ declare type PlayerNativeEventsOverloads = {
1099
+ on<K extends keyof PlayerNativeEventsDetailMap>(event: K, handler: (ev: PlayerNativeEventsDetailMap[K]) => void): Player;
1100
+ };
1101
+
1102
+ /**
1103
+ * @public
1104
+ * The root element of the video player. This is the immediate parent element of the video tag.
1105
+ */
278
1106
  declare type PlayerRoot = HTMLElement & {
279
- prevWidth?: number;
1107
+ /* Excluded from this release type: prevWidth */
280
1108
  };
281
1109
 
282
- declare type PlayerState = string;
1110
+ /**
1111
+ * @public
1112
+ */
1113
+ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1114
+
1115
+ /* Excluded from this release type: _PlayerState */
1116
+
1117
+ /* Excluded from this release type: PlayerStates */
283
1118
 
1119
+ /**
1120
+ * @public
1121
+ */
284
1122
  declare type PlayerWith<T> = T & Player;
285
1123
 
286
- declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue, PluginPlayerAPIExtension extends KeyValue = KeyValue> {
1124
+ declare const PLAYING = "is-playing";
1125
+
1126
+ /**
1127
+ * @public
1128
+ */
1129
+ declare const /**
1130
+ @public
1131
+ * when a new player is inserted into the HTML
1132
+ */ /**
1133
+ * @public
1134
+ */
1135
+ PLAYING_2 = "playing";
1136
+
1137
+ /**
1138
+ * @public
1139
+ */
1140
+ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
287
1141
  /**
288
1142
  * a plugin must always implement the init method so a player instance knows how to initialize it
289
1143
  */
290
- init(config: ConfigWith<PluginOwnConfig>, container: PlayerRoot, player: PlayerWith<PluginPlayerAPIExtension>): void;
1144
+ init(config: PluginConfig, container: PlayerRoot, player: PluginPlayer): void;
291
1145
  }
292
1146
 
293
- declare interface PluginCtor<PluginOwnConfig extends KeyValue = KeyValue, PluginPlayerAPIExtension extends KeyValue = KeyValue> {
294
- new (umd: FlowplayerUMD, player: PlayerWith<PluginPlayerAPIExtension>): Plugin_2<PluginOwnConfig, PluginPlayerAPIExtension>;
1147
+ /* Excluded from this release type: PLUGIN_REGISTERED */
1148
+
1149
+ /**
1150
+ * @public
1151
+ */
1152
+ declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
1153
+ new (umd: FlowplayerUMD, player: PluginPlayer): Plugin_2<PluginConfig, PluginPlayer>;
295
1154
  }
296
1155
 
1156
+ /* Excluded from this release type: PluginRegisteredEventDetail */
1157
+
1158
+ declare type PluginStates = string;
1159
+
1160
+ /**
1161
+ * @public
1162
+ */
1163
+ declare const /**
1164
+ @public
1165
+ * when a new player is inserted into the HTML
1166
+ */ /**
1167
+ * @public
1168
+ */
1169
+ PORTRAIT = "portrait";
1170
+
1171
+ /**
1172
+ * @public
1173
+ */
1174
+ declare const /**
1175
+ @public
1176
+ * when a new player is inserted into the HTML
1177
+ */ /**
1178
+ * @public
1179
+ */
1180
+ PROGRESS = "progress";
1181
+
1182
+ /**
1183
+ * @public
1184
+ * emitted whenever a list of qualities has been made available
1185
+ * when index 0 is the highest quality and index 0+N is the lowest
1186
+ */
1187
+ declare const /**
1188
+ @public
1189
+ * when a new player is inserted into the HTML
1190
+ */ /**
1191
+ * @public
1192
+ * emitted whenever a list of qualities has been made available
1193
+ * when index 0 is the highest quality and index 0+N is the lowest
1194
+ */
1195
+ QUALITIES = "qualities";
1196
+
1197
+ /**
1198
+ * @public
1199
+ */
1200
+ declare type QualitiesEventDetail = QualityDetail[];
1201
+
1202
+ /**
1203
+ * @public
1204
+ */
1205
+ declare type QualityDetail = {
1206
+ level: number;
1207
+ text: string;
1208
+ width: number;
1209
+ height: number;
1210
+ videoCodec: string;
1211
+ } | BitrateInfo | {
1212
+ text: string | number;
1213
+ encodingId: string;
1214
+ spatialLayerId: number;
1215
+ temporalLayerId: number;
1216
+ maxSpatialLayerId: number;
1217
+ maxTemporalLayerId: number;
1218
+ height: number;
1219
+ width: number;
1220
+ };
1221
+
297
1222
  declare enum QualityOpts {
298
1223
  LOW = 1,
299
1224
  MEDIUM = 2,
300
1225
  HIGH = 4
301
1226
  }
302
1227
 
1228
+ /**
1229
+ * @public
1230
+ * emitted when it is safe to clean up a fp instance
1231
+ */
1232
+ declare const /**
1233
+ @public
1234
+ * when a new player is inserted into the HTML
1235
+ */ /**
1236
+ * @public
1237
+ * emitted when it is safe to clean up a fp instance
1238
+ */
1239
+ REAP = "reap";
1240
+
1241
+ /**
1242
+ * @public
1243
+ */
1244
+ declare type ReapEventDetail = null;
1245
+
1246
+ /**
1247
+ * @public
1248
+ */
1249
+ declare type RecommendationItem = {
1250
+ poster?: string;
1251
+ src?: UnsafeSource;
1252
+ title?: string;
1253
+ description?: string;
1254
+ metadata: OVPMetadata;
1255
+ chapters?: {
1256
+ src: string;
1257
+ };
1258
+ thumbnails?: {
1259
+ src: string;
1260
+ };
1261
+ subtitles?: string[];
1262
+ };
1263
+
1264
+ /**
1265
+ * @public
1266
+ */
1267
+ declare const /**
1268
+ @public
1269
+ * when a new player is inserted into the HTML
1270
+ */ /**
1271
+ * @deprecated please use Endscreen.events.RECOMMENDATIONS_READY / flowplayer.endscreen.events.RECOMMENDATIONS_READY
1272
+ **/
1273
+ /**
1274
+ * @public
1275
+ */
1276
+ RECOMMENDATIONS_READY = "recommendationsready";
1277
+
1278
+ /**
1279
+ * @public
1280
+ */
1281
+ declare type RecommendationsReadyEventDetail = {
1282
+ playlist: RecommendationItem[];
1283
+ };
1284
+
1285
+ /* Excluded from this release type: RECOVER */
1286
+
1287
+ /* Excluded from this release type: RecoverEventDetail */
1288
+
1289
+ /* Excluded from this release type: REMOTE_SESSION_ENDED */
1290
+
1291
+ /* Excluded from this release type: REMOTE_SESSION_STARTED */
1292
+
1293
+ /* Excluded from this release type: RENDER_PLUGIN */
1294
+
1295
+ /**
1296
+ * @public
1297
+ */
1298
+ declare type RenderPluginEventDetail = HTMLElement;
1299
+
1300
+ /**
1301
+ * @public
1302
+ */
1303
+ declare const /**
1304
+ @public
1305
+ * when a new player is inserted into the HTML
1306
+ */ /**
1307
+ * @public
1308
+ */
1309
+ RESIZE = "resize";
1310
+
1311
+ /* Excluded from this release type: RETRY */
1312
+
1313
+ /* Excluded from this release type: RetryEventDetail */
1314
+
1315
+ declare const RTL = "is-rtl";
1316
+
1317
+ /**
1318
+ * @public
1319
+ */
1320
+ declare const /**
1321
+ @public
1322
+ * when a new player is inserted into the HTML
1323
+ */ /**
1324
+ * @public
1325
+ */
1326
+ SCROLL = "scroll";
1327
+
1328
+ declare const SEAMLESS = "is-seamless";
1329
+
1330
+ /* Excluded from this release type: SEEK_CANCEL */
1331
+
1332
+ /* Excluded from this release type: SEEK_QUEUED */
1333
+
1334
+ declare const SEEKABLE = "is-seekable";
1335
+
1336
+ /* Excluded from this release type: SeekCancelEventDetail */
1337
+
1338
+ /**
1339
+ * @public
1340
+ */
1341
+ declare const /**
1342
+ @public
1343
+ * when a new player is inserted into the HTML
1344
+ */ /**
1345
+ * @public
1346
+ */
1347
+ SEEKED = "seeked";
1348
+
1349
+ declare const SEEKING = "is-seeking";
1350
+
1351
+ /**
1352
+ * @public
1353
+ */
1354
+ declare const /**
1355
+ @public
1356
+ * when a new player is inserted into the HTML
1357
+ */ /**
1358
+ * @public
1359
+ */
1360
+ SEEKING_2 = "seeking";
1361
+
1362
+ /* Excluded from this release type: SeekQueuedEventDetail */
1363
+
1364
+ /**
1365
+ * @public
1366
+ * allows plugins to listen for forced quality changes
1367
+ * it should emit the index of the quality to set
1368
+ * -1 is a special idx saying to use ABR if the plugin
1369
+ * exposes an ABR implementation
1370
+ */
1371
+ declare const /**
1372
+ @public
1373
+ * when a new player is inserted into the HTML
1374
+ */ /**
1375
+ * @public
1376
+ * allows plugins to listen for forced quality changes
1377
+ * it should emit the index of the quality to set
1378
+ * -1 is a special idx saying to use ABR if the plugin
1379
+ * exposes an ABR implementation
1380
+ */
1381
+ SET_QUALITY = "quality:set";
1382
+
1383
+ declare const SMALL = "is-small";
1384
+
1385
+ /**
1386
+ * @public
1387
+ * emitted when a valid source is found prior to mounting
1388
+ */
1389
+ declare const /**
1390
+ @public
1391
+ * when a new player is inserted into the HTML
1392
+ */ /**
1393
+ * @public
1394
+ * emitted when a valid source is found prior to mounting
1395
+ */
1396
+ SOURCE = "src";
1397
+
1398
+ /**
1399
+ * @public
1400
+ */
1401
+ declare type SourceEventDetail = SourceObj;
1402
+
1403
+ /**
1404
+ * @public
1405
+ */
303
1406
  declare type SourceObj = {
304
1407
  src?: SourceStr;
1408
+ /**
1409
+ * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1410
+ */
305
1411
  type?: string;
306
1412
  drm?: DRMSourceConfiguration;
307
1413
  };
308
1414
 
1415
+ /**
1416
+ * @public
1417
+ */
309
1418
  declare type SourceStr = string;
310
1419
 
1420
+ /**
1421
+ * @public
1422
+ */
311
1423
  declare type SourceWith<T> = SourceObj & T;
312
1424
 
1425
+ declare const STARTING = "is-starting";
1426
+
1427
+ /* Excluded from this release type: STATE */
1428
+
1429
+ /* Excluded from this release type: StateEventDetail */
1430
+
1431
+ declare namespace states {
1432
+ export {
1433
+ PLAYING,
1434
+ FULLSCREEN,
1435
+ PAUSED,
1436
+ MUTED,
1437
+ LOADED,
1438
+ LOADING,
1439
+ STARTING,
1440
+ SEEKING,
1441
+ GRABBING,
1442
+ DISABLED,
1443
+ SMALL,
1444
+ TINY,
1445
+ RTL,
1446
+ TV,
1447
+ ENDED,
1448
+ LIVE,
1449
+ ERRORED,
1450
+ WAITING,
1451
+ AUTOPLAY,
1452
+ SEAMLESS,
1453
+ TOGGLING,
1454
+ LIVE_SEEKED,
1455
+ NO_DVR,
1456
+ HAS_POSTER,
1457
+ WILL_PLAY,
1458
+ WILL_PAUSE,
1459
+ MENU_OPENED,
1460
+ TOUCHED,
1461
+ HOVERED,
1462
+ TOUCH_DEVICE,
1463
+ WILL_SEEK,
1464
+ SEEKABLE,
1465
+ IN_VIEWPORT,
1466
+ NO_CONTROLS,
1467
+ DESTROYED,
1468
+ IS_SOURCE_PROCESSING
1469
+ }
1470
+ }
1471
+
313
1472
  /**
314
1473
  * @public
315
1474
  * html subtitles plugin
316
1475
  **/
317
- declare const Subtitles: PluginCtor<SubtitlesConfig, SubtitlesPlayerAPI> & SubtitlesAPI;
1476
+ declare const Subtitles: PluginCtor<SubtitlesConfig, SubtitlesPlayer> & SubtitlesAPI;
318
1477
  export default Subtitles;
319
1478
 
320
1479
  /**
@@ -356,15 +1515,15 @@ export declare type SubtitlesConfig = ConfigWith<{
356
1515
  * @public
357
1516
  * Defines all the events that the Subtitles plugin emits.
358
1517
  */
359
- export declare type SubtitlesEvents = typeof events;
1518
+ export declare type SubtitlesEvents = typeof events_2;
360
1519
 
361
1520
  /**
362
1521
  * @public
363
1522
  * This type is used to extend the Player API with the Subtitles API.
364
1523
  */
365
- export declare type SubtitlesPlayerAPI = {
1524
+ export declare type SubtitlesPlayer = PlayerWith<{
366
1525
  on(event: SubtitlesEvents["TRACK_UPDATED"], handler: (e: SubtitlesTracksEvent) => void): Player;
367
- };
1526
+ }>;
368
1527
 
369
1528
  /**
370
1529
  * @public
@@ -413,6 +1572,69 @@ export declare type TextTrackWithAttributes = TextTrack & {
413
1572
  attr?: LevelAttributes;
414
1573
  };
415
1574
 
1575
+ /**
1576
+ * @public
1577
+ */
1578
+ declare const /**
1579
+ @public
1580
+ * when a new player is inserted into the HTML
1581
+ */ /**
1582
+ * @public
1583
+ */
1584
+ TIME_UPDATE = "timeupdate";
1585
+
1586
+ declare const TINY = "is-tiny";
1587
+
1588
+ declare const TOGGLING = "is-toggling";
1589
+
1590
+ /**
1591
+ * @public
1592
+ */
1593
+ declare const /**
1594
+ @public
1595
+ * when a new player is inserted into the HTML
1596
+ */ /**
1597
+ * @public
1598
+ */
1599
+ TOUCH_CANCEL = "touchcancel";
1600
+
1601
+ declare const TOUCH_DEVICE = "is-touch-device";
1602
+
1603
+ /**
1604
+ * @public
1605
+ */
1606
+ declare const /**
1607
+ @public
1608
+ * when a new player is inserted into the HTML
1609
+ */ /**
1610
+ * @public
1611
+ */
1612
+ TOUCH_END = "touchend";
1613
+
1614
+ /**
1615
+ * @public
1616
+ */
1617
+ declare const /**
1618
+ @public
1619
+ * when a new player is inserted into the HTML
1620
+ */ /**
1621
+ * @public
1622
+ */
1623
+ TOUCH_MOVE = "touchmove";
1624
+
1625
+ /**
1626
+ * @public
1627
+ */
1628
+ declare const /**
1629
+ @public
1630
+ * when a new player is inserted into the HTML
1631
+ */ /**
1632
+ * @public
1633
+ */
1634
+ TOUCH_START = "touchstart";
1635
+
1636
+ declare const TOUCHED = "is-touched";
1637
+
416
1638
  /**
417
1639
  * @public
418
1640
  * Represents the event type for text track updates.
@@ -425,13 +1647,115 @@ declare const TRACK_UPDATED = "tracks:text:updated";
425
1647
  */
426
1648
  declare const TRACKS = "subs:tracks";
427
1649
 
1650
+ declare const TV = "is-tv";
1651
+
1652
+ /**
1653
+ * @public
1654
+ */
428
1655
  declare type UnsafeSource = SourceStr | SourceObj | Array<SourceStr | SourceObj>;
429
1656
 
1657
+ /**
1658
+ * @public
1659
+ * emitted when a video track is selected
1660
+ */
1661
+ declare const /**
1662
+ @public
1663
+ * when a new player is inserted into the HTML
1664
+ */ /**
1665
+ * @public
1666
+ * emitted when a video track is selected
1667
+ */
1668
+ VIDEO_TRACK_SELECT = "tracks:video:select";
1669
+
1670
+ /**
1671
+ * @public
1672
+ * emitted whenever multiple video tracks are detected
1673
+ */
1674
+ declare const /**
1675
+ @public
1676
+ * when a new player is inserted into the HTML
1677
+ */ /**
1678
+ * @public
1679
+ * emitted whenever multiple video tracks are detected
1680
+ */
1681
+ VIDEO_TRACKS = "videoTracks";
1682
+
1683
+ /**
1684
+ * @public
1685
+ */
430
1686
  declare interface VideoTrack {
431
1687
  name: string;
432
- data: any;
1688
+ /* Excluded from this release type: data */
433
1689
  default: boolean;
434
1690
  selected: boolean;
435
1691
  }
436
1692
 
1693
+ /**
1694
+ * @public
1695
+ * when a player enters the viewpoint
1696
+ */
1697
+ declare const /**
1698
+ @public
1699
+ * when a new player is inserted into the HTML
1700
+ */ /**
1701
+ * @public
1702
+ * when a player enters the viewpoint
1703
+ */
1704
+ VIEW_ENTER = "viewenter";
1705
+
1706
+ /**
1707
+ * @public
1708
+ * when a player leaves the viewport
1709
+ */
1710
+ declare const /**
1711
+ @public
1712
+ * when a new player is inserted into the HTML
1713
+ */ /**
1714
+ * @public
1715
+ * when a player leaves the viewport
1716
+ */
1717
+ VIEW_LEAVE = "viewleave";
1718
+
1719
+ /**
1720
+ * @public
1721
+ */
1722
+ declare type ViewEnterEventDetail = null;
1723
+
1724
+ /**
1725
+ * @public
1726
+ */
1727
+ declare type ViewLeaveEventDetail = null;
1728
+
1729
+ /**
1730
+ * @public
1731
+ */
1732
+ declare const /**
1733
+ @public
1734
+ * when a new player is inserted into the HTML
1735
+ */ /**
1736
+ * @public
1737
+ */
1738
+ VOLUME_CHANGE = "volumechange";
1739
+
1740
+ declare const WAITING = "is-waiting";
1741
+
1742
+ /**
1743
+ * @public
1744
+ */
1745
+ declare const /**
1746
+ @public
1747
+ * when a new player is inserted into the HTML
1748
+ */ /**
1749
+ * @public
1750
+ */
1751
+ WAITING_2 = "waiting";
1752
+
1753
+ /* Excluded from this release type: WEBKIT_NEEDKEY */
1754
+
1755
+ declare const WILL_PAUSE = "will-pause";
1756
+
1757
+ declare const WILL_PLAY = "will-play";
1758
+
1759
+ declare const WILL_SEEK = "will-seek";
1760
+
437
1761
  export { }