@flowplayer/player 3.11.2-rc.2 → 3.11.2-rc.4

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 (71) 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 +1 -1
  5. package/package.json +1 -1
  6. package/plugins/ads.d.ts +5 -432
  7. package/plugins/ads.js +1 -1
  8. package/plugins/airplay.d.ts +7 -60
  9. package/plugins/airplay.js +1 -1
  10. package/plugins/analytics.d.ts +74 -53
  11. package/plugins/analytics.js +1 -1
  12. package/plugins/asel.d.ts +5 -43
  13. package/plugins/asel.js +1 -1
  14. package/plugins/audio.d.ts +1 -23
  15. package/plugins/chapters.d.ts +5 -74
  16. package/plugins/chapters.js +1 -1
  17. package/plugins/chromecast.d.ts +20 -82
  18. package/plugins/consent.d.ts +3 -47
  19. package/plugins/context-menu.d.ts +75 -19
  20. package/plugins/context-menu.js +1 -1
  21. package/plugins/cuepoints.d.ts +2 -21
  22. package/plugins/dash.d.ts +5 -44
  23. package/plugins/drm.d.ts +74 -80
  24. package/plugins/drm.js +1 -1
  25. package/plugins/endscreen.d.ts +7 -53
  26. package/plugins/fas.d.ts +5 -46
  27. package/plugins/fas.js +1 -1
  28. package/plugins/ga4.d.ts +30 -61
  29. package/plugins/ga4.js +1 -1
  30. package/plugins/gemius.d.ts +7 -45
  31. package/plugins/google-analytics.d.ts +30 -63
  32. package/plugins/google-analytics.js +1 -1
  33. package/plugins/health.d.ts +5 -1
  34. package/plugins/health.js +1 -1
  35. package/plugins/hls.d.ts +81 -15
  36. package/plugins/hls.js +1 -1
  37. package/plugins/id3.d.ts +74 -13
  38. package/plugins/id3.js +1 -1
  39. package/plugins/iframe.d.ts +2 -18
  40. package/plugins/iframe.js +1 -1
  41. package/plugins/keyboard.d.ts +75 -5
  42. package/plugins/keyboard.js +1 -1
  43. package/plugins/media-session.d.ts +74 -4
  44. package/plugins/media-session.js +1 -1
  45. package/plugins/message.d.ts +74 -8
  46. package/plugins/message.js +1 -1
  47. package/plugins/ovp.d.ts +22 -44
  48. package/plugins/ovp.js +1 -1
  49. package/plugins/playlist.d.ts +5 -46
  50. package/plugins/playlist.js +1 -1
  51. package/plugins/preview.d.ts +86 -50
  52. package/plugins/qsel.d.ts +3 -26
  53. package/plugins/qul.d.ts +78 -29
  54. package/plugins/rts.d.ts +68 -82
  55. package/plugins/rts.js +1 -1
  56. package/plugins/share.d.ts +3 -37
  57. package/plugins/share.js +1 -1
  58. package/plugins/speed.d.ts +1 -10
  59. package/plugins/ssai.d.ts +2 -47
  60. package/plugins/ssai.js +1 -1
  61. package/plugins/subtitles.d.ts +11 -13
  62. package/plugins/subtitles.js +1 -1
  63. package/plugins/thumbnails.d.ts +5 -50
  64. package/plugins/thumbnails.js +1 -1
  65. package/plugins/tizen.d.ts +7 -118
  66. package/plugins/tizen.js +1 -1
  67. package/plugins/vtsel.d.ts +3 -26
  68. package/plugins/vtsel.js +1 -1
  69. package/plugins/webos.d.ts +7 -118
  70. package/plugins/webos.js +1 -1
  71. package/util/loader.d.ts +1 -1
@@ -1,7 +1,28 @@
1
1
  import type { MediaKeyFunc } from 'hls.js';
2
2
 
3
+ declare type AnyPlugin<PluginOwnConfig extends KeyValue> = Plugin_2<PluginOwnConfig> | Loader<PluginOwnConfig>;
4
+
5
+ declare type ArrayToIntersection<T extends Array<unknown>> = T extends [infer Current, ...infer Remaining] ? Current & ArrayToIntersection<Remaining> : unknown;
6
+
7
+ declare enum AutoplayOpts {
8
+ OFF = 0,
9
+ ON = 1,
10
+ AUDIO_REQUIRED = 2
11
+ }
12
+
3
13
  declare type BitOpts = number;
4
14
 
15
+ declare type Component = {
16
+ onrender?: (config: Config, root: PlayerRoot, player: Player) => void;
17
+ onremove?: (config: Config, root: PlayerRoot, player: Player) => void;
18
+ };
19
+
20
+ declare interface Components {
21
+ render(key: string, args: any[]): void;
22
+ remove(key: string, args: any[]): void;
23
+ put(key: string, args: Component): void;
24
+ }
25
+
5
26
  declare interface Config {
6
27
  src?: UnsafeSource;
7
28
  preload?: "none" | "metadata" | "auto";
@@ -52,27 +73,13 @@ declare interface Config {
52
73
  seconds_to_dvr?: number;
53
74
  }
54
75
 
55
- declare namespace Configs {
56
- export {
57
- BitOpts,
58
- FlowplayerCustomElementRegistry,
59
- Config,
60
- CustomConfig,
61
- PluginConfig
62
- }
63
- }
64
-
65
- declare type ConfigWith<T> = Configs.Config & T;
66
-
67
- declare class ContextMenu implements Plugin_2 {
68
- init(opts: ConfigWith<{
69
- context_menu?: LinkOpts[];
70
- }>, root: PlayerRoot, video: Player): void;
71
- }
72
- export default ContextMenu;
73
-
74
76
  declare type CustomConfig<T> = Config & T;
75
77
 
78
+ declare const _default: PluginCtor< {
79
+ context_menu?: LinkOpts[] | undefined;
80
+ }>;
81
+ export default _default;
82
+
76
83
  declare type DeviceId = string;
77
84
 
78
85
  declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
@@ -100,6 +107,39 @@ declare type DRMVendorImplementation = {
100
107
 
101
108
  declare type FlowplayerCustomElementRegistry = Map<string, string>;
102
109
 
110
+ declare interface FlowplayerUMD extends FlowplayerUMDBase {
111
+ (selector: string, config?: Config): Player;
112
+ (element: HTMLElement, config?: Config): Player;
113
+ <T>(selector: string, config?: CustomConfig<T>): Player;
114
+ <T>(element: HTMLElement, config?: CustomConfig<T>): Player;
115
+ <PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<CustomConfig<MergeConfigs<PluginCtors>>>;
116
+ }
117
+
118
+ declare interface FlowplayerUMDBase {
119
+ instances: Player[];
120
+ extensions: PluginCtor[];
121
+ events: Record<string, string>;
122
+ ads?: {
123
+ events: Record<string, string>;
124
+ };
125
+ states: Record<string, string>;
126
+ quality: typeof QualityOpts;
127
+ commit: string;
128
+ version: string;
129
+ customElements: FlowplayerCustomElementRegistry;
130
+ defaultElements: Record<string, string>;
131
+ components: Components;
132
+ support: any;
133
+ autoplay: typeof AutoplayOpts;
134
+ jwt: any;
135
+ loaders: any;
136
+ }
137
+
138
+ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config> extends FlowplayerUMDBase {
139
+ (selector: string, config?: ConfigWithPlugins): Player;
140
+ (element: HTMLElement, config?: ConfigWithPlugins): Player;
141
+ }
142
+
103
143
  declare interface FPEvent<T> extends CustomEvent<T> {
104
144
  /**
105
145
  * @deprecated
@@ -126,6 +166,12 @@ declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue> extends Pl
126
166
  wants<S = KeyValue, T = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: PluginConfig<T>): boolean;
127
167
  }
128
168
 
169
+ declare type MapToConfigs<Arr extends PluginCtor[]> = {
170
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
171
+ };
172
+
173
+ declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
174
+
129
175
  declare interface Player extends HTMLVideoElement {
130
176
  renderPlugin: (pluginContainer: HTMLElement) => void;
131
177
  toggleDisable: (flag: boolean) => void;
@@ -190,6 +236,16 @@ declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
190
236
 
191
237
  declare type PluginConfig<T> = Config & T;
192
238
 
239
+ declare interface PluginCtor<PluginOwnConfig extends KeyValue = KeyValue> {
240
+ new (umd: FlowplayerUMD, player: Player): AnyPlugin<PluginOwnConfig>;
241
+ }
242
+
243
+ declare enum QualityOpts {
244
+ LOW = 1,
245
+ MEDIUM = 2,
246
+ HIGH = 4
247
+ }
248
+
193
249
  declare type SourceObj = {
194
250
  src?: SourceStr;
195
251
  type?: string;
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.context_menu=t())}(this,(function(){"use strict";const e=document.createElement;function t(t,n){const o=n.href?function(t){const n=e("a");return n.href=t,n}(n.href):e("span"),s=n.onclick;return n.class&&(o.className=n.class),n.text&&(o.innerText=n.text),s&&o.addEventListener("click",(function(e){s(e,t)})),o}const n=[{text:"Flowplayer © "+(new Date).getFullYear()},{href:"https://flowplayer.com",text:"About this player"},{href:"https://flowplayer.com/license/",text:"GPL based license"}];let o=!1;const s=e=>{e.classList.remove("fp-active"),o=!1};document.addEventListener("click",e=>{2!=e.button&&0!=o&&s(o)}),document.addEventListener("keyup",(function(){o&&s(o)}));class ContextMenu{init(e,s,c){const i=e.context_menu||n,l=document.createElement("div");l.className="fp-context-menu fp-menu",l.append(...i.map(e=>t(c,e)));const r=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(c,"flowplayer-ui");r&&r.addEventListener("contextmenu",(function(e){if(!l.parentNode)return;e.preventDefault(),c.emit("contextmenu");const t=l.getBoundingClientRect();l.style.left=e.clientX-window.scrollX-t.left+2+"px",l.style.right=e.clientY+window.scrollY-t.top-5+"px",l.classList.contains("fp-active")||(l.classList.contains("fp-active"),o=l)}))}}return function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;"function"==typeof n?n(t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t))}(window,ContextMenu),ContextMenu}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.context_menu=t())}(this,(function(){"use strict";const e=document.createElement;function t(t,n){const o=n.href?function(t){const n=e("a");return n.href=t,n}(n.href):e("span"),s=n.onclick;return n.class&&(o.className=n.class),n.text&&(o.innerText=n.text),s&&o.addEventListener("click",(function(e){s(e,t)})),o}const n=[{text:"Flowplayer © "+(new Date).getFullYear()},{href:"https://flowplayer.com",text:"About this player"},{href:"https://flowplayer.com/license/",text:"GPL based license"}];let o=!1;const s=e=>{e.classList.remove("fp-active"),o=!1};document.addEventListener("click",e=>{2!=e.button&&0!=o&&s(o)}),document.addEventListener("keyup",(function(){o&&s(o)}));return function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const n=e.flowplayer;return"function"==typeof n?(n(t),t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t),t)}(window,class ContextMenu{init(e,s,c){const i=e.context_menu||n,l=document.createElement("div");l.className="fp-context-menu fp-menu",l.append(...i.map(e=>t(c,e)));const r=function(e,t){const n=e._customElements.get(t);return n&&e.root.querySelector(n)||void 0}(c,"flowplayer-ui");r&&r.addEventListener("contextmenu",(function(e){if(!l.parentNode)return;e.preventDefault(),c.emit("contextmenu");const t=l.getBoundingClientRect();l.style.left=e.clientX-window.scrollX-t.left+2+"px",l.style.right=e.clientY+window.scrollY-t.top-5+"px",l.classList.contains("fp-active")||(l.classList.contains("fp-active"),o=l)}))}})}));
@@ -73,18 +73,6 @@ declare interface Config {
73
73
  seconds_to_dvr?: number;
74
74
  }
75
75
 
76
- declare namespace Configs {
77
- export {
78
- BitOpts,
79
- FlowplayerCustomElementRegistry,
80
- Config,
81
- CustomConfig,
82
- PluginConfig
83
- }
84
- }
85
-
86
- declare type ConfigWith<T> = Configs.Config & T;
87
-
88
76
  export declare type CueAttrs = {
89
77
  startTime: number;
90
78
  endTime: number;
@@ -94,21 +82,14 @@ export declare type CueAttrs = {
94
82
 
95
83
  export declare type CuepointList = Array<CueAttrs>;
96
84
 
97
- declare class Cuepoints implements Plugin_2<CuepointsConfig> {
98
- constructor(umd: FlowplayerUMD);
99
- init(opts: CuepointsConfig, root: PlayerRoot, video: Player): void;
100
- }
101
-
102
- export declare type CuepointsConfig = ConfigWith<CuepointsConfigNamespaced>;
103
-
104
- declare type CuepointsConfigNamespaced = {
85
+ export declare type CuepointsConfig = {
105
86
  cuepoints?: CuepointList;
106
87
  draw_cuepoints?: boolean;
107
88
  };
108
89
 
109
90
  declare type CustomConfig<T> = Config & T;
110
91
 
111
- declare const _default: typeof Cuepoints;
92
+ declare const _default: PluginCtor<CuepointsConfig>;
112
93
  export default _default;
113
94
 
114
95
  declare type DeviceId = string;
package/plugins/dash.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { MediaKeyFunc } from 'hls.js';
2
2
  import { MediaPlayer } from 'dashjs';
3
3
  import type { MediaPlayerClass } from 'dashjs';
4
+ import { MediaSettings } from 'dashjs';
5
+ import { ProtectionDataSet } from 'dashjs';
4
6
 
5
7
  declare type AnyPlugin<PluginOwnConfig extends KeyValue> = Plugin_2<PluginOwnConfig> | Loader<PluginOwnConfig>;
6
8
 
@@ -93,19 +95,17 @@ declare type CustomConfig<T> = Config & T;
93
95
 
94
96
  /* Excluded from this release type: DashClass */
95
97
 
96
- export declare type DashConfig = ConfigWith<{
98
+ declare type DashConfig = ConfigWith<{
97
99
  dash?: DashSettings;
98
100
  }>;
99
101
 
100
102
  /* Excluded from this release type: DashPlayer */
101
103
 
102
- export declare type DashSettings = MediaSettings & {
104
+ declare type DashSettings = MediaSettings & {
103
105
  drm?: ProtectionDataSet;
104
106
  };
105
107
 
106
- declare const _default: PluginCtor<ConfigWith<{
107
- dash?: DashSettings | undefined;
108
- }>>;
108
+ declare const _default: PluginCtor<KeyValue>;
109
109
  export default _default;
110
110
 
111
111
  declare type DeviceId = string;
@@ -191,16 +191,6 @@ declare type MapToConfigs<Arr extends PluginCtor[]> = {
191
191
  [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
192
192
  };
193
193
 
194
- declare type MediaKeyMessageType_2 = "individualization-request" | "license-release" | "license-renewal" | "license-request";
195
-
196
- export declare type MediaSettings = {
197
- lang?: string;
198
- viewpoint?: any;
199
- audioChannelConfiguration?: any[];
200
- accessibility?: any;
201
- role?: string;
202
- };
203
-
204
194
  declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
205
195
 
206
196
  declare interface Player extends HTMLVideoElement {
@@ -285,35 +275,6 @@ declare interface PluginCtor<PluginOwnConfig extends KeyValue = KeyValue> {
285
275
  new (umd: FlowplayerUMD, player: Player): AnyPlugin<PluginOwnConfig>;
286
276
  }
287
277
 
288
- export declare interface ProtectionData {
289
- /**
290
- * A license server URL to use with this key system.
291
- * When specified as a string, a single URL will be used regardless of message type.
292
- * When specified as an object, the object will have property names for each message
293
- * type with the corresponding property value being the URL to use for
294
- * messages of that type
295
- */
296
- serverURL?: string | {
297
- [P in MediaKeyMessageType_2]: string;
298
- };
299
- /** headers to add to the http request */
300
- httpRequestHeaders?: object;
301
- /**
302
- * Defines a set of clear keys that are available to the key system.
303
- * Object properties are base64-encoded keyIDs (with no padding).
304
- * Corresponding property values are keys, base64-encoded (no padding).
305
- */
306
- clearkeys?: {
307
- [key: string]: string;
308
- };
309
- /** Priority level of the key system to be selected (0 is the highest prority, -1 for undefined priority) */
310
- priority?: number;
311
- }
312
-
313
- export declare interface ProtectionDataSet {
314
- [keySystemName: string]: ProtectionData;
315
- }
316
-
317
278
  declare enum QualityOpts {
318
279
  LOW = 1,
319
280
  MEDIUM = 2,
package/plugins/drm.d.ts CHANGED
@@ -1,8 +1,31 @@
1
1
  import { HlsConfig } from 'hls.js';
2
2
  import type { MediaKeyFunc } from 'hls.js';
3
+ import { MediaSettings } from 'dashjs';
4
+ import { ProtectionDataSet } from 'dashjs';
5
+
6
+ declare type AnyPlugin<PluginOwnConfig extends KeyValue> = Plugin_2<PluginOwnConfig> | Loader<PluginOwnConfig>;
7
+
8
+ declare type ArrayToIntersection<T extends Array<unknown>> = T extends [infer Current, ...infer Remaining] ? Current & ArrayToIntersection<Remaining> : unknown;
9
+
10
+ declare enum AutoplayOpts {
11
+ OFF = 0,
12
+ ON = 1,
13
+ AUDIO_REQUIRED = 2
14
+ }
3
15
 
4
16
  declare type BitOpts = number;
5
17
 
18
+ declare type Component = {
19
+ onrender?: (config: Config, root: PlayerRoot, player: Player) => void;
20
+ onremove?: (config: Config, root: PlayerRoot, player: Player) => void;
21
+ };
22
+
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
+ }
28
+
6
29
  declare interface Config {
7
30
  src?: UnsafeSource;
8
31
  preload?: "none" | "metadata" | "auto";
@@ -67,30 +90,20 @@ declare type ConfigWith<T> = Configs.Config & T;
67
90
 
68
91
  declare type CustomConfig<T> = Config & T;
69
92
 
70
- declare type DashConfig = ConfigWith<{
71
- dash?: DashSettings;
93
+ declare const _default: PluginCtor< {
94
+ hls?: Partial<HlsConfig> | undefined;
95
+ dash?: Partial<ConfigWith<{
96
+ dash?: (MediaSettings & {
97
+ drm?: ProtectionDataSet | undefined;
98
+ }) | undefined;
99
+ }>> | undefined;
72
100
  }>;
73
-
74
- declare type DashSettings = MediaSettings & {
75
- drm?: ProtectionDataSet;
76
- };
101
+ export default _default;
77
102
 
78
103
  declare type DeviceId = string;
79
104
 
80
- declare class DRM implements Plugin_2 {
81
- init(config: DRMConfig, _: PlayerRoot, player: DRMPlayer): void;
82
- hls_drm(player: DRMPlayer, config: DRMConfig, drm_config?: DRMSourceConfiguration): void;
83
- dash_drm(player: DRMPlayer, config: DRMConfig, drm_config?: DRMSourceConfiguration): void;
84
- }
85
- export default DRM;
86
-
87
105
  declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
88
106
 
89
- declare type DRMConfig = ConfigWith<{
90
- hls?: Partial<HlsConfig>;
91
- dash?: Partial<DashConfig>;
92
- }>;
93
-
94
107
  declare type DRMConfiguration = {
95
108
  license_server: string;
96
109
  http_headers?: Record<string, string>;
@@ -100,12 +113,6 @@ declare type DRMConfiguration = {
100
113
  query_params?: Record<string, string>;
101
114
  };
102
115
 
103
- declare type DRMPlayer = Player & {
104
- webkitSetMediaKeys(key: WebKitMediaKeys): void;
105
- webkitKeys: WebKitMediaKeys;
106
- on: (event: "src", handler: (e: FPEvent<SourceObj>) => void) => DRMPlayer;
107
- };
108
-
109
116
  declare type DRMSourceConfiguration = {
110
117
  [keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
111
118
  };
@@ -118,10 +125,41 @@ declare type DRMVendorImplementation = {
118
125
  }, cb: (license_data: Uint8Array) => void) => void;
119
126
  };
120
127
 
121
- declare type EventHandler = (ev: any) => void;
122
-
123
128
  declare type FlowplayerCustomElementRegistry = Map<string, string>;
124
129
 
130
+ declare interface FlowplayerUMD extends FlowplayerUMDBase {
131
+ (selector: string, config?: Config): Player;
132
+ (element: HTMLElement, config?: Config): Player;
133
+ <T>(selector: string, config?: CustomConfig<T>): Player;
134
+ <T>(element: HTMLElement, config?: CustomConfig<T>): Player;
135
+ <PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<CustomConfig<MergeConfigs<PluginCtors>>>;
136
+ }
137
+
138
+ declare interface FlowplayerUMDBase {
139
+ instances: Player[];
140
+ extensions: PluginCtor[];
141
+ events: Record<string, string>;
142
+ ads?: {
143
+ events: Record<string, string>;
144
+ };
145
+ states: Record<string, string>;
146
+ quality: typeof QualityOpts;
147
+ commit: string;
148
+ version: string;
149
+ customElements: FlowplayerCustomElementRegistry;
150
+ defaultElements: Record<string, string>;
151
+ components: Components;
152
+ support: any;
153
+ autoplay: typeof AutoplayOpts;
154
+ jwt: any;
155
+ loaders: any;
156
+ }
157
+
158
+ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config> extends FlowplayerUMDBase {
159
+ (selector: string, config?: ConfigWithPlugins): Player;
160
+ (element: HTMLElement, config?: ConfigWithPlugins): Player;
161
+ }
162
+
125
163
  declare interface FPEvent<T> extends CustomEvent<T> {
126
164
  /**
127
165
  * @deprecated
@@ -141,16 +179,12 @@ declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue> extends Pl
141
179
  wants<S = KeyValue, T = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: PluginConfig<T>): boolean;
142
180
  }
143
181
 
144
- declare type MediaKeyMessageType_2 = "individualization-request" | "license-release" | "license-renewal" | "license-request";
145
-
146
- declare type MediaSettings = {
147
- lang?: string;
148
- viewpoint?: any;
149
- audioChannelConfiguration?: any[];
150
- accessibility?: any;
151
- role?: string;
182
+ declare type MapToConfigs<Arr extends PluginCtor[]> = {
183
+ [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
152
184
  };
153
185
 
186
+ declare type MergeConfigs<Arr extends PluginCtor[]> = ArrayToIntersection<MapToConfigs<Arr>>;
187
+
154
188
  declare interface Player extends HTMLVideoElement {
155
189
  renderPlugin: (pluginContainer: HTMLElement) => void;
156
190
  toggleDisable: (flag: boolean) => void;
@@ -215,33 +249,14 @@ declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
215
249
 
216
250
  declare type PluginConfig<T> = Config & T;
217
251
 
218
- declare interface ProtectionData {
219
- /**
220
- * A license server URL to use with this key system.
221
- * When specified as a string, a single URL will be used regardless of message type.
222
- * When specified as an object, the object will have property names for each message
223
- * type with the corresponding property value being the URL to use for
224
- * messages of that type
225
- */
226
- serverURL?: string | {
227
- [P in MediaKeyMessageType_2]: string;
228
- };
229
- /** headers to add to the http request */
230
- httpRequestHeaders?: object;
231
- /**
232
- * Defines a set of clear keys that are available to the key system.
233
- * Object properties are base64-encoded keyIDs (with no padding).
234
- * Corresponding property values are keys, base64-encoded (no padding).
235
- */
236
- clearkeys?: {
237
- [key: string]: string;
238
- };
239
- /** Priority level of the key system to be selected (0 is the highest prority, -1 for undefined priority) */
240
- priority?: number;
252
+ declare interface PluginCtor<PluginOwnConfig extends KeyValue = KeyValue> {
253
+ new (umd: FlowplayerUMD, player: Player): AnyPlugin<PluginOwnConfig>;
241
254
  }
242
255
 
243
- declare interface ProtectionDataSet {
244
- [keySystemName: string]: ProtectionData;
256
+ declare enum QualityOpts {
257
+ LOW = 1,
258
+ MEDIUM = 2,
259
+ HIGH = 4
245
260
  }
246
261
 
247
262
  declare type SourceObj = {
@@ -263,25 +278,4 @@ declare interface VideoTrack {
263
278
  selected: boolean;
264
279
  }
265
280
 
266
- declare interface WebKitMediaKeyError {
267
- code: number;
268
- systemCode: number;
269
- }
270
-
271
- declare interface WebKitMediaKeys {
272
- keySystem: string;
273
- createSession(mimeType: string, cert: Uint8Array): WebKitMediaKeySession;
274
- }
275
-
276
- declare interface WebKitMediaKeySession extends EventTarget {
277
- error: WebKitMediaKeyError;
278
- keySystem: string;
279
- onwebkitkeyadded: EventHandler;
280
- onwebkitkeyerror: EventHandler;
281
- onwebkitkeymessage: EventHandler;
282
- sessionId: string;
283
- close: () => void;
284
- update: (key: Uint8Array) => void;
285
- }
286
-
287
281
  export { }
package/plugins/drm.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.drm=t())}(this,(function(){"use strict";const e="com.widevine.alpha",t="com.microsoft.playready",r="com.apple.fps.1_0";var n=Object.freeze({__proto__:null,WIDEVINE:e,PLAYREADY:t,CLEARKEY:"org.w3.clearkey",FAIRPLAY:r,LICENSE_SERVER:"license_server",KEY:"key",KEY_ID:"kid",HTTP_HEADERS:"http_headers",QUERY_PARAMS:"query_params",CERTIFICATE:"certificate",VENDOR:"vendor",REQUEST_MEDIA_KEY_SYSTEM_ACCESS_FUNCTION:"request_media_key_system_access_function"});function s(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",r=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),n=/Android/.test(t)&&!/Firefox/.test(t),s=/^((?!chrome|android).)*safari/i.test(t),o=/chrome|crios/i.test(t)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(t),i=/firefox|fxios/i.test(t)&&!/seamonkey/i.test(t),a=/edg/i.test(t),c=/opr|opera/i.test(t),d=/SamsungBrowser/.test(t),u=d&&/SMART-TV/.test(t);return{controls:!r,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:n,iphone:r,safari:s,edge:a,opera:c,chrome:o,firefox:i,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:d,samsung_tv:d&&u,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}function o(n){const o={};return Object.keys(n).forEach((function(i){(function(n){const o=s();switch(n){case e:return o.chrome||o.firefox||o.edge||o.opera;case"org.w3.clearkey":return o.chrome||o.firefox;case r:return o.safari;case t:return o.edge}})(i)&&function(e,t,n){Object.assign(n,t),n.emeEnabled=!0,t.request_media_key_system_access_function&&(n.requestMediaKeySystemAccessFunc=t.request_media_key_system_access_function);const s=t.http_headers;s&&(n.licenseXhrSetup=function(e){Object.keys(s).forEach((function(t){e.setRequestHeader(t,s[t])}))}),n.drmSystems=n.drmSystems||{},Object.assign(n.drmSystems,{[e===r?"com.apple.fps":e]:{licenseUrl:t.license_server,serverCertificateUrl:t.certificate}})}(i,n[i],o)})),o}function i(r){const n={};return Object.keys(r).forEach((function(o){(function(r){const n=s();switch(r){case e:return n.chrome||n.firefox||n.edge||n.opera;case"org.w3.clearkey":return n.chrome||n.firefox;case t:return n.edge}})(o)&&(n[o]=function(e){return Object.assign({serverURL:e.license_server,httpRequestHeaders:e.http_headers},e)}(r[o]))})),n}const a=(e,t)=>fetch(e,t).then(c).then(e=>new Uint8Array(e)),c=e=>{if(e.ok)return e.arrayBuffer();throw d(e)},d=e=>new Error(`http:error status=${e.status} during key retrieval`);var u=Object.freeze({__proto__:null,fairplay_fetch_certificate:(e,t)=>{a(e).then(t)},fairplay_request_license:function(e,t,r){const n=((e,t)=>e.includes(t.assetId)&&Object.keys(t.queryParams||{}).find(t=>e.includes(t))?e:e.includes(t.assetId)?`${e}?${new URLSearchParams(t.queryParams).toString()}`:`${e}/${t.assetId}?${new URLSearchParams(t.queryParams).toString()}`)(e,t);a(n,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:t.message}).then(r)}});var f=Object.freeze({__proto__:null,fairplay_fetch_certificate:(e,t)=>{a(e).then(t)},fairplay_request_license:function(e,t,r){const n=new FormData;var s;n.set("assetid",t.assetId),n.set("spc",(s=t.message,btoa(Array.prototype.map.call(s,(function(e){return String.fromCharCode(e)})).join("")))),fetch(e,{method:"POST",body:n,headers:t.headers}).then(e=>{if(e.ok)return e.text();throw d(e)}).then(e=>function(e){const t=atob(e),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r}(e)).then(r)}}),l=Object.freeze({__proto__:null,ezdrm:u,buydrm:f});function y(e,t,n){const s=t[r],o=null==s?void 0:s.certificate;if(!s||!o)return;if(e.src&&0===e.src.indexOf("blob:"))return;const i=s.vendor||"ezdrm",a="string"==typeof i?l[i]:i;a.fairplay_fetch_certificate(o,(function(o){e.webkitSetMediaKeys(new window.WebKitMediaKeys(r));const i=n.initData,c=function(e){const t=function(e){const t=new Uint16Array(e);return String.fromCharCode(...t)}(e.buffer);return t.substring(t.indexOf("skd:")+6).split(";").pop()}(i);if(!c)return console.debug("flowplayer::drm::fairplay - unable to extract content id from init data");const d=function(e,t,r){"string"==typeof t&&(t=function(e){const t=new ArrayBuffer(2*e.length),r=new Uint16Array(t);return Array(...Array(e.length)).map((e,t)=>t).forEach(t=>{r[t]=e.charCodeAt(t)}),r}(t));let n=0;const s=new ArrayBuffer(e.byteLength+4+t.byteLength+4+r.byteLength),o=new DataView(s);new Uint8Array(s,n,e.byteLength).set(e),n+=e.byteLength,o.setUint32(n,t.byteLength,!0),n+=4;const i=new Uint16Array(s,n,t.length);i.set(t),n+=i.byteLength,o.setUint32(n,r.byteLength,!0),n+=4;return new Uint8Array(s,n,r.byteLength).set(r),new Uint8Array(s,0,s.byteLength)}(i,c,o),u=e.webkitKeys.createSession("application/x-mpegurl",d);u.addEventListener("webkitkeyerror",console.debug.bind(console,"webkitkeyerror")),u.addEventListener("webkitkeymessage",(function(e){const n={message:e.message,assetId:c,headers:s.http_headers||{},queryParams:t[r].query_params||{}};a.fairplay_request_license(s.license_server,n,e=>u.update(e))}))}))}class DRM{init(e,t,r){let n;r.on("webkitneedkey",e=>y(r,n.drm||{},e)),r.on("src",t=>{n=t.detail,function(e){var t,r,n,s,o;null===(t=e.hls)||void 0===t||delete t.drmSystems,null===(r=e.hls)||void 0===r||delete r.licenseXhrSetup,null===(n=e.hls)||void 0===n||delete n.requestMediaKeySystemAccessFunc,null===(s=e.hls)||void 0===s||delete s.drmSystemOptions,null===(o=e.hls)||void 0===o||delete o.emeEnabled}(e),this.hls_drm(r,e,t.detail.drm),this.dash_drm(r,e,t.detail.drm)})}hls_drm(e,t,r){if(!r)return;const n=o(r);e.setOpts({hls:Object.assign(t.hls||{},n)})}dash_drm(e,t,r){if(!r)return;const n=t.dash||{},s=i(r);e.setOpts({dash:Object.assign(n,{drm:s})})}}return Object.assign(DRM,n),function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const r=e.flowplayer;"function"==typeof r?r(t):(Array.isArray(r.extensions)||(r.extensions=[]),~r.extensions.indexOf(t)||r.extensions.push(t))}(window,DRM),DRM}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.drm=t())}(this,(function(){"use strict";const e="com.widevine.alpha",t="com.microsoft.playready",r="com.apple.fps.1_0";var n=Object.freeze({__proto__:null,WIDEVINE:e,PLAYREADY:t,CLEARKEY:"org.w3.clearkey",FAIRPLAY:r,LICENSE_SERVER:"license_server",KEY:"key",KEY_ID:"kid",HTTP_HEADERS:"http_headers",QUERY_PARAMS:"query_params",CERTIFICATE:"certificate",VENDOR:"vendor",REQUEST_MEDIA_KEY_SYSTEM_ACCESS_FUNCTION:"request_media_key_system_access_function"});function s(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",r=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),n=/Android/.test(t)&&!/Firefox/.test(t),s=/^((?!chrome|android).)*safari/i.test(t),o=/chrome|crios/i.test(t)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(t),i=/firefox|fxios/i.test(t)&&!/seamonkey/i.test(t),a=/edg/i.test(t),c=/opr|opera/i.test(t),d=/SamsungBrowser/.test(t),u=d&&/SMART-TV/.test(t);return{controls:!r,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:n,iphone:r,safari:s,edge:a,opera:c,chrome:o,firefox:i,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:d,samsung_tv:d&&u,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}function o(n){const o={};return Object.keys(n).forEach((function(i){(function(n){const o=s();switch(n){case e:return o.chrome||o.firefox||o.edge||o.opera;case"org.w3.clearkey":return o.chrome||o.firefox;case r:return o.safari;case t:return o.edge}})(i)&&function(e,t,n){Object.assign(n,t),n.emeEnabled=!0,t.request_media_key_system_access_function&&(n.requestMediaKeySystemAccessFunc=t.request_media_key_system_access_function);const s=t.http_headers;s&&(n.licenseXhrSetup=function(e){Object.keys(s).forEach((function(t){e.setRequestHeader(t,s[t])}))}),n.drmSystems=n.drmSystems||{},Object.assign(n.drmSystems,{[e===r?"com.apple.fps":e]:{licenseUrl:t.license_server,serverCertificateUrl:t.certificate}})}(i,n[i],o)})),o}function i(r){const n={};return Object.keys(r).forEach((function(o){(function(r){const n=s();switch(r){case e:return n.chrome||n.firefox||n.edge||n.opera;case"org.w3.clearkey":return n.chrome||n.firefox;case t:return n.edge}})(o)&&(n[o]=function(e){return Object.assign({serverURL:e.license_server,httpRequestHeaders:e.http_headers},e)}(r[o]))})),n}const a=(e,t)=>fetch(e,t).then(c).then(e=>new Uint8Array(e)),c=e=>{if(e.ok)return e.arrayBuffer();throw d(e)},d=e=>new Error(`http:error status=${e.status} during key retrieval`);var u=Object.freeze({__proto__:null,fairplay_fetch_certificate:(e,t)=>{a(e).then(t)},fairplay_request_license:function(e,t,r){const n=((e,t)=>e.includes(t.assetId)&&Object.keys(t.queryParams||{}).find(t=>e.includes(t))?e:e.includes(t.assetId)?`${e}?${new URLSearchParams(t.queryParams).toString()}`:`${e}/${t.assetId}?${new URLSearchParams(t.queryParams).toString()}`)(e,t);a(n,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:t.message}).then(r)}});var f=Object.freeze({__proto__:null,fairplay_fetch_certificate:(e,t)=>{a(e).then(t)},fairplay_request_license:function(e,t,r){const n=new FormData;var s;n.set("assetid",t.assetId),n.set("spc",(s=t.message,btoa(Array.prototype.map.call(s,(function(e){return String.fromCharCode(e)})).join("")))),fetch(e,{method:"POST",body:n,headers:t.headers}).then(e=>{if(e.ok)return e.text();throw d(e)}).then(e=>function(e){const t=atob(e),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r}(e)).then(r)}}),l=Object.freeze({__proto__:null,ezdrm:u,buydrm:f});function y(e,t,n){const s=t[r],o=null==s?void 0:s.certificate;if(!s||!o)return;if(e.src&&0===e.src.indexOf("blob:"))return;const i=s.vendor||"ezdrm",a="string"==typeof i?l[i]:i;a.fairplay_fetch_certificate(o,(function(o){e.webkitSetMediaKeys(new window.WebKitMediaKeys(r));const i=n.initData,c=function(e){const t=function(e){const t=new Uint16Array(e);return String.fromCharCode(...t)}(e.buffer);return t.substring(t.indexOf("skd:")+6).split(";").pop()}(i);if(!c)return console.debug("flowplayer::drm::fairplay - unable to extract content id from init data");const d=function(e,t,r){"string"==typeof t&&(t=function(e){const t=new ArrayBuffer(2*e.length),r=new Uint16Array(t);return Array(...Array(e.length)).map((e,t)=>t).forEach(t=>{r[t]=e.charCodeAt(t)}),r}(t));let n=0;const s=new ArrayBuffer(e.byteLength+4+t.byteLength+4+r.byteLength),o=new DataView(s);new Uint8Array(s,n,e.byteLength).set(e),n+=e.byteLength,o.setUint32(n,t.byteLength,!0),n+=4;const i=new Uint16Array(s,n,t.length);i.set(t),n+=i.byteLength,o.setUint32(n,r.byteLength,!0),n+=4;return new Uint8Array(s,n,r.byteLength).set(r),new Uint8Array(s,0,s.byteLength)}(i,c,o),u=e.webkitKeys.createSession("application/x-mpegurl",d);u.addEventListener("webkitkeyerror",console.debug.bind(console,"webkitkeyerror")),u.addEventListener("webkitkeymessage",(function(e){const n={message:e.message,assetId:c,headers:s.http_headers||{},queryParams:t[r].query_params||{}};a.fairplay_request_license(s.license_server,n,e=>u.update(e))}))}))}class DRM{init(e,t,r){let n;r.on("webkitneedkey",e=>y(r,n.drm||{},e)),r.on("src",t=>{n=t.detail,function(e){var t,r,n,s,o;null===(t=e.hls)||void 0===t||delete t.drmSystems,null===(r=e.hls)||void 0===r||delete r.licenseXhrSetup,null===(n=e.hls)||void 0===n||delete n.requestMediaKeySystemAccessFunc,null===(s=e.hls)||void 0===s||delete s.drmSystemOptions,null===(o=e.hls)||void 0===o||delete o.emeEnabled}(e),this.hls_drm(r,e,t.detail.drm),this.dash_drm(r,e,t.detail.drm)})}hls_drm(e,t,r){if(!r)return;const n=o(r);e.setOpts({hls:Object.assign(t.hls||{},n)})}dash_drm(e,t,r){if(!r)return;const n=t.dash||{},s=i(r);e.setOpts({dash:Object.assign(n,{drm:s})})}}return Object.assign(DRM,n),function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const r=e.flowplayer;return"function"==typeof r?(r(t),t):(Array.isArray(r.extensions)||(r.extensions=[]),~r.extensions.indexOf(t)||r.extensions.push(t),t)}(window,DRM)}));
@@ -73,26 +73,15 @@ declare interface Config {
73
73
  seconds_to_dvr?: number;
74
74
  }
75
75
 
76
- declare namespace Configs {
77
- export {
78
- BitOpts,
79
- FlowplayerCustomElementRegistry,
80
- Config,
81
- CustomConfig,
82
- PluginConfig
83
- }
84
- }
85
-
86
- declare type ConfigWith<T> = Configs.Config & T;
87
-
88
- declare type ConfigWithPlaylistAndEndscreen = ConfigWith<{
89
- endscreen?: EndscreenConfig;
90
- playlist?: PlaylistConfig;
91
- }>;
92
-
93
76
  declare type CustomConfig<T> = Config & T;
94
77
 
95
- declare const _default: typeof Endscreen;
78
+ declare const _default: PluginCtor< {
79
+ endscreen?: Partial<{
80
+ interstitial: boolean;
81
+ delay: number;
82
+ }> | undefined;
83
+ playlist?: PlaylistConfig | undefined;
84
+ }>;
96
85
  export default _default;
97
86
 
98
87
  declare type DeviceId = string;
@@ -120,29 +109,6 @@ declare type DRMVendorImplementation = {
120
109
  }, cb: (license_data: Uint8Array) => void) => void;
121
110
  };
122
111
 
123
- declare class Endscreen implements Plugin_2 {
124
- static events: {
125
- RECOMMENDATIONS_RENDER: string;
126
- RECOMMENDATIONS_READY: string;
127
- RECOMMENDATIONS_HIDE: string;
128
- };
129
- recommendations?: EndscreenRecommendations;
130
- logger: Logger;
131
- constructor(umd: FlowplayerUMD, _player: Player);
132
- init(config: ConfigWithPlaylistAndEndscreen, container: PlayerRoot, player: PlaylistPlayer): void;
133
- private _setSrc;
134
- private hide_recommendations;
135
- }
136
-
137
- declare type EndscreenConfig = Partial<{
138
- interstitial: boolean;
139
- delay: number;
140
- }>;
141
-
142
- declare type EndscreenRecommendations = {
143
- playlist: Array<PlaylistItem>;
144
- };
145
-
146
112
  declare type FlowplayerCustomElementRegistry = Map<string, string>;
147
113
 
148
114
  declare interface FlowplayerUMD extends FlowplayerUMDBase {
@@ -197,11 +163,6 @@ declare interface Loader<PluginOwnConfig extends KeyValue = KeyValue> extends Pl
197
163
  wants<S = KeyValue, T = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: PluginConfig<T>): boolean;
198
164
  }
199
165
 
200
- declare interface Logger {
201
- (...args: any[]): void;
202
- log(...args: any[]): void;
203
- }
204
-
205
166
  declare type MapToConfigs<Arr extends PluginCtor[]> = {
206
167
  [PluginType in keyof Arr]: Arr[PluginType] extends PluginCtor<infer ConfigType> ? ConfigType : never;
207
168
  };
@@ -292,13 +253,6 @@ declare type PlaylistConfig = {
292
253
  theme?: string;
293
254
  };
294
255
 
295
- declare type PlaylistItem = {
296
- poster?: string;
297
- title?: string;
298
- description?: string;
299
- src: string[];
300
- };
301
-
302
256
  /* Excluded from this release type: PlaylistPlayer */
303
257
 
304
258
  declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
package/plugins/fas.d.ts CHANGED
@@ -74,20 +74,13 @@ declare interface Config {
74
74
  seconds_to_dvr?: number;
75
75
  }
76
76
 
77
- declare namespace Configs {
78
- export {
79
- BitOpts,
80
- FlowplayerCustomElementRegistry,
81
- Config,
82
- CustomConfig,
83
- PluginConfig
84
- }
85
- }
86
-
87
- declare type ConfigWith<T> = Configs.Config & T;
88
-
89
77
  declare type CustomConfig<T> = Config & T;
90
78
 
79
+ declare const _default: PluginCtor< {
80
+ fas?: FASAttrs | undefined;
81
+ }>;
82
+ export default _default;
83
+
91
84
  declare type DeviceId = string;
92
85
 
93
86
  declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
@@ -113,31 +106,11 @@ declare type DRMVendorImplementation = {
113
106
  }, cb: (license_data: Uint8Array) => void) => void;
114
107
  };
115
108
 
116
- declare class FAS implements Plugin_2 {
117
- readonly player: Player;
118
- frame_rate: FRAMERATE;
119
- frame_offset: number;
120
- constructor(umd: FlowplayerUMD, player: Player);
121
- init(_config: FASConfig, _root: PlayerRoot, video: PlayerWith<{
122
- hls?: any;
123
- fas?: FAS;
124
- }>): void;
125
- current_frame(): number;
126
- seek_to(timecode_or_frame: number): void;
127
- current_timecode(): string;
128
- jump(frames: number): void;
129
- }
130
- export default FAS;
131
-
132
109
  declare type FASAttrs = {
133
110
  frame_rate?: FRAMERATE;
134
111
  frame_offset?: number;
135
112
  };
136
113
 
137
- declare type FASConfig = ConfigWith<{
138
- fas?: FASAttrs;
139
- }>;
140
-
141
114
  declare type FlowplayerCustomElementRegistry = Map<string, string>;
142
115
 
143
116
  declare interface FlowplayerUMD extends FlowplayerUMDBase {
@@ -250,22 +223,8 @@ declare type PlayerRoot = HTMLElement & {
250
223
  prevWidth?: number;
251
224
  };
252
225
 
253
- declare namespace Players {
254
- export {
255
- VideoTrack,
256
- PlayerState,
257
- FPEvent,
258
- DeviceId,
259
- JSONPlayer,
260
- PlayerRoot,
261
- Player
262
- }
263
- }
264
-
265
226
  declare type PlayerState = string;
266
227
 
267
- declare type PlayerWith<T> = Players.Player & T;
268
-
269
228
  declare interface Plugin_2<PluginOwnConfig extends KeyValue = KeyValue> {
270
229
  /**
271
230
  * a plugin must always implement the init method so a player instance knows how to initialize it