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