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