@flowplayer/player 3.11.1 → 3.11.2-rc.1

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 (49) hide show
  1. package/core.js +1 -1
  2. package/default.js +1 -1
  3. package/embed.js +2 -2
  4. package/index.d.ts +14 -71
  5. package/package.json +39 -1
  6. package/plugins/ads.d.ts +719 -0
  7. package/plugins/ads.js +1 -1
  8. package/plugins/airplay.d.ts +321 -0
  9. package/plugins/analytics.d.ts +242 -0
  10. package/plugins/analytics.js +1 -1
  11. package/plugins/asel.d.ts +304 -0
  12. package/plugins/audio.d.ts +281 -0
  13. package/plugins/chapters.d.ts +335 -0
  14. package/plugins/chromecast.d.ts +366 -0
  15. package/plugins/consent.d.ts +305 -0
  16. package/plugins/context-menu.d.ts +212 -0
  17. package/plugins/cuepoints.d.ts +13 -84
  18. package/plugins/dash.d.ts +235 -0
  19. package/plugins/drm.d.ts +248 -0
  20. package/plugins/endscreen.d.ts +351 -0
  21. package/plugins/fas.d.ts +308 -0
  22. package/plugins/float-on-scroll.d.ts +301 -0
  23. package/plugins/ga4.d.ts +398 -0
  24. package/plugins/gemius.d.ts +319 -0
  25. package/plugins/google-analytics.d.ts +400 -0
  26. package/plugins/health.d.ts +307 -0
  27. package/plugins/health.js +1 -1
  28. package/plugins/hls.d.ts +229 -0
  29. package/plugins/id3.d.ts +198 -0
  30. package/plugins/iframe.d.ts +278 -0
  31. package/plugins/keyboard.d.ts +189 -0
  32. package/plugins/media-session.d.ts +189 -0
  33. package/plugins/message.d.ts +193 -0
  34. package/plugins/ovp.d.ts +343 -0
  35. package/plugins/playlist.d.ts +326 -0
  36. package/plugins/preview.d.ts +243 -0
  37. package/plugins/qsel.d.ts +284 -0
  38. package/plugins/qul.d.ts +220 -0
  39. package/plugins/rts.d.ts +273 -0
  40. package/plugins/share.d.ts +295 -0
  41. package/plugins/speed.d.ts +268 -0
  42. package/plugins/ssai.d.ts +346 -0
  43. package/plugins/ssai.js +1 -1
  44. package/plugins/subtitles.d.ts +294 -0
  45. package/plugins/thumbnails.d.ts +307 -0
  46. package/plugins/tizen.d.ts +374 -0
  47. package/plugins/vtsel.d.ts +282 -0
  48. package/plugins/webos.d.ts +374 -0
  49. package/util/loader.d.ts +14 -95
@@ -0,0 +1,719 @@
1
+ import type { MediaKeyFunc } from 'hls.js';
2
+
3
+ declare const AD_ATTRIBUTION: number;
4
+
5
+ declare const AD_BLOCKED = "ad-blocked";
6
+
7
+ declare const AD_BREAK_COMPLETED = "ad-break-completed";
8
+
9
+ declare const AD_CHOICES: number;
10
+
11
+ declare const AD_COMPLETED = "ad-completed";
12
+
13
+ declare const AD_ERROR = "ad-error";
14
+
15
+ declare const AD_FULLSCREEN = "ad-fullscreen";
16
+
17
+ declare const AD_HIDE_FIRST_FRAME = "ad/hide-first-frame";
18
+
19
+ declare const AD_INIT = "ad-initialized";
20
+
21
+ declare const AD_MIDROLL_FINISHED = "ad-midroll-finished";
22
+
23
+ declare const AD_MUTED = "ad-muted";
24
+
25
+ declare const AD_PAUSE_CONTENT = "ad-pause-content";
26
+
27
+ declare const AD_PAUSED = "ad-paused";
28
+
29
+ declare const AD_PLAY_REQUESTED = "ad-play-requested";
30
+
31
+ declare const AD_PLAYBACK_ERROR = "ad-playback-error";
32
+
33
+ declare const AD_POSTROLL_FINISHED = "ad-postroll-finished";
34
+
35
+ declare const AD_PREROLL_FINSIHED = "ad-preroll-finished";
36
+
37
+ declare const AD_PROGRESS = "ad-progress";
38
+
39
+ declare const AD_REQUEST_COMPLETED = "ad-request-completed";
40
+
41
+ declare const AD_REQUEST_ERROR = "ad-request-error";
42
+
43
+ declare const AD_REQUESTED = "ad-requested";
44
+
45
+ declare const AD_RESIZE = "ad/resize";
46
+
47
+ declare const AD_RESUMED = "ad-resumed";
48
+
49
+ declare const AD_SET_UI_FLAGS = "ad/set-ui-flags";
50
+
51
+ declare const AD_SHOW_FIRST_FRAME = "ad/show-first-frame";
52
+
53
+ declare const AD_SKIPPED = "ad-skipped";
54
+
55
+ declare const AD_STARTED = "ad-started";
56
+
57
+ declare const AD_TEARDOWN = "ad-teardown";
58
+
59
+ declare const AD_TIMEOUT = "ad-timeout";
60
+
61
+ declare const AD_VIDEOTAG_ATTACHED = "ad-videotag-attached";
62
+
63
+ declare const AD_VOLUME_CHANGED = "ad-volume-changed";
64
+
65
+ declare const AD_WAITING = "ad-waiting";
66
+
67
+ declare interface Adapter {
68
+ initialize(opts: AdapterOpts): void;
69
+ getOpts(): AdapterOpts;
70
+ reset(): void;
71
+ destroy(): void;
72
+ destroyManager(): void;
73
+ stop(): void;
74
+ initAd(adTag: string, timeout?: number): Promise<void>;
75
+ playAd(): Promise<void>;
76
+ pause(): void;
77
+ resume(): void;
78
+ volume(level?: number): number | undefined;
79
+ contentComplete(): Promise<void>;
80
+ onResize(_obj: ResizeInfo): void;
81
+ isUiDisabled(): boolean;
82
+ isAdPod(): boolean;
83
+ canDismissNonLinear(): boolean;
84
+ init(opts: AdapterOpts): Promise<void>;
85
+ isReady(): boolean;
86
+ setVideoTag(tag: HTMLVideoElement): void;
87
+ setIOSPlaysInline(state: boolean): void;
88
+ getIOSPlaysInline(): boolean;
89
+ isPaused(): boolean;
90
+ isLinearAd(): boolean;
91
+ isSharedVideoTag(): boolean;
92
+ getVideoTag(): HTMLVideoElement | undefined;
93
+ getDimensions(): Partial<{
94
+ width: number;
95
+ height: number;
96
+ linear: boolean;
97
+ }>;
98
+ getAdInfo(): AdInfo | undefined;
99
+ }
100
+
101
+ declare const ADAPTER_INIT_FAILED = "ad-adapter-init-failed";
102
+
103
+ declare type AdapterOpts = Todo;
104
+
105
+ declare namespace AdEvents {
106
+ export {
107
+ AD_INIT,
108
+ AD_PLAYBACK_ERROR,
109
+ AD_TEARDOWN,
110
+ AD_VIDEOTAG_ATTACHED,
111
+ AD_BLOCKED,
112
+ AD_REQUEST_ERROR,
113
+ AD_REQUESTED,
114
+ AD_REQUEST_COMPLETED,
115
+ AD_PAUSE_CONTENT,
116
+ AD_STARTED,
117
+ AD_COMPLETED,
118
+ AD_PAUSED,
119
+ AD_RESUMED,
120
+ AD_WAITING,
121
+ AD_PROGRESS,
122
+ AD_SKIPPED,
123
+ AD_MUTED,
124
+ AD_VOLUME_CHANGED,
125
+ AD_FULLSCREEN,
126
+ AD_TIMEOUT,
127
+ AD_BREAK_COMPLETED,
128
+ AD_POSTROLL_FINISHED,
129
+ AD_PREROLL_FINSIHED,
130
+ AD_MIDROLL_FINISHED,
131
+ VPAID_INIT,
132
+ IMA_ADAPTER_INIT,
133
+ IMA_BEFORE_ADS_REQUEST,
134
+ IMA_ADS_RENDERING_SETTINGS,
135
+ ADAPTER_INIT_FAILED,
136
+ AD_PLAY_REQUESTED,
137
+ RELOAD_AD_REQUESTED,
138
+ AD_ERROR,
139
+ REQUEST_AD_PAUSE,
140
+ REQUEST_AD_PLAY,
141
+ REQUEST_AD_MUTE_UNMUTE,
142
+ AD_HIDE_FIRST_FRAME,
143
+ AD_SHOW_FIRST_FRAME,
144
+ AD_RESIZE,
145
+ AD_SET_UI_FLAGS
146
+ }
147
+ }
148
+
149
+ declare type AdInfo = {
150
+ duration: number;
151
+ };
152
+
153
+ declare class Ads implements Plugin_2 {
154
+ private umd;
155
+ static events: typeof AdEvents;
156
+ static ui: typeof Flags_2;
157
+ static tags: typeof SampleTags;
158
+ constructor(umd: FlowplayerUMD);
159
+ init(config: ConfigWith<{
160
+ ima?: PlayerIMAConfig;
161
+ }>, root: PlayerRoot, video: PlayerWith<{
162
+ ads?: AdsController;
163
+ }>): Promise<void> | undefined;
164
+ }
165
+ export default Ads;
166
+
167
+ declare class AdsController extends EventBus {
168
+ readonly adapter: Adapter;
169
+ readonly opts: Partial<ControllerConfig>;
170
+ readonly analytics: Analytics;
171
+ private _macros;
172
+ private _schedule;
173
+ private _state;
174
+ private _lastAd;
175
+ private content_processing_src;
176
+ constructor(params?: Partial<ControllerConfig>);
177
+ reset(): this;
178
+ destroy(): void;
179
+ stop(): void;
180
+ onContentNewSrc(): void;
181
+ wireup(): void;
182
+ initialize(ads: TimeBasedAd[] | false, opts?: Partial<ControllerConfig>, preload?: boolean): Promise<this>;
183
+ get videoTag(): HTMLVideoElement | undefined;
184
+ get adInfo(): AdInfo | undefined;
185
+ setVideoTag(player: Player): Promise<void>;
186
+ waitForVideoTag(): Promise<unknown>;
187
+ adapterInitialized(preload?: boolean): Promise<void>;
188
+ fetchNextAd(time: number, depth?: number): Promise<void>;
189
+ skipAdsOnSeek(time: number): void;
190
+ setCurrentTime(time: number, preload?: boolean, seek?: boolean): Promise<void>;
191
+ playAd(): Promise<void>;
192
+ checkIfBreakComplete(): void;
193
+ resetScheduleCounter(): void;
194
+ setSchedule(ads: TimeBasedAd[], contentDuration?: number): void;
195
+ toJSON(): (BaseAdObj & {
196
+ time: number;
197
+ })[];
198
+ trigger(name: string, data?: {}): void;
199
+ dispatch(name: string, data: any): void;
200
+ get ad_type(): "preroll" | "postroll" | "midroll" | undefined;
201
+ shouldRestartContent(): boolean;
202
+ finished(cb: () => void): Promise<void>;
203
+ hasPreroll(): boolean | undefined;
204
+ shallPlayAd(time: number): boolean;
205
+ setLastAd(ad: TimeBasedAd): this;
206
+ setIsContentProcessingNewSrc(is_processing: boolean): void;
207
+ getLastAd(): Maybe<BaseAdObj & {
208
+ time: number;
209
+ }>;
210
+ getIsContentProcessingNewSrc(): boolean;
211
+ mergeMacros(macros?: {}): this;
212
+ /**
213
+ *
214
+ * public interface for plugin users, keep the signature unchanged
215
+ *
216
+ **/
217
+ get paused(): boolean;
218
+ pause(): void;
219
+ resume(): void;
220
+ resize(opts: Todo): void;
221
+ requestAd(ad: AdTag, idx?: number, timeout?: number | undefined): Promise<void>;
222
+ resetSchedule(ads: TimeBasedAd[]): void;
223
+ get adPlaying(): boolean;
224
+ get adBreak(): boolean;
225
+ get adRequesting(): boolean;
226
+ get adLinear(): boolean;
227
+ }
228
+
229
+ declare type AdTag = string | LazyAdTag[] | string[] | (string | LazyAdTag)[] | LazyAdTag | TimeBasedAd;
230
+
231
+ declare class Analytics {
232
+ readonly emitter: AdsController | Player;
233
+ /**
234
+ * pure creation interface
235
+ */
236
+ static of(emitter: AdsController | Player, opts: Todo): Analytics;
237
+ /**
238
+ * check it there are any keys that the Analytics service
239
+ * considers to be require on an Object
240
+ */
241
+ static ensure_required_keys(analytics: Analytics, obj: Record<string, string | number>): string[];
242
+ /**
243
+ * takes an Object and plucks what the Analytics service
244
+ * considers to be valid keys
245
+ */
246
+ static pluck_valid_keys(analytics: Analytics, obj: Record<string, string | number>): {};
247
+ /**
248
+ * Assigns the metadata to the analytics.metadata
249
+ * only will propogate valid keys
250
+ *
251
+ * @param {Analytics} analytics
252
+ * @param {Object} metadata
253
+ */
254
+ static mergeMetadata(analytics: Analytics, metadata?: {}): Analytics;
255
+ events: string[];
256
+ required_keys: string[];
257
+ optional_keys: string[];
258
+ valid_keys: string[];
259
+ metadata: Metadata_2;
260
+ /**
261
+ * Construct a new Analytics tracking object
262
+ */
263
+ constructor(emitter: AdsController | Player, opts?: Partial<AnalyticsOpts>);
264
+ wireup(): void;
265
+ destroy(): void;
266
+ }
267
+
268
+ declare type AnalyticsOpts = {
269
+ metadata: Metadata_2;
270
+ required_keys: string[];
271
+ events: string[];
272
+ optional_keys: string[];
273
+ };
274
+
275
+ declare type AnyPlugin<PluginOwnConfig extends KeyValue> = Plugin_2<PluginOwnConfig> | Loader<PluginOwnConfig>;
276
+
277
+ declare type ArrayToIntersection<T extends Array<unknown>> = T extends [infer Current, ...infer Remaining] ? Current & ArrayToIntersection<Remaining> : unknown;
278
+
279
+ declare enum AutoplayOpts {
280
+ OFF = 0,
281
+ ON = 1,
282
+ AUDIO_REQUIRED = 2
283
+ }
284
+
285
+ declare type BaseAdObj = {
286
+ adTag: string | LazyAdTag;
287
+ outstream?: boolean;
288
+ restart?: boolean;
289
+ lazy?: boolean;
290
+ };
291
+
292
+ declare type BitOpts = number;
293
+
294
+ declare type Component = {
295
+ onrender?: (config: Config, root: PlayerRoot, player: Player) => void;
296
+ onremove?: (config: Config, root: PlayerRoot, player: Player) => void;
297
+ };
298
+
299
+ declare interface Components {
300
+ render(key: string, args: any[]): void;
301
+ remove(key: string, args: any[]): void;
302
+ put(key: string, args: Component): void;
303
+ }
304
+
305
+ declare interface Config {
306
+ src?: UnsafeSource;
307
+ preload?: "none" | "metadata" | "auto";
308
+ controls?: boolean;
309
+ lang?: string;
310
+ start_time?: number;
311
+ autopause?: boolean;
312
+ rewind?: boolean;
313
+ loop?: boolean;
314
+ seamless?: boolean;
315
+ retry?: boolean;
316
+ autoplay?: BitOpts;
317
+ start_quality?: BitOpts;
318
+ live?: boolean;
319
+ poster?: string;
320
+ disabled?: boolean;
321
+ muted?: boolean;
322
+ /**
323
+ * is src handled by one of plugins loaders
324
+ */
325
+ is_native?: boolean;
326
+ /**
327
+ * bitflags for UI options
328
+ */
329
+ ui?: BitOpts;
330
+ /**
331
+ * your user access token
332
+ */
333
+ token?: string;
334
+ /**
335
+ * manually configured duration for pre-rendering usually
336
+ */
337
+ duration?: number;
338
+ /**
339
+ * can the content be seeked to any position
340
+ */
341
+ seekable?: boolean;
342
+ multiplay?: boolean;
343
+ ratio?: number | string;
344
+ logo?: string;
345
+ logo_href?: string;
346
+ logo_alt_text?: string;
347
+ title?: string;
348
+ description?: string;
349
+ /**
350
+ * the number of seconds to have in the buffer before dvr is activated
351
+ */
352
+ seconds_to_dvr?: number;
353
+ }
354
+
355
+ declare namespace Configs {
356
+ export {
357
+ BitOpts,
358
+ FlowplayerCustomElementRegistry,
359
+ Config,
360
+ CustomConfig,
361
+ PluginConfig
362
+ }
363
+ }
364
+
365
+ declare type ConfigWith<T> = Configs.Config & T;
366
+
367
+ declare type ControllerConfig = {
368
+ parameters: MacrosMap;
369
+ muted: boolean;
370
+ autoplay: boolean;
371
+ timeout: number;
372
+ show_all_ads_on_seek: boolean;
373
+ preload_advance: number;
374
+ preload_ads: boolean;
375
+ video_source: string;
376
+ };
377
+
378
+ declare type CustomConfig<T> = Config & T;
379
+
380
+ declare type DeviceId = string;
381
+
382
+ declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
383
+
384
+ declare type DRMConfiguration = {
385
+ license_server: string;
386
+ http_headers?: Record<string, string>;
387
+ certificate?: string;
388
+ vendor?: string | DRMVendorImplementation;
389
+ request_media_key_system_access_function?: MediaKeyFunc;
390
+ query_params?: Record<string, string>;
391
+ };
392
+
393
+ declare type DRMSourceConfiguration = {
394
+ [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
395
+ };
396
+
397
+ declare type DRMVendorImplementation = {
398
+ fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
399
+ fairplay_request_license: (url: string, params: {
400
+ message: any;
401
+ assetId: string;
402
+ }, cb: (license_data: Uint8Array) => void) => void;
403
+ };
404
+
405
+ declare type DynamicMacro = (() => string);
406
+
407
+ declare class EventBus {
408
+ private _bus;
409
+ private _listeners;
410
+ constructor(_bus?: HTMLDivElement, _listeners?: Array<[string, Listener]>);
411
+ removeAllListeners(): void;
412
+ emit<T>(eventName: string, detail: T): void;
413
+ on<T>(eventName: string, handler: Listener<T>): void;
414
+ once<T>(eventName: string, handler: Listener<T>): void;
415
+ removeListener(eventName: string, handler: Listener): void;
416
+ }
417
+
418
+ declare namespace Flags_2 {
419
+ export {
420
+ STICKY_CONTROLS,
421
+ NO_FULLSCREEN,
422
+ NO_AD_INDICATOR,
423
+ AD_ATTRIBUTION,
424
+ AD_CHOICES,
425
+ REMAINING_TIME,
426
+ VOLUME_BAR
427
+ }
428
+ }
429
+
430
+ declare type FlowplayerCustomElementRegistry = Map<string, string>;
431
+
432
+ declare interface FlowplayerUMD extends FlowplayerUMDBase {
433
+ (selector: string, config?: Config): Player;
434
+ (element: HTMLElement, config?: Config): Player;
435
+ <T>(selector: string, config?: CustomConfig<T>): Player;
436
+ <T>(element: HTMLElement, config?: CustomConfig<T>): Player;
437
+ <PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<CustomConfig<MergeConfigs<PluginCtors>>>;
438
+ }
439
+
440
+ declare interface FlowplayerUMDBase {
441
+ instances: Player[];
442
+ extensions: PluginCtor[];
443
+ events: Record<string, string>;
444
+ ads?: {
445
+ events: Record<string, string>;
446
+ };
447
+ states: Record<string, string>;
448
+ quality: typeof QualityOpts;
449
+ commit: string;
450
+ version: string;
451
+ customElements: FlowplayerCustomElementRegistry;
452
+ defaultElements: Record<string, string>;
453
+ components: Components;
454
+ support: any;
455
+ autoplay: typeof AutoplayOpts;
456
+ jwt: any;
457
+ loaders: any;
458
+ }
459
+
460
+ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config> extends FlowplayerUMDBase {
461
+ (selector: string, config?: ConfigWithPlugins): Player;
462
+ (element: HTMLElement, config?: ConfigWithPlugins): Player;
463
+ }
464
+
465
+ declare interface FPEvent<T> extends CustomEvent<T> {
466
+ /**
467
+ * @deprecated
468
+ the data attribute has been migrated to details to match the CustomEvent spec
469
+ more info: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
470
+ */
471
+ data?: T;
472
+ }
473
+
474
+ declare const IMA_ADAPTER_INIT = "ad-ima-adapter-init";
475
+
476
+ declare const IMA_ADS_RENDERING_SETTINGS = "ad-ima-rendering-settings";
477
+
478
+ declare const IMA_BEFORE_ADS_REQUEST = "ad-ima-before-ads-request";
479
+
480
+ declare type JSONPlayer = any;
481
+
482
+ declare type KeyValue = Record<string, any>;
483
+
484
+ declare interface LazyAdTag {
485
+ (): Promise<string>;
486
+ }
487
+
488
+ declare type Listener<T = any> = {
489
+ (e: CustomEvent<T>): void;
490
+ };
491
+
492
+ declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue> extends Plugin_2<PluginOwnConfig> {
493
+ onload<T = KeyValue>(config: PluginConfig<T>, root: PlayerRoot, video: Player, src?: SourceObj): void;
494
+ wants<S = SourceObj, T = KeyValue>(srcString: SourceStr, srcObj: S, config: PluginConfig<T>): boolean;
495
+ wants<S = KeyValue, T = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: PluginConfig<T>): boolean;
496
+ }
497
+
498
+ declare type Macro = string | number | boolean | undefined | null | DynamicMacro;
499
+
500
+ declare type MacrosMap = Record<string, Macro>;
501
+
502
+ declare type MapToConfigs<Arr extends PluginCtor[]> = {
503
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
504
+ };
505
+
506
+ declare type Maybe<T> = undefined | T;
507
+
508
+ declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
509
+
510
+ declare type Metadata_2 = Record<string, string | number>;
511
+
512
+ declare const NO_AD_INDICATOR: number;
513
+
514
+ declare const NO_FULLSCREEN: number;
515
+
516
+ declare interface Player extends HTMLVideoElement {
517
+ renderPlugin: (pluginContainer: HTMLElement) => void;
518
+ toggleDisable: (flag: boolean) => void;
519
+ original_src: string;
520
+ root: PlayerRoot;
521
+ playerState: Record<string, boolean>;
522
+ reaper: Map<string, any> | 0;
523
+ hasState(state: PlayerState): boolean;
524
+ transitionState(to: PlayerState, from: PlayerState, timer?: number): void;
525
+ togglePlay(on?: boolean): Promise<void>;
526
+ toggleFullScreen(on?: boolean, state_only?: boolean): void;
527
+ toggleMute(on?: boolean): void;
528
+ destroy(): void;
529
+ render(): void;
530
+ render(component: string, args: any[]): void;
531
+ createComponents(...args: string[]): HTMLElement[];
532
+ setOpts(config: Config): void;
533
+ setSrc(sources: UnsafeSource): Player;
534
+ on<T>(event: string | string[], handler: (e: FPEvent<T>) => void): Player;
535
+ once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
536
+ off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
537
+ poll<T>(event: string, data?: T): FPEvent<T>;
538
+ emit<T>(event: string, data?: T): Player;
539
+ setAttrs(attrs: Config): Player;
540
+ opt<T>(key: string, fallback?: T): T;
541
+ enqueueSeek(offset: number): any;
542
+ setState(state: string, flag: boolean): Player;
543
+ toJSON(): JSONPlayer;
544
+ i18n(k: string, fallback?: string): string;
545
+ deviceId(): DeviceId;
546
+ live_state: {
547
+ dvr?: boolean;
548
+ dvr_window?: number;
549
+ };
550
+ opts: Config;
551
+ plugins: Array<Plugin_2 | Loader>;
552
+ dvr_offset?: number;
553
+ message?: {
554
+ events: Record<string, string>;
555
+ };
556
+ disabled: boolean;
557
+ started?: boolean;
558
+ token: string;
559
+ tracks?: VideoTrack[];
560
+ _customElements: FlowplayerCustomElementRegistry;
561
+ _storage: Storage;
562
+ }
563
+
564
+ declare type PlayerIMAConfig = {
565
+ ads: TimeBasedAd[];
566
+ Locale?: string;
567
+ parameters?: MacrosMap;
568
+ preload_ads?: boolean;
569
+ always_show_controls?: boolean;
570
+ disable_content_peek_prevent_on_ios?: boolean;
571
+ autopause?: boolean;
572
+ };
573
+
574
+ declare type PlayerRoot = HTMLElement & {
575
+ prevWidth?: number;
576
+ };
577
+
578
+ declare namespace Players {
579
+ export {
580
+ VideoTrack,
581
+ PlayerState,
582
+ FPEvent,
583
+ DeviceId,
584
+ JSONPlayer,
585
+ PlayerRoot,
586
+ Player
587
+ }
588
+ }
589
+
590
+ declare type PlayerState = string;
591
+
592
+ declare type PlayerWith<T> = Players.Player & T;
593
+
594
+ declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
595
+ /**
596
+ * a plugin must always implement the init method so a player instance knows how to initialize it
597
+ */
598
+ init<T>(config: PluginConfig<T>, container: PlayerRoot, player: Player): void;
599
+ init(config: PluginConfig<PluginOwnConfig>, container: PlayerRoot, player: Player): void;
600
+ }
601
+
602
+ declare type PluginConfig<T> = Config & T;
603
+
604
+ declare interface PluginCtor<PluginOwnConfig extends KeyValue = KeyValue> {
605
+ new (umd: FlowplayerUMD, player: Player): AnyPlugin<PluginOwnConfig>;
606
+ }
607
+
608
+ declare enum QualityOpts {
609
+ LOW = 1,
610
+ MEDIUM = 2,
611
+ HIGH = 4
612
+ }
613
+
614
+ declare const RELOAD_AD_REQUESTED = "reload-ad-requested";
615
+
616
+ declare const REMAINING_TIME: number;
617
+
618
+ /**
619
+ * used by ui elements to toggle mute / unmute
620
+ */
621
+ declare const REQUEST_AD_MUTE_UNMUTE = "request/ad/muteunmute";
622
+
623
+ /**
624
+ * used by ui elements to signal to the ads controller that the current ad should be paused by the adapter
625
+ */
626
+ declare const REQUEST_AD_PAUSE = "request/ad/pause";
627
+
628
+ /**
629
+ * used by ui elements to signal to the ads controller that the current ad playback should be resumed by the adapter
630
+ */
631
+ declare const REQUEST_AD_PLAY = "request/ad/play";
632
+
633
+ declare type ResizeInfo = {
634
+ width: number;
635
+ height: number;
636
+ linear: boolean;
637
+ silent: boolean;
638
+ resize_non_linear: boolean;
639
+ };
640
+
641
+ declare namespace SampleTags {
642
+ export {
643
+ SINGlE_INLINE_LINEAR,
644
+ SINGLE_SKIPPABLE_INLINE,
645
+ SINGLE_REDIRECT_LINEAR,
646
+ SINGLE_REDIRECT_ERROR,
647
+ SINGLE_REDIRECT_BROKEN,
648
+ SINGLE_VPAID_20_LINEAR,
649
+ SINGLE_VPAID_20_NON_LINEAR,
650
+ SINGLE_NON_LINEAR_INLINE,
651
+ VMAP_SESSION_AD_RULE_PREROLL,
652
+ VMAP_PREROLL,
653
+ VMAP_PREROLL_BUMPER,
654
+ VMAP_POSTROLL,
655
+ VMAP_POSTROLL_BUMPER
656
+ }
657
+ }
658
+
659
+ declare const SINGlE_INLINE_LINEAR = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
660
+
661
+ declare const SINGLE_NON_LINEAR_INLINE = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/nonlinear_ad_samples&sz=480x70&cust_params=sample_ct%3Dnonlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
662
+
663
+ declare const SINGLE_REDIRECT_BROKEN = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirecterror&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&nofb=1&correlator=";
664
+
665
+ declare const SINGLE_REDIRECT_ERROR = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirecterror&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
666
+
667
+ declare const SINGLE_REDIRECT_LINEAR = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirectlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
668
+
669
+ declare const SINGLE_SKIPPABLE_INLINE = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
670
+
671
+ declare const SINGLE_VPAID_20_LINEAR = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinearvpaid2js&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
672
+
673
+ declare const SINGLE_VPAID_20_NON_LINEAR = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dnonlinearvpaid2js&ciu_szs=728x90%2C300x250&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";
674
+
675
+ declare type SourceObj = {
676
+ src?: SourceStr;
677
+ type?: string;
678
+ drm?: DRMSourceConfiguration;
679
+ };
680
+
681
+ declare type SourceStr = string;
682
+
683
+ declare type SourceWith<T> = SourceObj & T;
684
+
685
+ declare const STICKY_CONTROLS: number;
686
+
687
+ declare type TimeBasedAd = BaseAdObj & {
688
+ time: number;
689
+ };
690
+
691
+ /**
692
+ * placeholder for todo types that we can use our editors to easily trace
693
+ */
694
+ declare type Todo = any;
695
+
696
+ declare type UnsafeSource = SourceStr | SourceObj | Array<SourceStr | SourceObj>;
697
+
698
+ declare interface VideoTrack {
699
+ name: string;
700
+ data: any;
701
+ default: boolean;
702
+ selected: boolean;
703
+ }
704
+
705
+ declare const VMAP_POSTROLL = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpostonly&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=";
706
+
707
+ declare const VMAP_POSTROLL_BUMPER = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpostonlybumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=";
708
+
709
+ declare const VMAP_PREROLL = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonly&ciu_szs=300x250%2C728x90&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=";
710
+
711
+ declare const VMAP_PREROLL_BUMPER = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonlybumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=";
712
+
713
+ declare const VMAP_SESSION_AD_RULE_PREROLL = "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sar%3Da0f2&ciu_szs=300x250&ad_rule=1&gdfp_req=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=";
714
+
715
+ declare const VOLUME_BAR: number;
716
+
717
+ declare const VPAID_INIT = "vpaid-init";
718
+
719
+ export { }