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