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