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