@volcengine/veplayer 1.14.0-rc.1 → 1.14.0
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/index.d.ts +67 -76
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -6,8 +6,7 @@ import VodLogger from '@byted/xgplayer-app-logger/es/logger';
|
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import Player from 'xgplayer';
|
|
8
8
|
import { BasePlugin, I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
9
|
-
import
|
|
10
|
-
import { AdsPluginConfig } from 'xgplayer-ads/es/plugin';
|
|
9
|
+
import SubTitles from 'xgplayer-subtitles';
|
|
11
10
|
import { IUrl } from 'xgplayer/es/defaultConfig';
|
|
12
11
|
|
|
13
12
|
/**
|
|
@@ -1876,7 +1875,7 @@ export declare class PlayListPlugin extends Plugin {
|
|
|
1876
1875
|
};
|
|
1877
1876
|
registerIcons(): {
|
|
1878
1877
|
[x: string]: {
|
|
1879
|
-
icon:
|
|
1878
|
+
icon: string;
|
|
1880
1879
|
class: string;
|
|
1881
1880
|
};
|
|
1882
1881
|
};
|
|
@@ -2887,24 +2886,20 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2887
2886
|
* @brief 点播服务所在区域,影响服务接口的请求域名
|
|
2888
2887
|
* @default cn
|
|
2889
2888
|
* @notes 火山引擎海外区域播放时请填写'mya'
|
|
2890
|
-
* @hidden
|
|
2891
2889
|
*/
|
|
2892
2890
|
/** {en}
|
|
2893
2891
|
* @brief The area where the on-demand service is located affects the service interface and log reporting.
|
|
2894
2892
|
* @default sg
|
|
2895
|
-
* @hidden
|
|
2896
2893
|
*/
|
|
2897
2894
|
region?: TRegionType;
|
|
2898
2895
|
/** {zh}
|
|
2899
2896
|
* @brief 用户所在区域,影响日志请求的上报服务及动态依赖拉取的域名
|
|
2900
2897
|
* @default cn
|
|
2901
2898
|
* @notes 如果是海外用户,播放时请填写'mya'
|
|
2902
|
-
* @hidden
|
|
2903
2899
|
*/
|
|
2904
2900
|
/** {en}
|
|
2905
2901
|
* @brief The region where the user is located, the domain name that affects the reporting service of the log request and the dynamic dependency pull
|
|
2906
2902
|
* @default sg
|
|
2907
|
-
* @hidden
|
|
2908
2903
|
*/
|
|
2909
2904
|
userRegion?: TRegionType;
|
|
2910
2905
|
/** {zh}
|
|
@@ -3386,6 +3381,36 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3386
3381
|
* @default -
|
|
3387
3382
|
*/
|
|
3388
3383
|
progressDot?: IDot[];
|
|
3384
|
+
/** {zh}
|
|
3385
|
+
* @brief 移动端下倍速、清晰度等选择弹窗的样式
|
|
3386
|
+
* - `0`: 从页面底部弹出
|
|
3387
|
+
* - `1`: 从播放器容器内部右侧弹出
|
|
3388
|
+
* - `2`: 覆盖播放器整个容器的方式弹出
|
|
3389
|
+
* @default `0`
|
|
3390
|
+
*/
|
|
3391
|
+
/** {en}
|
|
3392
|
+
* @brief The style of the pop-up window for selecting speed, definition, etc. on the mobile terminal
|
|
3393
|
+
* - `0`: Pops up from the bottom of the page
|
|
3394
|
+
* - `1`: Pops up from the right side of the player container
|
|
3395
|
+
* - `2`: Pops up in a way that covers the entire player container
|
|
3396
|
+
* @default `0`
|
|
3397
|
+
*/
|
|
3398
|
+
mode?: number;
|
|
3399
|
+
/** {zh}
|
|
3400
|
+
* @brief seek操作结束之后播放器的状态,如果取值为auto,则维持原播放状态, 默认是seek之后直接播放
|
|
3401
|
+
* - `play`: 播放
|
|
3402
|
+
* - `pause`: 暂停
|
|
3403
|
+
* - `auto`: 保持操作前的状态
|
|
3404
|
+
* @default `play`
|
|
3405
|
+
*/
|
|
3406
|
+
/** {en}
|
|
3407
|
+
* @brief The state of the player after the seek operation is completed. If the value is auto, the original playback state is maintained. The default is to play directly after seeking.
|
|
3408
|
+
* - `play`: play
|
|
3409
|
+
* - `pause`: pause
|
|
3410
|
+
* - `auto`: keep the status before operation
|
|
3411
|
+
* @default `play`
|
|
3412
|
+
*/
|
|
3413
|
+
seekedStatus?: "play" | "pause" | "auto";
|
|
3389
3414
|
}
|
|
3390
3415
|
/**
|
|
3391
3416
|
* @brief 播放源数据。支持传入视频播放地址 `url`、播放列表 `playList` 或者 `vid` 和 `playAuthToken`,还需包含新地址的过期时间戳 `urlExpireTimestamp`。
|
|
@@ -3942,6 +3967,7 @@ export interface ApiMapConfig {
|
|
|
3942
3967
|
playDomain: string;
|
|
3943
3968
|
backupPlayDomain?: string;
|
|
3944
3969
|
}
|
|
3970
|
+
export type TLogChannel = "cn" | "va" | "sg";
|
|
3945
3971
|
declare enum PreloadScene {
|
|
3946
3972
|
/**
|
|
3947
3973
|
* 普通场景(手动执行预加载)
|
|
@@ -4092,40 +4118,57 @@ export declare type StrategyConfigOptions = {
|
|
|
4092
4118
|
* @detail Options
|
|
4093
4119
|
*/
|
|
4094
4120
|
export declare type StrategyInitOptions = {
|
|
4095
|
-
/**
|
|
4121
|
+
/** {zh}
|
|
4096
4122
|
* 应用ID
|
|
4097
4123
|
* @brief 应用 ID
|
|
4098
4124
|
*/
|
|
4099
4125
|
/** {en}
|
|
4100
|
-
* @brief
|
|
4126
|
+
* @brief appid
|
|
4101
4127
|
*/
|
|
4102
4128
|
appId: number;
|
|
4103
|
-
/**
|
|
4129
|
+
/** {zh}
|
|
4130
|
+
* @brief 用户所在区域
|
|
4131
|
+
* @default cn
|
|
4132
|
+
* @notes 如果是海外用户,播放时请填写'mya'
|
|
4133
|
+
*/
|
|
4134
|
+
/** {en}
|
|
4135
|
+
* @brief The region where the user is located,
|
|
4136
|
+
* @default sg
|
|
4137
|
+
*/
|
|
4138
|
+
region?: TRegionType;
|
|
4139
|
+
/** {zh}
|
|
4104
4140
|
* 高级能力(策略)配置
|
|
4105
4141
|
* @brief 策略配置
|
|
4106
4142
|
*/
|
|
4107
4143
|
/** {en}
|
|
4108
|
-
* @brief
|
|
4144
|
+
* @brief Advanced Capability (Strategy) Configuration
|
|
4109
4145
|
*/
|
|
4110
4146
|
strategies: StrategyConfigOptions;
|
|
4111
|
-
/**
|
|
4147
|
+
/** {zh}
|
|
4112
4148
|
* 设备ID
|
|
4113
4149
|
* @brief 设备 ID
|
|
4114
4150
|
*/
|
|
4115
4151
|
/** {en}
|
|
4116
|
-
* @brief
|
|
4152
|
+
* @brief device id
|
|
4117
4153
|
*/
|
|
4118
4154
|
deviceId?: string;
|
|
4119
|
-
/**
|
|
4120
|
-
* 手动注入依赖插件,默认自动加载
|
|
4155
|
+
/** {zh}
|
|
4156
|
+
* @brief 手动注入依赖插件,默认自动加载
|
|
4157
|
+
* @default -
|
|
4158
|
+
*/
|
|
4159
|
+
/** {en}
|
|
4160
|
+
* @brief Manually inject dependency plugins, automatically load by default
|
|
4161
|
+
* @default -
|
|
4121
4162
|
*/
|
|
4122
4163
|
plugins?: any[];
|
|
4123
4164
|
/**
|
|
4124
4165
|
* 策略Module,默认自动加载
|
|
4125
4166
|
* @brief 策略 Module,默认自动加载
|
|
4167
|
+
* @default -
|
|
4126
4168
|
*/
|
|
4127
4169
|
/** {en}
|
|
4128
|
-
* @brief
|
|
4170
|
+
* @brief Strategy Module, automatically loaded by default
|
|
4171
|
+
* @default -
|
|
4129
4172
|
*/
|
|
4130
4173
|
Module?: typeof VeStrategy;
|
|
4131
4174
|
};
|
|
@@ -4250,7 +4293,8 @@ export declare type IPreloadStream = {
|
|
|
4250
4293
|
declare class VeStrategyWrapper {
|
|
4251
4294
|
private tea;
|
|
4252
4295
|
private static mapStrategyNameToUmdKey;
|
|
4253
|
-
|
|
4296
|
+
teaId: number;
|
|
4297
|
+
teaChannel: TLogChannel;
|
|
4254
4298
|
preloader: PreloaderManagerOrigin | undefined;
|
|
4255
4299
|
preloaderStatus: PreloaderStatus;
|
|
4256
4300
|
private sdkUmdLoader;
|
|
@@ -5598,11 +5642,11 @@ export declare class LiveSubtitlesIconPlugin extends Plugin {
|
|
|
5598
5642
|
afterPlayerInit(): void;
|
|
5599
5643
|
registerIcons(): {
|
|
5600
5644
|
aiSubOpen: {
|
|
5601
|
-
icon:
|
|
5645
|
+
icon: string;
|
|
5602
5646
|
class: string;
|
|
5603
5647
|
};
|
|
5604
5648
|
aiSubClose: {
|
|
5605
|
-
icon:
|
|
5649
|
+
icon: string;
|
|
5606
5650
|
class: string;
|
|
5607
5651
|
};
|
|
5608
5652
|
};
|
|
@@ -5711,7 +5755,7 @@ export declare class Subtitle extends Plugin {
|
|
|
5711
5755
|
curIndex: number;
|
|
5712
5756
|
curItem: ISubTitleItem;
|
|
5713
5757
|
player: Player & {
|
|
5714
|
-
_subTitles?: NativeSubTitle;
|
|
5758
|
+
_subTitles?: NativeSubTitle | SubTitles;
|
|
5715
5759
|
};
|
|
5716
5760
|
afterCreate(): void;
|
|
5717
5761
|
/**
|
|
@@ -5740,11 +5784,11 @@ export declare class Subtitle extends Plugin {
|
|
|
5740
5784
|
}): number;
|
|
5741
5785
|
registerIcons(): {
|
|
5742
5786
|
vttSubOpen: {
|
|
5743
|
-
icon:
|
|
5787
|
+
icon: string;
|
|
5744
5788
|
class: string;
|
|
5745
5789
|
};
|
|
5746
5790
|
vttSubClose: {
|
|
5747
|
-
icon:
|
|
5791
|
+
icon: string;
|
|
5748
5792
|
class: string;
|
|
5749
5793
|
};
|
|
5750
5794
|
};
|
|
@@ -5803,59 +5847,6 @@ export declare class Subtitle extends Plugin {
|
|
|
5803
5847
|
destroy(): void;
|
|
5804
5848
|
render(): string;
|
|
5805
5849
|
}
|
|
5806
|
-
export declare type AdRuleOffset = "pre" | "post" | `${number}:${number}:${number}`;
|
|
5807
|
-
export declare type AdRuleType = "linear" | "nonlinear";
|
|
5808
|
-
export interface AdRule {
|
|
5809
|
-
offset: AdRuleOffset;
|
|
5810
|
-
tag: string;
|
|
5811
|
-
type: AdRuleType;
|
|
5812
|
-
}
|
|
5813
|
-
export interface AdsConfig {
|
|
5814
|
-
controls?: boolean;
|
|
5815
|
-
enableSCTE35?: boolean;
|
|
5816
|
-
replayForSCTE35?: {
|
|
5817
|
-
enable?: boolean;
|
|
5818
|
-
minDurationOffset?: number;
|
|
5819
|
-
};
|
|
5820
|
-
adType: "ima" | "google-ima" | "ssai";
|
|
5821
|
-
ima: AdsPluginConfig["ima"] & {
|
|
5822
|
-
schedule?: AdRule[];
|
|
5823
|
-
adTagUrlForSCTE35?: string;
|
|
5824
|
-
};
|
|
5825
|
-
}
|
|
5826
|
-
export declare class AdsPlugin extends XGAdsPlugin {
|
|
5827
|
-
config: AdsConfig;
|
|
5828
|
-
csManager: any;
|
|
5829
|
-
player: any;
|
|
5830
|
-
root: any;
|
|
5831
|
-
private _scte35Manager?;
|
|
5832
|
-
private _ssManager?;
|
|
5833
|
-
private _onPlay?;
|
|
5834
|
-
private _onTimeUpdate?;
|
|
5835
|
-
private _onPause?;
|
|
5836
|
-
private _onError?;
|
|
5837
|
-
private _onClick?;
|
|
5838
|
-
static get pluginName(): string;
|
|
5839
|
-
get adManager(): any;
|
|
5840
|
-
afterCreate(): void;
|
|
5841
|
-
afterPlayerInit(): void;
|
|
5842
|
-
beforePlayerInit(): Promise<any>;
|
|
5843
|
-
destroy(): void;
|
|
5844
|
-
private _clearSSAIListener;
|
|
5845
|
-
private _setupSSAIListener;
|
|
5846
|
-
private _dispatchEvent;
|
|
5847
|
-
private _init;
|
|
5848
|
-
/**
|
|
5849
|
-
* Preroll广告播放完,retry重新拉流保证启播延迟
|
|
5850
|
-
*/
|
|
5851
|
-
/**
|
|
5852
|
-
* 如果存在midroll广告,需要将disconnectTime和maxLatency设为最大值,否则currentTime的变化会影响展示时间
|
|
5853
|
-
*/
|
|
5854
|
-
/**
|
|
5855
|
-
* 静音播放Preroll广告时,需要显示autoplayPlugin插件的ummute蒙层
|
|
5856
|
-
*/
|
|
5857
|
-
private _handlePrerollMuted;
|
|
5858
|
-
}
|
|
5859
5850
|
export declare class TimeShiftPlugin extends Plugin {
|
|
5860
5851
|
static get pluginName(): string;
|
|
5861
5852
|
static get defaultConfig(): {
|
|
@@ -5941,7 +5932,7 @@ export declare class MirrorPlugin extends Plugin {
|
|
|
5941
5932
|
afterCreate(): void;
|
|
5942
5933
|
registerIcons(): {
|
|
5943
5934
|
[x: string]: {
|
|
5944
|
-
icon:
|
|
5935
|
+
icon: string;
|
|
5945
5936
|
class: string;
|
|
5946
5937
|
};
|
|
5947
5938
|
};
|