@flowplayer/player 3.14.1 → 3.15.0-rc.10

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