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