@flowplayer/player 3.23.1-rc → 3.24.0-rc.2
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.
- package/core/events.js +148 -74
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/index.d.ts +8 -37
- package/package.json +1 -1
- package/plugins/ads.d.ts +13 -42
- package/plugins/ads.js +2 -2
- package/plugins/airplay.d.ts +8 -42
- package/plugins/airplay.js +1 -1
- package/plugins/analytics.d.ts +8 -42
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +8 -42
- package/plugins/asel.js +1 -1
- package/plugins/audio.d.ts +8 -42
- package/plugins/audio.js +1 -1
- package/plugins/chapters.d.ts +8 -42
- package/plugins/chapters.js +1 -1
- package/plugins/chromecast.d.ts +8 -42
- package/plugins/chromecast.js +1 -1
- package/plugins/comscore.d.ts +8 -42
- package/plugins/comscore.js +1 -1
- package/plugins/consent.d.ts +8 -42
- package/plugins/consent.js +1 -1
- package/plugins/context-menu.d.ts +8 -42
- package/plugins/context-menu.js +1 -1
- package/plugins/cuepoints.d.ts +8 -42
- package/plugins/cuepoints.js +1 -1
- package/plugins/dash.d.ts +8 -42
- package/plugins/dash.js +1 -1
- package/plugins/drm.d.ts +70 -8
- package/plugins/drm.js +1 -1
- package/plugins/endscreen.d.ts +8 -42
- package/plugins/endscreen.js +1 -1
- package/plugins/fas.d.ts +8 -42
- package/plugins/fas.js +1 -1
- package/plugins/float-on-scroll.d.ts +8 -42
- package/plugins/float-on-scroll.js +1 -1
- package/plugins/ga4.d.ts +8 -42
- package/plugins/ga4.js +1 -1
- package/plugins/gemius.d.ts +8 -42
- package/plugins/gemius.js +1 -1
- package/plugins/google-analytics.d.ts +8 -42
- package/plugins/google-analytics.js +1 -1
- package/plugins/hls.d.ts +8 -42
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +8 -42
- package/plugins/id3.js +1 -1
- package/plugins/iframe.d.ts +8 -42
- package/plugins/iframe.js +1 -1
- package/plugins/keyboard.d.ts +8 -42
- package/plugins/keyboard.js +1 -1
- package/plugins/media-session.d.ts +8 -42
- package/plugins/media-session.js +1 -1
- package/plugins/message.d.ts +8 -42
- package/plugins/message.js +1 -1
- package/plugins/ovp.d.ts +8 -42
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.d.ts +95 -43
- package/plugins/playlist.js +1 -1
- package/plugins/preview.d.ts +8 -42
- package/plugins/preview.js +1 -1
- package/plugins/qsel.d.ts +8 -42
- package/plugins/qsel.js +1 -1
- package/plugins/qul.d.ts +8 -42
- package/plugins/qul.js +1 -1
- package/plugins/rts.d.ts +8 -42
- package/plugins/rts.js +1 -1
- package/plugins/share.d.ts +8 -42
- package/plugins/share.js +1 -1
- package/plugins/speed.d.ts +8 -42
- package/plugins/speed.js +1 -1
- package/plugins/ssai.d.ts +8 -42
- package/plugins/ssai.js +1 -1
- package/plugins/subtitles.d.ts +15 -45
- package/plugins/subtitles.js +1 -1
- package/plugins/thumbnails.d.ts +8 -42
- package/plugins/thumbnails.js +1 -1
- package/plugins/tizen.d.ts +8 -42
- package/plugins/tizen.js +1 -1
- package/plugins/vtsel.d.ts +8 -42
- package/plugins/vtsel.js +1 -1
- package/plugins/webos.d.ts +8 -42
- package/plugins/webos.js +1 -1
- package/util/loader.d.ts +8 -42
- package/util/loader.js +9 -8
package/index.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
/* Excluded from this release type: AnyLoader */
|
|
@@ -280,36 +278,6 @@ declare const DISABLED = "is-disabled";
|
|
|
280
278
|
*/
|
|
281
279
|
export declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
282
280
|
|
|
283
|
-
/**
|
|
284
|
-
* @public
|
|
285
|
-
*/
|
|
286
|
-
export declare type DRMConfiguration = {
|
|
287
|
-
license_server: string;
|
|
288
|
-
http_headers?: Record<string, string>;
|
|
289
|
-
certificate?: string;
|
|
290
|
-
vendor?: string | DRMVendorImplementation;
|
|
291
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
292
|
-
query_params?: Record<string, string>;
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* @public
|
|
297
|
-
*/
|
|
298
|
-
export declare type DRMSourceConfiguration = {
|
|
299
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* @public
|
|
304
|
-
*/
|
|
305
|
-
export declare type DRMVendorImplementation = {
|
|
306
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
307
|
-
fairplay_request_license: (url: string, params: {
|
|
308
|
-
message: any;
|
|
309
|
-
assetId: string;
|
|
310
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
281
|
/**
|
|
314
282
|
* @public
|
|
315
283
|
*/
|
|
@@ -536,13 +504,13 @@ export declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Conf
|
|
|
536
504
|
* @param selector - query selector of the HTML element where player will render
|
|
537
505
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
538
506
|
*/
|
|
539
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
507
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
540
508
|
/**
|
|
541
509
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
542
510
|
* @param element - HTML element where player will render
|
|
543
511
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
544
512
|
*/
|
|
545
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
513
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
546
514
|
}
|
|
547
515
|
|
|
548
516
|
/**
|
|
@@ -1194,6 +1162,11 @@ export declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
|
1194
1162
|
*/
|
|
1195
1163
|
export declare type PlayerWith<T> = T & Player;
|
|
1196
1164
|
|
|
1165
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
1166
|
+
opts: PluginConfig;
|
|
1167
|
+
setOpts: (config: PluginConfig) => void;
|
|
1168
|
+
};
|
|
1169
|
+
|
|
1197
1170
|
declare const PLAYING = "is-playing";
|
|
1198
1171
|
|
|
1199
1172
|
/**
|
|
@@ -1225,6 +1198,7 @@ export { Plugin_2 as Plugin }
|
|
|
1225
1198
|
*/
|
|
1226
1199
|
export declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
1227
1200
|
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
1201
|
+
pluginName: string;
|
|
1228
1202
|
}
|
|
1229
1203
|
|
|
1230
1204
|
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
@@ -1538,7 +1512,6 @@ export declare type SourceObj<T = unknown> = {
|
|
|
1538
1512
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
1539
1513
|
*/
|
|
1540
1514
|
type?: string;
|
|
1541
|
-
drm?: DRMSourceConfiguration;
|
|
1542
1515
|
} & T;
|
|
1543
1516
|
|
|
1544
1517
|
/**
|
|
@@ -1782,6 +1755,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
1782
1755
|
|
|
1783
1756
|
declare const WILL_SEEK = "will-seek";
|
|
1784
1757
|
|
|
1785
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
1786
|
-
|
|
1787
1758
|
export { }
|
package/package.json
CHANGED
package/plugins/ads.d.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import type { BitrateInfo } from 'dashjs';
|
|
4
4
|
import type { Get } from 'type-fest';
|
|
5
5
|
import type { Level } from 'hls.js';
|
|
6
|
-
import type { MediaKeyFunc } from 'hls.js';
|
|
7
|
-
import type { SetFieldType } from 'type-fest';
|
|
8
6
|
import type { TupleToUnion } from 'type-fest';
|
|
9
7
|
|
|
10
8
|
declare const AD_ATTRIBUTION: number;
|
|
@@ -125,6 +123,8 @@ declare interface Adapter {
|
|
|
125
123
|
isUiDisabled(): boolean;
|
|
126
124
|
isAdPod(): boolean;
|
|
127
125
|
canDismissNonLinear(): boolean;
|
|
126
|
+
setAdBreakTime: (time: number) => void;
|
|
127
|
+
getAdBreakTime: () => number;
|
|
128
128
|
init(opts: AdapterOpts): Promise<void>;
|
|
129
129
|
isReady(): boolean;
|
|
130
130
|
setVideoTag(tag: Player): void;
|
|
@@ -847,41 +847,6 @@ declare const DESTROYED = "is-destroyed";
|
|
|
847
847
|
|
|
848
848
|
declare const DISABLED = "is-disabled";
|
|
849
849
|
|
|
850
|
-
/**
|
|
851
|
-
* @public
|
|
852
|
-
*/
|
|
853
|
-
declare type DRM_KEYSYSTEM = "com.widevine.alpha" | "com.microsoft.playready" | "org.w3.clearkey" | "com.apple.fps.1_0";
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* @public
|
|
857
|
-
*/
|
|
858
|
-
declare type DRMConfiguration = {
|
|
859
|
-
license_server: string;
|
|
860
|
-
http_headers?: Record<string, string>;
|
|
861
|
-
certificate?: string;
|
|
862
|
-
vendor?: string | DRMVendorImplementation;
|
|
863
|
-
request_media_key_system_access_function?: MediaKeyFunc;
|
|
864
|
-
query_params?: Record<string, string>;
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* @public
|
|
869
|
-
*/
|
|
870
|
-
declare type DRMSourceConfiguration = {
|
|
871
|
-
[keysystem in DRM_KEYSYSTEM]?: DRMConfiguration;
|
|
872
|
-
};
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* @public
|
|
876
|
-
*/
|
|
877
|
-
declare type DRMVendorImplementation = {
|
|
878
|
-
fairplay_fetch_certificate: (url: string, cb: (certificate_data: Uint8Array) => void) => void;
|
|
879
|
-
fairplay_request_license: (url: string, params: {
|
|
880
|
-
message: any;
|
|
881
|
-
assetId: string;
|
|
882
|
-
}, cb: (license_data: Uint8Array) => void) => void;
|
|
883
|
-
};
|
|
884
|
-
|
|
885
850
|
/**
|
|
886
851
|
* @public
|
|
887
852
|
*/
|
|
@@ -1165,13 +1130,13 @@ declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Co
|
|
|
1165
1130
|
* @param selector - query selector of the HTML element where player will render
|
|
1166
1131
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
1167
1132
|
*/
|
|
1168
|
-
(selector: string, config?: ConfigWithPlugins):
|
|
1133
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
1169
1134
|
/**
|
|
1170
1135
|
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
1171
1136
|
* @param element - HTML element where player will render
|
|
1172
1137
|
* @param config - Configuration of the flowplayer and the attached plugins
|
|
1173
1138
|
*/
|
|
1174
|
-
(element: HTMLElement, config?: ConfigWithPlugins):
|
|
1139
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
1175
1140
|
}
|
|
1176
1141
|
|
|
1177
1142
|
/**
|
|
@@ -2556,6 +2521,7 @@ declare class IMA implements Adapter {
|
|
|
2556
2521
|
private _all_ads_completed;
|
|
2557
2522
|
private google;
|
|
2558
2523
|
private _isInitialized;
|
|
2524
|
+
private _adBreakTime;
|
|
2559
2525
|
private _prepared;
|
|
2560
2526
|
/**
|
|
2561
2527
|
* creates an instance of ImaAdapter
|
|
@@ -2565,6 +2531,8 @@ declare class IMA implements Adapter {
|
|
|
2565
2531
|
initAdapter(): Promise<void>;
|
|
2566
2532
|
isReady(): boolean;
|
|
2567
2533
|
setVideoTag(tag: Player): void;
|
|
2534
|
+
setAdBreakTime(time: number): void;
|
|
2535
|
+
getAdBreakTime(): number;
|
|
2568
2536
|
isCustomPlaybackEnabled(): boolean;
|
|
2569
2537
|
isAttemptingPrerollOnIOS(): boolean;
|
|
2570
2538
|
setAttemptingPrerollOnIOS(preroll_ios: boolean): void;
|
|
@@ -3342,6 +3310,11 @@ declare type PlayerWidth = number;
|
|
|
3342
3310
|
*/
|
|
3343
3311
|
declare type PlayerWith<T> = T & Player;
|
|
3344
3312
|
|
|
3313
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
3314
|
+
opts: PluginConfig;
|
|
3315
|
+
setOpts: (config: PluginConfig) => void;
|
|
3316
|
+
};
|
|
3317
|
+
|
|
3345
3318
|
declare const PLAYING = "is-playing";
|
|
3346
3319
|
|
|
3347
3320
|
/**
|
|
@@ -3372,6 +3345,7 @@ declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer ex
|
|
|
3372
3345
|
*/
|
|
3373
3346
|
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
3374
3347
|
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
3348
|
+
pluginName: string;
|
|
3375
3349
|
}
|
|
3376
3350
|
|
|
3377
3351
|
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
@@ -3765,7 +3739,6 @@ declare type SourceObj<T = unknown> = {
|
|
|
3765
3739
|
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
3766
3740
|
*/
|
|
3767
3741
|
type?: string;
|
|
3768
|
-
drm?: DRMSourceConfiguration;
|
|
3769
3742
|
} & T;
|
|
3770
3743
|
|
|
3771
3744
|
/**
|
|
@@ -4013,6 +3986,4 @@ declare const WILL_PLAY = "will-play";
|
|
|
4013
3986
|
|
|
4014
3987
|
declare const WILL_SEEK = "will-seek";
|
|
4015
3988
|
|
|
4016
|
-
declare type WithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = SetFieldType<SetFieldType<PluginPlayer, "opts", PluginConfig>, "setOpts", (config: PluginConfig) => void>;
|
|
4017
|
-
|
|
4018
3989
|
export { }
|