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