@flowplayer/player 3.14.1 → 3.15.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/core/events.d.ts +575 -68
  2. package/core/events.js +286 -34
  3. package/core.js +1 -1
  4. package/default.js +1 -1
  5. package/embed.js +2 -2
  6. package/flowplayer.css +1 -1
  7. package/index.d.ts +1480 -91
  8. package/package.json +1 -1
  9. package/plugins/ads.d.ts +3744 -112
  10. package/plugins/ads.js +1 -1
  11. package/plugins/airplay.d.ts +1440 -116
  12. package/plugins/airplay.js +1 -1
  13. package/plugins/analytics.d.ts +1409 -82
  14. package/plugins/analytics.js +1 -1
  15. package/plugins/asel.d.ts +1409 -82
  16. package/plugins/asel.js +1 -1
  17. package/plugins/audio.d.ts +1409 -82
  18. package/plugins/audio.js +1 -1
  19. package/plugins/chapters.d.ts +1409 -82
  20. package/plugins/chapters.js +1 -1
  21. package/plugins/chromecast.d.ts +1464 -80
  22. package/plugins/chromecast.js +1 -1
  23. package/plugins/comscore.d.ts +1409 -82
  24. package/plugins/consent.d.ts +1409 -82
  25. package/plugins/consent.js +1 -1
  26. package/plugins/context-menu.d.ts +1443 -116
  27. package/plugins/cuepoints.d.ts +1443 -116
  28. package/plugins/cuepoints.js +1 -1
  29. package/plugins/dash.d.ts +1445 -115
  30. package/plugins/dash.js +1 -1
  31. package/plugins/drm.d.ts +1409 -82
  32. package/plugins/drm.js +1 -1
  33. package/plugins/endscreen.d.ts +1442 -115
  34. package/plugins/endscreen.js +1 -1
  35. package/plugins/fas.d.ts +1409 -82
  36. package/plugins/float-on-scroll.d.ts +1443 -116
  37. package/plugins/float-on-scroll.js +1 -1
  38. package/plugins/ga4.d.ts +1409 -82
  39. package/plugins/gemius.d.ts +1439 -112
  40. package/plugins/google-analytics.d.ts +1409 -82
  41. package/plugins/health.d.ts +1435 -107
  42. package/plugins/health.js +1 -1
  43. package/plugins/hls.d.ts +1431 -104
  44. package/plugins/hls.js +1 -1
  45. package/plugins/id3.d.ts +1409 -82
  46. package/plugins/id3.js +1 -1
  47. package/plugins/iframe.d.ts +1440 -116
  48. package/plugins/iframe.js +1 -1
  49. package/plugins/keyboard.d.ts +1409 -82
  50. package/plugins/media-session.d.ts +1409 -82
  51. package/plugins/message.d.ts +1409 -82
  52. package/plugins/message.js +1 -1
  53. package/plugins/ovp.d.ts +1435 -110
  54. package/plugins/ovp.js +1 -1
  55. package/plugins/playlist.d.ts +1409 -82
  56. package/plugins/playlist.js +1 -1
  57. package/plugins/preview.d.ts +1409 -82
  58. package/plugins/preview.js +1 -1
  59. package/plugins/qsel.d.ts +1409 -82
  60. package/plugins/qsel.js +1 -1
  61. package/plugins/qul.d.ts +1441 -114
  62. package/plugins/qul.js +1 -1
  63. package/plugins/rts.d.ts +1409 -82
  64. package/plugins/rts.js +1 -1
  65. package/plugins/share.d.ts +1409 -82
  66. package/plugins/share.js +1 -1
  67. package/plugins/speed.d.ts +1434 -107
  68. package/plugins/speed.js +1 -1
  69. package/plugins/ssai.d.ts +1412 -82
  70. package/plugins/ssai.js +1 -1
  71. package/plugins/subtitles.d.ts +1426 -102
  72. package/plugins/thumbnails.d.ts +1434 -107
  73. package/plugins/thumbnails.js +1 -1
  74. package/plugins/tizen.d.ts +1409 -82
  75. package/plugins/tizen.js +1 -1
  76. package/plugins/vtsel.d.ts +1409 -82
  77. package/plugins/vtsel.js +1 -1
  78. package/plugins/webos.d.ts +1409 -82
  79. package/plugins/webos.js +1 -1
  80. package/util/loader.d.ts +1436 -101
  81. package/util/loader.js +13 -2
@@ -1,10 +1,31 @@
1
+ /// <reference types="node" />
2
+
3
+ import type { BitrateInfo } from 'dashjs';
1
4
  import type { MediaKeyFunc } from 'hls.js';
2
5
 
6
+ /* Excluded from this release type: AnyLoader */
7
+
3
8
  declare type ArrayToIntersection<T extends Array<unknown>> = T extends [
4
9
  infer Current,
5
10
  ...infer Remaining
6
11
  ] ? Current & ArrayToIntersection<Remaining> : unknown;
7
12
 
13
+ /**
14
+ * Each loader must
15
+ */
16
+ declare type _AttachedEventCheck = {
17
+ on(event: `${string}:attached`, handler: (e: FPEvent<unknown>) => void): Player;
18
+ };
19
+
20
+ /* Excluded from this release type: AUDIO_ONLY_SOURCE */
21
+
22
+ /* Excluded from this release type: AudioOnlySourceEventDetail */
23
+
24
+ declare const AUTOPLAY = "is-autoplay";
25
+
26
+ /**
27
+ * @public
28
+ */
8
29
  declare type Autoplay = BitOpts | boolean;
9
30
 
10
31
  declare enum AutoplayOpts {
@@ -13,19 +34,60 @@ declare enum AutoplayOpts {
13
34
  AUDIO_REQUIRED = 2
14
35
  }
15
36
 
16
- declare type BitOpts = number;
37
+ /* Excluded from this release type: BEFORE_PAUSE */
38
+
39
+ /* Excluded from this release type: BEFORE_PLAY */
40
+
41
+ /**
42
+ * @public
43
+ */
44
+ declare type BeforePauseEventDetail = {
45
+ forced: boolean;
46
+ };
17
47
 
18
- declare type Component = {
19
- onrender?: (config: Config, root: PlayerRoot, player: Player) => void;
20
- onremove?: (config: Config, root: PlayerRoot, player: Player) => void;
48
+ /**
49
+ * @public
50
+ */
51
+ declare type BeforePlayEventDetail = {
52
+ forced: boolean;
21
53
  };
22
54
 
23
- declare interface Components {
24
- render(key: string, args: any[]): void;
25
- remove(key: string, args: any[]): void;
26
- put(key: string, args: Component): void;
27
- }
55
+ /**
56
+ * @public
57
+ */
58
+ declare type BitOpts = number;
59
+
60
+ /**
61
+ * @public
62
+ */
63
+ declare const /**
64
+ @public
65
+ * when a new player is inserted into the HTML
66
+ */ /**
67
+ * @public
68
+ */
69
+ CAN_PLAY = "canplay";
70
+
71
+ /**
72
+ * @public
73
+ */
74
+ declare const /**
75
+ @public
76
+ * when a new player is inserted into the HTML
77
+ */ /**
78
+ * @public
79
+ */
80
+ CLICK = "click";
81
+
82
+ /* Excluded from this release type: Component */
28
83
 
84
+ /* Excluded from this release type: Components */
85
+
86
+ /* Excluded from this release type: CONFIG */
87
+
88
+ /**
89
+ * @public
90
+ */
29
91
  declare interface Config {
30
92
  src?: UnsafeSource;
31
93
  preload?: "none" | "metadata" | "auto";
@@ -35,7 +97,7 @@ declare interface Config {
35
97
  autopause?: boolean;
36
98
  rewind?: boolean;
37
99
  loop?: boolean;
38
- seamless?: boolean;
100
+ /* Excluded from this release type: seamless */
39
101
  retry?: boolean;
40
102
  autoplay?: Autoplay;
41
103
  start_quality?: BitOpts;
@@ -43,10 +105,7 @@ declare interface Config {
43
105
  poster?: string;
44
106
  disabled?: boolean;
45
107
  muted?: boolean;
46
- /**
47
- * is src handled by one of plugins loaders
48
- */
49
- is_native?: boolean;
108
+ /* Excluded from this release type: is_native */
50
109
  /**
51
110
  * bitflags for UI options
52
111
  */
@@ -55,10 +114,7 @@ declare interface Config {
55
114
  * your user access token
56
115
  */
57
116
  token?: string;
58
- /**
59
- * manually configured duration for pre-rendering usually
60
- */
61
- duration?: number;
117
+ /* Excluded from this release type: duration */
62
118
  /**
63
119
  * can the content be seeked to any position
64
120
  */
@@ -76,15 +132,120 @@ declare interface Config {
76
132
  seconds_to_dvr?: number;
77
133
  }
78
134
 
135
+ /* Excluded from this release type: ConfigEventDetail */
136
+
137
+ /**
138
+ * @public
139
+ */
79
140
  declare type ConfigWith<T> = Config & T;
80
141
 
81
- declare const _default: PluginCtor<KeyValue, KeyValue>;
82
- export default _default;
142
+ /* Excluded from this release type: CONTENT_REAL_LOAD_START */
143
+
144
+ /**
145
+ * @public
146
+ */
147
+ declare const /**
148
+ @public
149
+ * when a new player is inserted into the HTML
150
+ */ /**
151
+ * @public
152
+ */
153
+ CONTEXT_MENU = "contextmenu";
154
+
155
+ /**
156
+ * @public
157
+ */
158
+ declare type ContextMenuEventDetail = null;
159
+
160
+ /**
161
+ * @public
162
+ * when a cuepoint becomes inactive
163
+ */
164
+ declare const /**
165
+ @public
166
+ * when a new player is inserted into the HTML
167
+ */ /**
168
+ * @public
169
+ * when a cuepoint becomes inactive
170
+ */
171
+ CUEPOINT_END = "cuepointend";
172
+
173
+ /**
174
+ * @public
175
+ * when a cuepoint is active
176
+ */
177
+ declare const /**
178
+ @public
179
+ * when a new player is inserted into the HTML
180
+ */ /**
181
+ * @public
182
+ * when a cuepoint is active
183
+ */
184
+ CUEPOINT_START = "cuepointstart";
185
+
186
+ /**
187
+ * @public
188
+ */
189
+ declare type CuePointEndEventDetail = null;
190
+
191
+ /**
192
+ * @public
193
+ * cuepoints parsing is asynchronous
194
+ * you cannot rely on them existing until
195
+ * this event is emitted
196
+ */
197
+ declare const /**
198
+ @public
199
+ * when a new player is inserted into the HTML
200
+ */ /**
201
+ * @public
202
+ * cuepoints parsing is asynchronous
203
+ * you cannot rely on them existing until
204
+ * this event is emitted
205
+ */
206
+ CUEPOINTS = "cuepoints";
207
+
208
+ /**
209
+ * @public
210
+ */
211
+ declare type CuePointStartEventDetail = null;
212
+
213
+ /**
214
+ * @public
215
+ */
216
+ declare const /**
217
+ @public
218
+ * when a new player is inserted into the HTML
219
+ */ /**
220
+ * @public
221
+ */
222
+ DATA = "loadeddata";
223
+
224
+ /**
225
+ * @public
226
+ */
227
+ declare const /**
228
+ @public
229
+ * when a new player is inserted into the HTML
230
+ */ /**
231
+ * @public
232
+ */
233
+ DBL_CLICK = "dblclick";
234
+
235
+ declare const DESTROYED = "is-destroyed";
236
+
237
+ /* Excluded from this release type: DeviceId */
83
238
 
84
- declare type DeviceId = string;
239
+ declare const DISABLED = "is-disabled";
85
240
 
241
+ /**
242
+ * @public
243
+ */
86
244
  declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
87
245
 
246
+ /**
247
+ * @public
248
+ */
88
249
  declare type DRMConfiguration = {
89
250
  license_server: string;
90
251
  http_headers?: Record<string, string>;
@@ -94,10 +255,16 @@ declare type DRMConfiguration = {
94
255
  query_params?: Record<string, string>;
95
256
  };
96
257
 
258
+ /**
259
+ * @public
260
+ */
97
261
  declare type DRMSourceConfiguration = {
98
262
  [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
99
263
  };
100
264
 
265
+ /**
266
+ * @public
267
+ */
101
268
  declare type DRMVendorImplementation = {
102
269
  fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
103
270
  fairplay_request_license: (url: string, params: {
@@ -106,6 +273,54 @@ declare type DRMVendorImplementation = {
106
273
  }, cb: (license_data: Uint8Array) => void) => void;
107
274
  };
108
275
 
276
+ /**
277
+ * @public
278
+ */
279
+ declare const /**
280
+ @public
281
+ * when a new player is inserted into the HTML
282
+ */ /**
283
+ * @public
284
+ */
285
+ DURATION_CHANGE = "durationchange";
286
+
287
+ /**
288
+ * @public
289
+ * when the player has started playing dvr content
290
+ */
291
+ declare const /**
292
+ @public
293
+ * when a new player is inserted into the HTML
294
+ */ /**
295
+ * @public
296
+ * when the player has started playing dvr content
297
+ */
298
+ DVR = "dvr";
299
+
300
+ /**
301
+ * @public
302
+ */
303
+ declare type DvrEventDetail = number;
304
+
305
+ declare const ENDED = "is-ended";
306
+
307
+ /**
308
+ * @public
309
+ */
310
+ declare const /**
311
+ @public
312
+ * when a new player is inserted into the HTML
313
+ */ /**
314
+ * @public
315
+ */
316
+ ENDED_2 = "ended";
317
+
318
+ /**
319
+ * @public
320
+ */
321
+ declare const Endscreen: PluginCtor<Config, Player>;
322
+ export default Endscreen;
323
+
109
324
  /**
110
325
  * @public
111
326
  */
@@ -113,41 +328,187 @@ export declare type EndscreenRecommendations = {
113
328
  playlist: Array<PlaylistItem>;
114
329
  };
115
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,130 +518,1096 @@ 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 interface Loader<PluginOwnConfig extends KeyValue = KeyValue, PluginPlayerAPIExtension extends KeyValue = KeyValue> extends Plugin_2<PluginOwnConfig, PluginPlayerAPIExtension> {
165
- onload(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayerAPIExtension>, src?: SourceObj): void;
166
- wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
167
- wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
168
- }
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";
169
544
 
170
- declare type MapToConfigs<Arr extends PluginCtor[]> = {
171
- [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
172
- };
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";
173
555
 
174
- declare type MapToPlayerApiExtensions<Arr extends PluginCtor[]> = {
175
- [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer _uConfigType, infer PlayerAPIExtension> ? PlayerAPIExtension : never;
176
- };
556
+ declare const GRABBING = "is-grabbing";
177
557
 
178
- declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
558
+ declare const HAS_POSTER = "has-poster";
179
559
 
180
- declare type MergePlayerAPIExtensions<Arr extends PluginCtor[]> = ArrayToIntersection<MapToPlayerApiExtensions<Arr>>;
560
+ declare const HOVERED = "is-hovered";
181
561
 
182
- declare interface Player extends HTMLVideoElement {
183
- renderPlugin: (pluginContainer: HTMLElement) => void;
184
- toggleDisable: (flag: boolean) => void;
185
- original_src: string;
186
- root: PlayerRoot;
187
- playerState: Record<string, boolean>;
188
- reaper: Map<string, any> | 0;
189
- hasState(state: PlayerState): boolean;
190
- transitionState(to: PlayerState, from: PlayerState, timer?: number): void;
191
- togglePlay(on?: boolean): Promise<void>;
192
- toggleFullScreen(on?: boolean, state_only?: boolean): void;
193
- toggleMute(on?: boolean): void;
194
- destroy(): void;
195
- render(): void;
196
- render(component: string, args: any[]): void;
197
- createComponents(...args: string[]): HTMLElement[];
198
- setOpts(config: Config): void;
199
- setSrc(sources: UnsafeSource): Player;
200
- on<T>(event: string | string[], handler: (e: FPEvent<T>) => void): Player;
201
- once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
202
- off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
203
- poll<T>(event: string, data?: T): FPEvent<T>;
204
- emit<T>(event: string, data?: T): Player;
205
- setAttrs(attrs: Config): Player;
206
- opt<T>(key: string, fallback?: T): T;
207
- enqueueSeek(offset: number): any;
208
- setState(state: string, flag: boolean): Player;
209
- toJSON(): JSONPlayer;
210
- i18n(k: string, fallback?: string): string;
211
- deviceId(): DeviceId;
212
- live_state: {
213
- dvr?: boolean;
214
- dvr_window?: number;
215
- };
216
- opts: Config;
217
- plugins: Array<Plugin_2 | Loader>;
218
- dvr_offset?: number;
219
- message?: {
220
- events: Record<string, string>;
221
- };
222
- disabled: boolean;
223
- started?: boolean;
224
- token: string;
225
- tracks?: VideoTrack[];
226
- _customElements: FlowplayerCustomElementRegistry;
227
- _storage: Storage;
228
- }
562
+ declare const IN_VIEWPORT = "is-in-viewport";
229
563
 
230
- declare type PlayerRoot = HTMLElement & {
231
- prevWidth?: number;
232
- };
564
+ /* Excluded from this release type: INTERSECTIONCHANGE */
233
565
 
234
- declare type PlayerState = string;
566
+ /* Excluded from this release type: IntersectionChangeEventDetail */
235
567
 
236
- declare type PlayerWith<T> = T & Player;
568
+ declare const IS_SOURCE_PROCESSING = "is-source-processing";
237
569
 
238
- declare type PlaylistItem = {
239
- poster?: string;
240
- title?: string;
241
- description?: string;
242
- src: string[];
243
- };
570
+ declare type JSONPlayer = any;
244
571
 
245
- declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue, PluginPlayerAPIExtension extends KeyValue = KeyValue> {
246
- /**
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 const LIVE = "is-live";
611
+
612
+ /**
613
+ * @public
614
+ * when src is a livestream
615
+ */
616
+ declare const /**
617
+ @public
618
+ * when a new player is inserted into the HTML
619
+ */ /**
620
+ * @public
621
+ * when src is a livestream
622
+ */
623
+ LIVE_2 = "live";
624
+
625
+ declare const LIVE_SEEKED = "is-live-seeked";
626
+
627
+ /**
628
+ * @public
629
+ */
630
+ declare type LiveEventDetail = null;
631
+
632
+ /**
633
+ * @public
634
+ */
635
+ declare const /**
636
+ @public
637
+ * when a new player is inserted into the HTML
638
+ */ /**
639
+ * @public
640
+ */
641
+ LOAD = "load";
642
+
643
+ /**
644
+ * @public
645
+ */
646
+ declare const /**
647
+ @public
648
+ * when a new player is inserted into the HTML
649
+ */ /**
650
+ * @public
651
+ */
652
+ LOAD_START = "loadstart";
653
+
654
+ declare const LOADED = "is-loaded";
655
+
656
+ /**
657
+ * @public A plugin that supports loading new media formats. Use 'class MyPlugin implements Loader\<...\>' when writing your custom Loader
658
+ * @typeParam PluginPlayer- Player API that will be implemented by the loader. Loader at least must implement on(\<loader-name\>:attached, ...) event handler
659
+ */
660
+ declare interface Loader<PluginOwnConfig extends KeyValue, // FIXME extends Config
661
+ PluginPlayer extends PlayerWith<_AttachedEventCheck>> extends Plugin_2<PluginOwnConfig, PluginPlayer> {
662
+ onload: EnsureOnAttached<(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayer>, src: SourceObj) => void, PluginPlayer>;
663
+ wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
664
+ wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
665
+ }
666
+
667
+ declare const LOADING = "is-loading";
668
+
669
+ declare type MapToConfigs<Arr extends PluginCtor[]> = {
670
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<ConfigWith<infer ConfigType>> ? ConfigType : never;
671
+ };
672
+
673
+ declare type MapToPlayerApiExtensions<Arr extends PluginCtor[]> = {
674
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer _uConfigType, PlayerWith<infer PlayerAPIExtension>> ? PlayerAPIExtension : never;
675
+ };
676
+
677
+ declare const MENU_OPENED = "has-menu-opened";
678
+
679
+ declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
680
+
681
+ declare type MergePlayerAPIExtensions<Arr extends PluginCtor[]> = ArrayToIntersection<MapToPlayerApiExtensions<Arr>>;
682
+
683
+ /**
684
+ * @public
685
+ * general video events flowplayer uses internally
686
+ * https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
687
+ */
688
+ declare const /**
689
+ @public
690
+ * when a new player is inserted into the HTML
691
+ */ /**
692
+ * @public
693
+ * general video events flowplayer uses internally
694
+ * https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
695
+ */
696
+ METADATA = "loadedmetadata";
697
+
698
+ /**
699
+ @public
700
+ * when a new player is inserted into the HTML
701
+ */
702
+ declare const /**
703
+ @public
704
+ * when a new player is inserted into the HTML
705
+ */ /**
706
+ @public
707
+ * when a new player is inserted into the HTML
708
+ */ MOUNT = "mount";
709
+
710
+ /**
711
+ * @public
712
+ */
713
+ declare type MountEventDetail = null;
714
+
715
+ /**
716
+ * @public
717
+ */
718
+ declare const /**
719
+ @public
720
+ * when a new player is inserted into the HTML
721
+ */ /**
722
+ * @public
723
+ */
724
+ MOUSE_DOWN = "mousedown";
725
+
726
+ /**
727
+ * @public
728
+ */
729
+ declare const /**
730
+ @public
731
+ * when a new player is inserted into the HTML
732
+ */ /**
733
+ * @public
734
+ */
735
+ MOUSE_ENTER = "mouseenter";
736
+
737
+ /**
738
+ * @public
739
+ */
740
+ declare const /**
741
+ @public
742
+ * when a new player is inserted into the HTML
743
+ */ /**
744
+ * @public
745
+ */
746
+ MOUSE_LEAVE = "mouseleave";
747
+
748
+ /**
749
+ * @public
750
+ */
751
+ declare const /**
752
+ @public
753
+ * when a new player is inserted into the HTML
754
+ */ /**
755
+ * @public
756
+ */
757
+ MOUSE_MOVE = "mousemove";
758
+
759
+ /**
760
+ * @public
761
+ */
762
+ declare const /**
763
+ @public
764
+ * when a new player is inserted into the HTML
765
+ */ /**
766
+ * @public
767
+ */
768
+ MOUSE_UP = "mouseup";
769
+
770
+ declare const MUTED = "is-muted";
771
+
772
+ declare const NO_CONTROLS = "no-controls";
773
+
774
+ declare const NO_DVR = "no-timeline";
775
+
776
+ /* Excluded from this release type: NON_RECOVERABLE_ERROR */
777
+
778
+ /* Excluded from this release type: NonRecoverableErrorEventDetail */
779
+
780
+ /* Excluded from this release type: NQState */
781
+
782
+ /**
783
+ * @public
784
+ */
785
+ declare type OVPMetadata = {
786
+ player_id?: string;
787
+ media_id?: string;
788
+ ad_keywords?: string;
789
+ title?: string;
790
+ description?: string;
791
+ category_name?: string;
792
+ duration?: number;
793
+ tags?: string;
794
+ };
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
+ PAUSE = "pause";
806
+
807
+ declare const PAUSED = "is-paused";
808
+
809
+ /**
810
+ * @public
811
+ */
812
+ declare const /**
813
+ @public
814
+ * when a new player is inserted into the HTML
815
+ */ /**
816
+ * @public
817
+ */
818
+ PLAY = "play";
819
+
820
+ /**
821
+ * @public
822
+ */
823
+ declare type Player = HTMLVideoElement & PlayerEventOverloads & {
824
+ /* Excluded from this release type: renderPlugin */
825
+ /**
826
+ * Disables and enables the player.
827
+ * @param flag -Forces disabled mode (true) or enabled mode (false). Disabled player cannot be seeked forward.
828
+ */
829
+ toggleDisable: (flag?: boolean) => void;
830
+ /* Excluded from this release type: original_src */
831
+ /**
832
+ * The root element of the video player. This is the immediate parent element of the video tag.
833
+ */
834
+ root: PlayerRoot;
835
+ /* Excluded from this release type: playerState */
836
+ /* Excluded from this release type: reaper */
837
+ /* Excluded from this release type: hasState */
838
+ /* Excluded from this release type: transitionState */
839
+ /**
840
+ * Toggles between playing and paused mode.
841
+ * @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.
842
+ */
843
+ togglePlay(on?: boolean): Promise<void>;
844
+ /* Excluded from this release type: toggleFullScreen */
845
+ /**
846
+ * @public
847
+ * Toggles between normal and fullscreen mode. The optional flag attribute forces the normal sized (false) or fullscreen (false) mode.
848
+ * The custom fullscreenenter and fullscreenexit events are sent respectively.
849
+ */
850
+ toggleFullScreen(on?: boolean): void;
851
+ /* Excluded from this release type: toggleMute */
852
+ /**
853
+ * Toggles between muted and original volume level.
854
+ */
855
+ toggleMute(): void;
856
+ /**
857
+ * Removes a Flowplayer instance from `flowplayer.instances` and emits the `flowplayer.events.REAP` event, enabling cleanup of unsafe resources.
858
+ */
859
+ destroy(): void;
860
+ /* Excluded from this release type: render */
861
+ /* Excluded from this release type: render */
862
+ createComponents(...args: string[]): HTMLElement[];
863
+ /**
864
+ * Adds or changes configuration object. Usually used in conjunction with `setSrc()`. You can use all top-level config options like `subtitle:` , `logo:`, `ima:` etc.
865
+ * @example
866
+ * ```
867
+ * setOpts({
868
+ * subtitles:{
869
+ * tracks:[
870
+ * {
871
+ * src: "1.vtt",
872
+ * label: "English",
873
+ * default: true
874
+ * }, {
875
+ * src: "2.vtt",
876
+ * label: "Spanish",
877
+ * default : false }]},
878
+ * logo: "https://myserver.com/logo.png"
879
+ * })
880
+ * ```
881
+ */
882
+ setOpts(config: Config): void;
883
+ /**
884
+ * Sets the video source to be played. The src attribute can be a string or an object similar to the src property.
885
+ */
886
+ setSrc(sources: UnsafeSource): void;
887
+ /* Excluded from this release type: setSrc */
888
+ /* Excluded from this release type: setAttrs */
889
+ /* Excluded from this release type: opt */
890
+ /* Excluded from this release type: enqueueSeek */
891
+ /* Excluded from this release type: setState */
892
+ setState(state: PlayerState, flag: boolean): void;
893
+ /* Excluded from this release type: toJSON */
894
+ /**
895
+ * Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
896
+ */
897
+ i18n(k: string, fallback?: string): string;
898
+ /* Excluded from this release type: deviceId */
899
+ /* Excluded from this release type: live_state */
900
+ /**
901
+ * A reference to the configuration state of the player.
902
+ */
903
+ opts: Config;
904
+ /* Excluded from this release type: plugins */
905
+ /* Excluded from this release type: dvr_offset */
906
+ message?: {
907
+ events: Record<string, string>;
908
+ };
909
+ /**
910
+ * A boolean specifying whether the player is disabled and the user cannot seek forward using the mouse or keyboard.
911
+ * Player is disabled and enabled with the `toggleDisable()` method.
912
+ */
913
+ disabled: boolean;
914
+ /* Excluded from this release type: started */
915
+ /* Excluded from this release type: token */
916
+ tracks?: VideoTrack[];
917
+ /* Excluded from this release type: _customElements */
918
+ /* Excluded from this release type: _storage */
919
+ };
920
+
921
+ declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
922
+
923
+ declare type PlayerCustomEventsDetailMap = {
924
+ [MOUNT]: MountEventDetail;
925
+ [ERROR]: ErrorEventDetail;
926
+ [CONTEXT_MENU]: ContextMenuEventDetail;
927
+ /* Excluded from this release type: beforeplay */
928
+ /* Excluded from this release type: beforepause */
929
+ /* Excluded from this release type: state */
930
+ [CUEPOINT_START]: CuePointStartEventDetail;
931
+ [CUEPOINT_END]: CuePointEndEventDetail;
932
+ [VIEW_ENTER]: ViewEnterEventDetail;
933
+ [VIEW_LEAVE]: ViewLeaveEventDetail;
934
+ [SOURCE]: SourceEventDetail;
935
+ /* Excluded from this release type: recover */
936
+ [REAP]: ReapEventDetail;
937
+ /* Excluded from this release type: config */
938
+ [QUALITIES]: QualitiesEventDetail;
939
+ /* Excluded from this release type: "error:fatal" */
940
+ [RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
941
+ /* Excluded from this release type: audioonlysource */
942
+ /* Excluded from this release type: renderplugin */
943
+ [DVR]: DvrEventDetail;
944
+ [LIVE_2]: LiveEventDetail;
945
+ /* Excluded from this release type: "seek:queued" */
946
+ /* Excluded from this release type: "seek:cancel" */
947
+ /* Excluded from this release type: "plugin:registered" */
948
+ /* Excluded from this release type: intersectionchange */
949
+ /* Excluded from this release type: retry */
950
+ };
951
+
952
+ declare type PlayerCustomEventsOverloads = {
953
+ /**
954
+ * 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.
955
+ */
956
+ on(event: typeof MOUNT, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof MOUNT]>) => void): Player;
957
+ /**
958
+ * Sent when an error occurs. Learn more about error handling.
959
+ */
960
+ on(event: typeof ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof ERROR]>) => void): Player;
961
+ on(// FIXME - this event is in context-menu plugin
962
+ event: typeof CONTEXT_MENU, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CONTEXT_MENU]>) => void): Player;
963
+ /* Excluded from this release type: on */
964
+ /* Excluded from this release type: on */
965
+ /* Excluded from this release type: on */
966
+ /**
967
+ * TODO - move to Cuepoints? Sent when a configured cuepoint is entered.
968
+ */
969
+ on(event: typeof CUEPOINT_START, // TODO: move to Cuepoints
970
+ handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CUEPOINT_START]>) => void): Player;
971
+ /**
972
+ * Sent when a configured cuepoint is terminated.
973
+ */
974
+ on(event: typeof CUEPOINT_END, // TODO: move to Cuepoints
975
+ handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CUEPOINT_END]>) => void): Player;
976
+ /**
977
+ * Sent when the player becomes visible for the user.
978
+ */
979
+ on(event: typeof VIEW_ENTER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_ENTER]>) => void): Player;
980
+ /**
981
+ * Sent when the player leaves the users viewport and is longer visible.
982
+ */
983
+ on(event: typeof VIEW_LEAVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_LEAVE]>) => void): Player;
984
+ /**
985
+ * Sent right before the player src attribute is set. This allows you to change the video URL before playback.
986
+ */
987
+ on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
988
+ /* Excluded from this release type: on */
989
+ /**
990
+ * 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.
991
+ */
992
+ on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
993
+ /* Excluded from this release type: on */
994
+ /**
995
+ * Emitted when the set of underlying qualities has changed.
996
+ */
997
+ on(event: typeof QUALITIES, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITIES]>) => void): Player;
998
+ /* Excluded from this release type: on */
999
+ /**
1000
+ * Listen to this event to create a recommendations grid using the data passed with the event.
1001
+ */
1002
+ on(event: typeof RECOMMENDATIONS_READY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOMMENDATIONS_READY]>) => void): Player;
1003
+ /* Excluded from this release type: on */
1004
+ /* Excluded from this release type: on */
1005
+ /**
1006
+ * when the player has started playing dvr content
1007
+ */
1008
+ on(event: typeof DVR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof DVR]>) => void): Player;
1009
+ /**
1010
+ * when src is a livestream
1011
+ */
1012
+ on(event: typeof LIVE_2, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE_2]>) => void): Player;
1013
+ /* Excluded from this release type: on */
1014
+ /* Excluded from this release type: on */
1015
+ /* Excluded from this release type: on */
1016
+ /* Excluded from this release type: on */
1017
+ /* Excluded from this release type: on */
1018
+ on<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1019
+ /* Excluded from this release type: on */
1020
+ /**
1021
+ * Same as `on()`, but the handler function is executed only once.
1022
+ */
1023
+ once<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
1024
+ /**
1025
+ * Same as `on()`, but the handler function is executed only once.
1026
+ */
1027
+ once<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
1028
+ once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1029
+ /**
1030
+ * Removes the event handler with the specified event type.
1031
+ */
1032
+ off<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
1033
+ /**
1034
+ * Removes the event handler with the specified event type.
1035
+ */
1036
+ off<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
1037
+ /**
1038
+ * Removes the event handler with the specified event type.
1039
+ */
1040
+ off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
1041
+ /* Excluded from this release type: poll */
1042
+ emit<T extends PlayerCustomEventName>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
1043
+ /* Excluded from this release type: emit */
1044
+ emit<T, X extends string = string>(event: X & (X extends PlayerCustomEventName ? "Incorrect event detail type" : X), data?: T): Player;
1045
+ };
1046
+
1047
+ declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
1048
+
1049
+ declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
1050
+
1051
+ declare type PlayerNativeEventsDetailMap = Omit<HTMLVideoElementEventMap, "error">;
1052
+
1053
+ declare type PlayerNativeEventsOverloads = {
1054
+ on<K extends keyof PlayerNativeEventsDetailMap>(event: K, handler: (ev: PlayerNativeEventsDetailMap[K]) => void): Player;
1055
+ };
1056
+
1057
+ /**
1058
+ * @public
1059
+ * The root element of the video player. This is the immediate parent element of the video tag.
1060
+ */
1061
+ declare type PlayerRoot = HTMLElement & {
1062
+ /* Excluded from this release type: prevWidth */
1063
+ };
1064
+
1065
+ /**
1066
+ * @public
1067
+ */
1068
+ declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
1069
+
1070
+ /* Excluded from this release type: _PlayerState */
1071
+
1072
+ /* Excluded from this release type: PlayerStates */
1073
+
1074
+ /**
1075
+ * @public
1076
+ */
1077
+ declare type PlayerWith<T> = T & Player;
1078
+
1079
+ declare const PLAYING = "is-playing";
1080
+
1081
+ /**
1082
+ * @public
1083
+ */
1084
+ declare const /**
1085
+ @public
1086
+ * when a new player is inserted into the HTML
1087
+ */ /**
1088
+ * @public
1089
+ */
1090
+ PLAYING_2 = "playing";
1091
+
1092
+ declare type PlaylistItem = {
1093
+ poster?: string;
1094
+ title?: string;
1095
+ description?: string;
1096
+ src: string[];
1097
+ };
1098
+
1099
+ /**
1100
+ * @public
1101
+ */
1102
+ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
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
+
262
1240
  /**
263
1241
  * @public
264
1242
  */
265
1243
  export declare type RecommendationsReadyEvent = FPEvent<EndscreenRecommendations>;
266
1244
 
1245
+ /**
1246
+ * @public
1247
+ */
1248
+ declare type RecommendationsReadyEventDetail = {
1249
+ playlist: RecommendationItem[];
1250
+ };
1251
+
1252
+ /* Excluded from this release type: RECOVER */
1253
+
1254
+ /* Excluded from this release type: RecoverEventDetail */
1255
+
1256
+ /* Excluded from this release type: REMOTE_SESSION_ENDED */
1257
+
1258
+ /* Excluded from this release type: REMOTE_SESSION_STARTED */
1259
+
1260
+ /* Excluded from this release type: RENDER_PLUGIN */
1261
+
1262
+ /**
1263
+ * @public
1264
+ */
1265
+ declare type RenderPluginEventDetail = HTMLElement;
1266
+
1267
+ /**
1268
+ * @public
1269
+ */
1270
+ declare const /**
1271
+ @public
1272
+ * when a new player is inserted into the HTML
1273
+ */ /**
1274
+ * @public
1275
+ */
1276
+ RESIZE = "resize";
1277
+
1278
+ /* Excluded from this release type: RETRY */
1279
+
1280
+ /* Excluded from this release type: RetryEventDetail */
1281
+
1282
+ declare const RTL = "is-rtl";
1283
+
1284
+ /**
1285
+ * @public
1286
+ */
1287
+ declare const /**
1288
+ @public
1289
+ * when a new player is inserted into the HTML
1290
+ */ /**
1291
+ * @public
1292
+ */
1293
+ SCROLL = "scroll";
1294
+
1295
+ declare const SEAMLESS = "is-seamless";
1296
+
1297
+ /* Excluded from this release type: SEEK_CANCEL */
1298
+
1299
+ /* Excluded from this release type: SEEK_QUEUED */
1300
+
1301
+ declare const SEEKABLE = "is-seekable";
1302
+
1303
+ /* Excluded from this release type: SeekCancelEventDetail */
1304
+
1305
+ /**
1306
+ * @public
1307
+ */
1308
+ declare const /**
1309
+ @public
1310
+ * when a new player is inserted into the HTML
1311
+ */ /**
1312
+ * @public
1313
+ */
1314
+ SEEKED = "seeked";
1315
+
1316
+ declare const SEEKING = "is-seeking";
1317
+
1318
+ /**
1319
+ * @public
1320
+ */
1321
+ declare const /**
1322
+ @public
1323
+ * when a new player is inserted into the HTML
1324
+ */ /**
1325
+ * @public
1326
+ */
1327
+ SEEKING_2 = "seeking";
1328
+
1329
+ /* Excluded from this release type: SeekQueuedEventDetail */
1330
+
1331
+ /**
1332
+ * @public
1333
+ * allows plugins to listen for forced quality changes
1334
+ * it should emit the index of the quality to set
1335
+ * -1 is a special idx saying to use ABR if the plugin
1336
+ * exposes an ABR implementation
1337
+ */
1338
+ declare const /**
1339
+ @public
1340
+ * when a new player is inserted into the HTML
1341
+ */ /**
1342
+ * @public
1343
+ * allows plugins to listen for forced quality changes
1344
+ * it should emit the index of the quality to set
1345
+ * -1 is a special idx saying to use ABR if the plugin
1346
+ * exposes an ABR implementation
1347
+ */
1348
+ SET_QUALITY = "quality:set";
1349
+
1350
+ declare const SMALL = "is-small";
1351
+
1352
+ /**
1353
+ * @public
1354
+ * emitted when a valid source is found prior to mounting
1355
+ */
1356
+ declare const /**
1357
+ @public
1358
+ * when a new player is inserted into the HTML
1359
+ */ /**
1360
+ * @public
1361
+ * emitted when a valid source is found prior to mounting
1362
+ */
1363
+ SOURCE = "src";
1364
+
1365
+ /**
1366
+ * @public
1367
+ */
1368
+ declare type SourceEventDetail = SourceObj;
1369
+
1370
+ /**
1371
+ * @public
1372
+ */
267
1373
  declare type SourceObj = {
268
1374
  src?: SourceStr;
1375
+ /**
1376
+ * the MIME type (example `video/mp4` or `application/x-mpegurl`)
1377
+ */
269
1378
  type?: string;
270
1379
  drm?: DRMSourceConfiguration;
271
1380
  };
272
1381
 
1382
+ /**
1383
+ * @public
1384
+ */
273
1385
  declare type SourceStr = string;
274
1386
 
1387
+ /**
1388
+ * @public
1389
+ */
275
1390
  declare type SourceWith<T> = SourceObj & T;
276
1391
 
1392
+ declare const STARTING = "is-starting";
1393
+
1394
+ /* Excluded from this release type: STATE */
1395
+
1396
+ /* Excluded from this release type: StateEventDetail */
1397
+
1398
+ declare namespace states {
1399
+ export {
1400
+ PLAYING,
1401
+ FULLSCREEN,
1402
+ PAUSED,
1403
+ MUTED,
1404
+ LOADED,
1405
+ LOADING,
1406
+ STARTING,
1407
+ SEEKING,
1408
+ GRABBING,
1409
+ DISABLED,
1410
+ SMALL,
1411
+ TINY,
1412
+ RTL,
1413
+ TV,
1414
+ ENDED,
1415
+ LIVE,
1416
+ ERRORED,
1417
+ WAITING,
1418
+ AUTOPLAY,
1419
+ SEAMLESS,
1420
+ TOGGLING,
1421
+ LIVE_SEEKED,
1422
+ NO_DVR,
1423
+ HAS_POSTER,
1424
+ WILL_PLAY,
1425
+ WILL_PAUSE,
1426
+ MENU_OPENED,
1427
+ TOUCHED,
1428
+ HOVERED,
1429
+ TOUCH_DEVICE,
1430
+ WILL_SEEK,
1431
+ SEEKABLE,
1432
+ IN_VIEWPORT,
1433
+ NO_CONTROLS,
1434
+ DESTROYED,
1435
+ IS_SOURCE_PROCESSING
1436
+ }
1437
+ }
1438
+
1439
+ /**
1440
+ * @public
1441
+ */
1442
+ declare const /**
1443
+ @public
1444
+ * when a new player is inserted into the HTML
1445
+ */ /**
1446
+ * @public
1447
+ */
1448
+ TIME_UPDATE = "timeupdate";
1449
+
1450
+ declare const TINY = "is-tiny";
1451
+
1452
+ declare const TOGGLING = "is-toggling";
1453
+
1454
+ /**
1455
+ * @public
1456
+ */
1457
+ declare const /**
1458
+ @public
1459
+ * when a new player is inserted into the HTML
1460
+ */ /**
1461
+ * @public
1462
+ */
1463
+ TOUCH_CANCEL = "touchcancel";
1464
+
1465
+ declare const TOUCH_DEVICE = "is-touch-device";
1466
+
1467
+ /**
1468
+ * @public
1469
+ */
1470
+ declare const /**
1471
+ @public
1472
+ * when a new player is inserted into the HTML
1473
+ */ /**
1474
+ * @public
1475
+ */
1476
+ TOUCH_END = "touchend";
1477
+
1478
+ /**
1479
+ * @public
1480
+ */
1481
+ declare const /**
1482
+ @public
1483
+ * when a new player is inserted into the HTML
1484
+ */ /**
1485
+ * @public
1486
+ */
1487
+ TOUCH_MOVE = "touchmove";
1488
+
1489
+ /**
1490
+ * @public
1491
+ */
1492
+ declare const /**
1493
+ @public
1494
+ * when a new player is inserted into the HTML
1495
+ */ /**
1496
+ * @public
1497
+ */
1498
+ TOUCH_START = "touchstart";
1499
+
1500
+ declare const TOUCHED = "is-touched";
1501
+
1502
+ declare const TV = "is-tv";
1503
+
1504
+ /**
1505
+ * @public
1506
+ */
277
1507
  declare type UnsafeSource = SourceStr | SourceObj | Array<SourceStr | SourceObj>;
278
1508
 
1509
+ /**
1510
+ * @public
1511
+ * emitted when a video track is selected
1512
+ */
1513
+ declare const /**
1514
+ @public
1515
+ * when a new player is inserted into the HTML
1516
+ */ /**
1517
+ * @public
1518
+ * emitted when a video track is selected
1519
+ */
1520
+ VIDEO_TRACK_SELECT = "tracks:video:select";
1521
+
1522
+ /**
1523
+ * @public
1524
+ * emitted whenever multiple video tracks are detected
1525
+ */
1526
+ declare const /**
1527
+ @public
1528
+ * when a new player is inserted into the HTML
1529
+ */ /**
1530
+ * @public
1531
+ * emitted whenever multiple video tracks are detected
1532
+ */
1533
+ VIDEO_TRACKS = "videoTracks";
1534
+
1535
+ /**
1536
+ * @public
1537
+ */
279
1538
  declare interface VideoTrack {
280
1539
  name: string;
281
- data: any;
1540
+ /* Excluded from this release type: data */
282
1541
  default: boolean;
283
1542
  selected: boolean;
284
1543
  }
285
1544
 
1545
+ /**
1546
+ * @public
1547
+ * when a player enters the viewpoint
1548
+ */
1549
+ declare const /**
1550
+ @public
1551
+ * when a new player is inserted into the HTML
1552
+ */ /**
1553
+ * @public
1554
+ * when a player enters the viewpoint
1555
+ */
1556
+ VIEW_ENTER = "viewenter";
1557
+
1558
+ /**
1559
+ * @public
1560
+ * when a player leaves the viewport
1561
+ */
1562
+ declare const /**
1563
+ @public
1564
+ * when a new player is inserted into the HTML
1565
+ */ /**
1566
+ * @public
1567
+ * when a player leaves the viewport
1568
+ */
1569
+ VIEW_LEAVE = "viewleave";
1570
+
1571
+ /**
1572
+ * @public
1573
+ */
1574
+ declare type ViewEnterEventDetail = null;
1575
+
1576
+ /**
1577
+ * @public
1578
+ */
1579
+ declare type ViewLeaveEventDetail = null;
1580
+
1581
+ /**
1582
+ * @public
1583
+ */
1584
+ declare const /**
1585
+ @public
1586
+ * when a new player is inserted into the HTML
1587
+ */ /**
1588
+ * @public
1589
+ */
1590
+ VOLUME_CHANGE = "volumechange";
1591
+
1592
+ declare const WAITING = "is-waiting";
1593
+
1594
+ /**
1595
+ * @public
1596
+ */
1597
+ declare const /**
1598
+ @public
1599
+ * when a new player is inserted into the HTML
1600
+ */ /**
1601
+ * @public
1602
+ */
1603
+ WAITING_2 = "waiting";
1604
+
1605
+ /* Excluded from this release type: WEBKIT_NEEDKEY */
1606
+
1607
+ declare const WILL_PAUSE = "will-pause";
1608
+
1609
+ declare const WILL_PLAY = "will-play";
1610
+
1611
+ declare const WILL_SEEK = "will-seek";
1612
+
286
1613
  export { }