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