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