@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
package/plugins/id3.d.ts CHANGED
@@ -1,10 +1,31 @@
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
+ declare const AUTOPLAY = "is-autoplay";
25
+
26
+ /**
27
+ * @public
28
+ */
8
29
  declare type Autoplay = BitOpts | boolean;
9
30
 
10
31
  declare enum AutoplayOpts {
@@ -13,19 +34,60 @@ declare enum AutoplayOpts {
13
34
  AUDIO_REQUIRED = 2
14
35
  }
15
36
 
16
- declare type BitOpts = number;
37
+ /* Excluded from this release type: BEFORE_PAUSE */
38
+
39
+ /* Excluded from this release type: BEFORE_PLAY */
17
40
 
18
- declare type Component = {
19
- onrender?: (config: Config, root: PlayerRoot, player: Player) => void;
20
- onremove?: (config: Config, root: PlayerRoot, player: Player) => void;
41
+ /**
42
+ * @public
43
+ */
44
+ declare type BeforePauseEventDetail = {
45
+ forced: boolean;
21
46
  };
22
47
 
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
- }
48
+ /**
49
+ * @public
50
+ */
51
+ declare type BeforePlayEventDetail = {
52
+ forced: boolean;
53
+ };
54
+
55
+ /**
56
+ * @public
57
+ */
58
+ declare type BitOpts = number;
59
+
60
+ /**
61
+ * @public
62
+ */
63
+ declare const /**
64
+ @public
65
+ * when a new player is inserted into the HTML
66
+ */ /**
67
+ * @public
68
+ */
69
+ CAN_PLAY = "canplay";
70
+
71
+ /**
72
+ * @public
73
+ */
74
+ declare const /**
75
+ @public
76
+ * when a new player is inserted into the HTML
77
+ */ /**
78
+ * @public
79
+ */
80
+ CLICK = "click";
81
+
82
+ /* Excluded from this release type: Component */
83
+
84
+ /* Excluded from this release type: Components */
85
+
86
+ /* Excluded from this release type: CONFIG */
28
87
 
88
+ /**
89
+ * @public
90
+ */
29
91
  declare interface Config {
30
92
  src?: UnsafeSource;
31
93
  preload?: "none" | "metadata" | "auto";
@@ -35,7 +97,7 @@ declare interface Config {
35
97
  autopause?: boolean;
36
98
  rewind?: boolean;
37
99
  loop?: boolean;
38
- seamless?: boolean;
100
+ /* Excluded from this release type: seamless */
39
101
  retry?: boolean;
40
102
  autoplay?: Autoplay;
41
103
  start_quality?: BitOpts;
@@ -43,10 +105,7 @@ declare interface Config {
43
105
  poster?: string;
44
106
  disabled?: boolean;
45
107
  muted?: boolean;
46
- /**
47
- * is src handled by one of plugins loaders
48
- */
49
- is_native?: boolean;
108
+ /* Excluded from this release type: is_native */
50
109
  /**
51
110
  * bitflags for UI options
52
111
  */
@@ -55,10 +114,7 @@ declare interface Config {
55
114
  * your user access token
56
115
  */
57
116
  token?: string;
58
- /**
59
- * manually configured duration for pre-rendering usually
60
- */
61
- duration?: number;
117
+ /* Excluded from this release type: duration */
62
118
  /**
63
119
  * can the content be seeked to any position
64
120
  */
@@ -76,15 +132,120 @@ declare interface Config {
76
132
  seconds_to_dvr?: number;
77
133
  }
78
134
 
135
+ /* Excluded from this release type: ConfigEventDetail */
136
+
137
+ /**
138
+ * @public
139
+ */
79
140
  declare type ConfigWith<T> = Config & T;
80
141
 
81
- declare const _default: PluginCtor<KeyValue, KeyValue>;
82
- export default _default;
142
+ /* Excluded from this release type: CONTENT_REAL_LOAD_START */
143
+
144
+ /**
145
+ * @public
146
+ */
147
+ declare const /**
148
+ @public
149
+ * when a new player is inserted into the HTML
150
+ */ /**
151
+ * @public
152
+ */
153
+ CONTEXT_MENU = "contextmenu";
154
+
155
+ /**
156
+ * @public
157
+ */
158
+ declare type ContextMenuEventDetail = null;
159
+
160
+ /**
161
+ * @public
162
+ * when a cuepoint becomes inactive
163
+ */
164
+ declare const /**
165
+ @public
166
+ * when a new player is inserted into the HTML
167
+ */ /**
168
+ * @public
169
+ * when a cuepoint becomes inactive
170
+ */
171
+ CUEPOINT_END = "cuepointend";
172
+
173
+ /**
174
+ * @public
175
+ * when a cuepoint is active
176
+ */
177
+ declare const /**
178
+ @public
179
+ * when a new player is inserted into the HTML
180
+ */ /**
181
+ * @public
182
+ * when a cuepoint is active
183
+ */
184
+ CUEPOINT_START = "cuepointstart";
185
+
186
+ /**
187
+ * @public
188
+ */
189
+ declare type CuePointEndEventDetail = null;
190
+
191
+ /**
192
+ * @public
193
+ * cuepoints parsing is asynchronous
194
+ * you cannot rely on them existing until
195
+ * this event is emitted
196
+ */
197
+ declare const /**
198
+ @public
199
+ * when a new player is inserted into the HTML
200
+ */ /**
201
+ * @public
202
+ * cuepoints parsing is asynchronous
203
+ * you cannot rely on them existing until
204
+ * this event is emitted
205
+ */
206
+ CUEPOINTS = "cuepoints";
207
+
208
+ /**
209
+ * @public
210
+ */
211
+ declare type CuePointStartEventDetail = null;
212
+
213
+ /**
214
+ * @public
215
+ */
216
+ declare const /**
217
+ @public
218
+ * when a new player is inserted into the HTML
219
+ */ /**
220
+ * @public
221
+ */
222
+ DATA = "loadeddata";
223
+
224
+ /**
225
+ * @public
226
+ */
227
+ declare const /**
228
+ @public
229
+ * when a new player is inserted into the HTML
230
+ */ /**
231
+ * @public
232
+ */
233
+ DBL_CLICK = "dblclick";
234
+
235
+ declare const DESTROYED = "is-destroyed";
236
+
237
+ /* Excluded from this release type: DeviceId */
83
238
 
84
- declare type DeviceId = string;
239
+ declare const DISABLED = "is-disabled";
85
240
 
241
+ /**
242
+ * @public
243
+ */
86
244
  declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
87
245
 
246
+ /**
247
+ * @public
248
+ */
88
249
  declare type DRMConfiguration = {
89
250
  license_server: string;
90
251
  http_headers?: Record<string, string>;
@@ -94,10 +255,16 @@ declare type DRMConfiguration = {
94
255
  query_params?: Record<string, string>;
95
256
  };
96
257
 
258
+ /**
259
+ * @public
260
+ */
97
261
  declare type DRMSourceConfiguration = {
98
262
  [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
99
263
  };
100
264
 
265
+ /**
266
+ * @public
267
+ */
101
268
  declare type DRMVendorImplementation = {
102
269
  fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
103
270
  fairplay_request_license: (url: string, params: {
@@ -106,41 +273,229 @@ declare type DRMVendorImplementation = {
106
273
  }, cb: (license_data: Uint8Array) => void) => void;
107
274
  };
108
275
 
276
+ /**
277
+ * @public
278
+ */
279
+ declare const /**
280
+ @public
281
+ * when a new player is inserted into the HTML
282
+ */ /**
283
+ * @public
284
+ */
285
+ DURATION_CHANGE = "durationchange";
286
+
287
+ /**
288
+ * @public
289
+ * when the player has started playing dvr content
290
+ */
291
+ declare const /**
292
+ @public
293
+ * when a new player is inserted into the HTML
294
+ */ /**
295
+ * @public
296
+ * when the player has started playing dvr content
297
+ */
298
+ DVR = "dvr";
299
+
300
+ /**
301
+ * @public
302
+ */
303
+ declare type DvrEventDetail = number;
304
+
305
+ declare const ENDED = "is-ended";
306
+
307
+ /**
308
+ * @public
309
+ */
310
+ declare const /**
311
+ @public
312
+ * when a new player is inserted into the HTML
313
+ */ /**
314
+ * @public
315
+ */
316
+ ENDED_2 = "ended";
317
+
318
+ declare type EnsureOnAttached<P extends Function, T extends Player> = ExtractPureAPI<T> extends _AttachedEventCheck ? P : "Loaders must implement on('<pluginname>:attached') event";
319
+
320
+ /**
321
+ * @public
322
+ */
323
+ declare const /**
324
+ @public
325
+ * when a new player is inserted into the HTML
326
+ */ /**
327
+ * @public
328
+ */
329
+ ERROR = "error";
330
+
331
+ declare const ERRORED = "is-error";
332
+
333
+ /**
334
+ * @public
335
+ */
336
+ declare type ErrorEventDetail = {
337
+ src?: string;
338
+ type?: string;
339
+ code?: number | string;
340
+ };
341
+
342
+ /* Excluded from this release type: _ErrorEventDetail */
343
+
344
+ declare namespace events {
345
+ export {
346
+ MOUNT,
347
+ ERROR,
348
+ CONTEXT_MENU,
349
+ CLICK,
350
+ DBL_CLICK,
351
+ KEYUP,
352
+ KEYDOWN,
353
+ LOAD,
354
+ MOUSE_ENTER,
355
+ MOUSE_LEAVE,
356
+ MOUSE_UP,
357
+ MOUSE_DOWN,
358
+ MOUSE_MOVE,
359
+ TOUCH_START,
360
+ TOUCH_MOVE,
361
+ TOUCH_END,
362
+ TOUCH_CANCEL,
363
+ RESIZE,
364
+ SCROLL,
365
+ FULLSCREEN_ENTER,
366
+ FULLSCREEN_EXIT,
367
+ FULLSCREEN_CHANGE,
368
+ METADATA,
369
+ DATA,
370
+ PROGRESS,
371
+ TIME_UPDATE,
372
+ LOAD_START,
373
+ VOLUME_CHANGE,
374
+ PAUSE,
375
+ PLAYING_2 as PLAYING,
376
+ PLAY,
377
+ WAITING_2 as WAITING,
378
+ CAN_PLAY,
379
+ ENDED_2 as ENDED,
380
+ SEEKED,
381
+ SEEKING_2 as SEEKING,
382
+ DURATION_CHANGE,
383
+ CUEPOINTS,
384
+ CUEPOINT_START,
385
+ CUEPOINT_END,
386
+ VIEW_ENTER,
387
+ VIEW_LEAVE,
388
+ SOURCE,
389
+ REAP,
390
+ QUALITIES,
391
+ VIDEO_TRACKS,
392
+ SET_QUALITY,
393
+ VIDEO_TRACK_SELECT,
394
+ RECOMMENDATIONS_READY,
395
+ LANDSCAPE,
396
+ PORTRAIT,
397
+ DVR,
398
+ LIVE_2 as LIVE
399
+ }
400
+ }
401
+
402
+ declare type ExtractPureAPI<T> = T extends PlayerWith<infer PureAPI> ? PureAPI : never;
403
+
404
+ /**
405
+ * @public
406
+ */
109
407
  declare type FlowplayerCustomElementRegistry = Map<string, string>;
110
408
 
409
+ /**
410
+ * @public
411
+ */
412
+ declare type FlowplayerStates = typeof states;
413
+
414
+ /**
415
+ * @public
416
+ */
111
417
  declare interface FlowplayerUMD extends FlowplayerUMDBase {
418
+ /**
419
+ * Configure flowplayer and display it in the UI
420
+ * @param selector - query selector of the HTML element where player will render
421
+ * @param config - configuration of flowplayer
422
+ */
112
423
  (selector: string, config?: Config): Player;
424
+ /**
425
+ * Configure flowplayer and display it in the UI
426
+ * @param element - HTML element where player will render
427
+ * @param config - configuration of flowplayer
428
+ */
113
429
  (element: HTMLElement, config?: Config): Player;
430
+ /**
431
+ * Configure flowplayer and display it in the UI
432
+ * @param selector - query selector of the HTML element where player will render
433
+ * @param config - configuration of flowplayer
434
+ */
114
435
  <T>(selector: string, config?: ConfigWith<T>): Player;
436
+ /**
437
+ * Configure flowplayer and display it in the UI
438
+ * @param element - HTML element where player will render
439
+ * @param config - configuration of flowplayer
440
+ */
115
441
  <T>(element: HTMLElement, config?: ConfigWith<T>): Player;
442
+ /**
443
+ * Register plugins in flowplayer
444
+ * @returns flowplayer instance with registered plugins
445
+ */
116
446
  <PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<ConfigWith<MergeConfigs<PluginCtors>>, PlayerWith<MergePlayerAPIExtensions<PluginCtors>>>;
117
447
  }
118
448
 
119
449
  declare interface FlowplayerUMDBase {
450
+ /**
451
+ * All player instances on the page
452
+ */
120
453
  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>;
454
+ /**
455
+ * Flowplayer core events
456
+ */
457
+ events: typeof events;
458
+ /**
459
+ * Flowplayer ui states map
460
+ */
461
+ states: FlowplayerStates;
127
462
  quality: typeof QualityOpts;
463
+ autoplay: typeof AutoplayOpts;
128
464
  commit: string;
129
465
  version: string;
466
+ /**
467
+ * Flowplayer's custom element registry
468
+ */
130
469
  customElements: FlowplayerCustomElementRegistry;
131
- defaultElements: Record<string, string>;
132
- components: Components;
133
- support: any;
134
- autoplay: typeof AutoplayOpts;
135
- jwt: any;
136
- loaders: any;
470
+ /* Excluded from this release type: extensions */
471
+ /* Excluded from this release type: defaultElements */
472
+ /* Excluded from this release type: components */
473
+ /* Excluded from this release type: support */
474
+ /* Excluded from this release type: jwt */
475
+ /* Excluded from this release type: loaders */
137
476
  }
138
477
 
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;
478
+ /**
479
+ * @public
480
+ */
481
+ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config, PluginPlayer extends Player = Player> extends FlowplayerUMDBase {
482
+ /**
483
+ * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
484
+ * @param selector - query selector of the HTML element where player will render
485
+ * @param config - Configuration of the flowplayer and the attached plugins
486
+ */
487
+ (selector: string, config?: ConfigWithPlugins): PluginPlayer;
488
+ /**
489
+ * Configure flowplayer, it's attached plugins and display flowplayer it in the UI
490
+ * @param element - HTML element where player will render
491
+ * @param config - Configuration of the flowplayer and the attached plugins
492
+ */
493
+ (element: HTMLElement, config?: ConfigWithPlugins): PluginPlayer;
142
494
  }
143
495
 
496
+ /**
497
+ * @public
498
+ */
144
499
  declare interface FPEvent<T> extends CustomEvent<T> {
145
500
  /**
146
501
  * @deprecated
@@ -150,118 +505,1090 @@ declare interface FPEvent<T> extends CustomEvent<T> {
150
505
  data?: T;
151
506
  }
152
507
 
508
+ declare const FULLSCREEN = "is-fullscreen";
509
+
510
+ /**
511
+ * @public
512
+ */
513
+ declare const /**
514
+ @public
515
+ * when a new player is inserted into the HTML
516
+ */ /**
517
+ * @public
518
+ */
519
+ FULLSCREEN_CHANGE = "fullscreenchange";
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_ENTER = "fullscreenenter";
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_EXIT = "fullscreenexit";
542
+
543
+ declare const GRABBING = "is-grabbing";
544
+
545
+ declare const HAS_POSTER = "has-poster";
546
+
547
+ declare const HOVERED = "is-hovered";
548
+
549
+ /**
550
+ * @public
551
+ */
552
+ declare const ID3: PluginCtor<Config, Player>;
553
+ export default ID3;
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 { }