@flowplayer/player 3.14.1 → 3.15.0-rc.10

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