@volcengine/veplayer 1.9.8-rc.0 → 1.9.8-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/index.d.ts +112 -142
- package/index.min.css +1 -1
- package/index.min.js +2 -2
- package/package.json +1 -1
- package/plugin/hls.js +1 -1
- package/plugin/hlsEncrypt.js +2 -2
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import VeStrategy from '@byted/volcengine-vestrategy';
|
|
|
2
2
|
import { StrategyRecommendation } from '@byted/volcengine-vestrategy';
|
|
3
3
|
import { VeStrategyH265Config } from '@byted/volcengine-vestrategy-h265';
|
|
4
4
|
import { PreloaderManager as PreloaderManagerOrigin } from '@byted/volcengine-vestrategy-preload';
|
|
5
|
-
import VodLogger from '@byted/xgplayer-app-logger/es/logger';
|
|
5
|
+
import VodLogger from '@byted/xgplayer-app-logger/es/logger.js';
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import Player from 'xgplayer';
|
|
8
8
|
import { BasePlugin, I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
@@ -1253,75 +1253,6 @@ export declare type IDefinition = {
|
|
|
1253
1253
|
[propName: string]: any;
|
|
1254
1254
|
};
|
|
1255
1255
|
};
|
|
1256
|
-
/**
|
|
1257
|
-
* @brief 音量配置。
|
|
1258
|
-
* @list Options
|
|
1259
|
-
* @kind property
|
|
1260
|
-
*/
|
|
1261
|
-
export declare type IVolume = number | {
|
|
1262
|
-
/**
|
|
1263
|
-
* @brief 插件Dom挂载的位置,默认播放器底部控制栏右侧
|
|
1264
|
-
* @default POSITIONS.CONTROLS_RIGHT
|
|
1265
|
-
*/
|
|
1266
|
-
position?: POSITIONS;
|
|
1267
|
-
/**
|
|
1268
|
-
* @brief 插件在挂载的位置的排序权重
|
|
1269
|
-
* @default 1
|
|
1270
|
-
*/
|
|
1271
|
-
index?: number;
|
|
1272
|
-
/**
|
|
1273
|
-
* @brief 是否禁用插件交互行为,即是否隐藏音量调节按钮
|
|
1274
|
-
* @default false
|
|
1275
|
-
*/
|
|
1276
|
-
disable?: boolean;
|
|
1277
|
-
/**
|
|
1278
|
-
* @brief 是否在音量调节slider上方显示当前音量数值
|
|
1279
|
-
* @default false
|
|
1280
|
-
*/
|
|
1281
|
-
showValueLabel?: boolean;
|
|
1282
|
-
/**
|
|
1283
|
-
* @brief 默认音量大小,取值范围0-1
|
|
1284
|
-
* @default 0.6
|
|
1285
|
-
*/
|
|
1286
|
-
default?: number;
|
|
1287
|
-
/**
|
|
1288
|
-
* @brief 静音恢复的时候最小音量
|
|
1289
|
-
* @default 0.2
|
|
1290
|
-
*/
|
|
1291
|
-
miniVolume?: number;
|
|
1292
|
-
};
|
|
1293
|
-
/**
|
|
1294
|
-
* @brief 进度条标记点配置。
|
|
1295
|
-
* @list Options
|
|
1296
|
-
* @kind property
|
|
1297
|
-
*/
|
|
1298
|
-
export interface IDot {
|
|
1299
|
-
/**
|
|
1300
|
-
* @brief 进度条标记点
|
|
1301
|
-
* @default 1
|
|
1302
|
-
*/
|
|
1303
|
-
id: string | number;
|
|
1304
|
-
/**
|
|
1305
|
-
* @brief 标记点所在的播放时间
|
|
1306
|
-
* @default 0
|
|
1307
|
-
*/
|
|
1308
|
-
time: number;
|
|
1309
|
-
/**
|
|
1310
|
-
* @brief 进度条自定义文案
|
|
1311
|
-
* @default -
|
|
1312
|
-
*/
|
|
1313
|
-
text?: string;
|
|
1314
|
-
/**
|
|
1315
|
-
* @brief 标记点持续的时间,单位秒
|
|
1316
|
-
* @default 1
|
|
1317
|
-
*/
|
|
1318
|
-
duration?: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* @brief 进度条自定义的CSS Style样式
|
|
1321
|
-
* @default -
|
|
1322
|
-
*/
|
|
1323
|
-
style?: CSSStyleDeclaration;
|
|
1324
|
-
}
|
|
1325
1256
|
/**
|
|
1326
1257
|
* @hidden
|
|
1327
1258
|
*/
|
|
@@ -1440,6 +1371,10 @@ export declare type IPlayerOptions = {
|
|
|
1440
1371
|
};
|
|
1441
1372
|
/**
|
|
1442
1373
|
* @brief mobile端交互配置。
|
|
1374
|
+
* @hidden
|
|
1375
|
+
*/
|
|
1376
|
+
/** {en}
|
|
1377
|
+
* @hidden
|
|
1443
1378
|
*/
|
|
1444
1379
|
export interface IMobileConfig {
|
|
1445
1380
|
/**
|
|
@@ -1456,7 +1391,7 @@ export interface IMobileConfig {
|
|
|
1456
1391
|
*/
|
|
1457
1392
|
gestureX?: boolean;
|
|
1458
1393
|
/**
|
|
1459
|
-
* @brief
|
|
1394
|
+
* @brief 是否启用垂直手势处理, 垂直手势包括屏幕右侧和屏幕左侧,默认左侧调节亮度,右侧调节音量,左右范围比例通过scopeL和scopeR设置
|
|
1460
1395
|
* @default false
|
|
1461
1396
|
*/
|
|
1462
1397
|
gestureY?: boolean;
|
|
@@ -1548,6 +1483,10 @@ export interface IMobileConfig {
|
|
|
1548
1483
|
}
|
|
1549
1484
|
/**
|
|
1550
1485
|
* @brief 播放器中间切换暂停/播放的按钮。
|
|
1486
|
+
* @hidden
|
|
1487
|
+
*/
|
|
1488
|
+
/** {en}
|
|
1489
|
+
* @hidden
|
|
1551
1490
|
*/
|
|
1552
1491
|
export interface IStartConfig {
|
|
1553
1492
|
/**
|
|
@@ -2123,9 +2062,7 @@ export declare class MemoryPlay extends Plugin {
|
|
|
2123
2062
|
*/
|
|
2124
2063
|
export declare const enum EDRMTYPE {
|
|
2125
2064
|
DRM_ENCRYPT = "drm_encrypt",
|
|
2126
|
-
PRIVATE_ENCRYPT = "private_encrypt"
|
|
2127
|
-
PRIVATE_ENCRYPT_UPGRADE = "private_encrypt_upgrade",
|
|
2128
|
-
STANDARD_ENCRYPT = "standard_encrypt"
|
|
2065
|
+
PRIVATE_ENCRYPT = "private_encrypt"
|
|
2129
2066
|
}
|
|
2130
2067
|
/** {zh}
|
|
2131
2068
|
* @hidden
|
|
@@ -2873,7 +2810,7 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2873
2810
|
fitVideoSize?: "fixWidth" | "fixHeight" | "fixed";
|
|
2874
2811
|
/** {zh}
|
|
2875
2812
|
* @brief 视频画面填充模式。取值如下:
|
|
2876
|
-
* - `
|
|
2813
|
+
* - `fillwidth`: 填充宽度,高度溢出则裁剪高度。
|
|
2877
2814
|
* - `fillHeight`: 填充高度,宽度溢出则裁剪宽度。
|
|
2878
2815
|
* - `fill`: 拉伸视频以填充容器。
|
|
2879
2816
|
* - `cover`: 保持视频宽高比的同时填充元素的整个内容框。
|
|
@@ -3287,11 +3224,6 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3287
3224
|
* @default -
|
|
3288
3225
|
*/
|
|
3289
3226
|
thumbnail?: IThumbnailConfig;
|
|
3290
|
-
/** {zh}
|
|
3291
|
-
* @brief 进度条标记配置
|
|
3292
|
-
* @default -
|
|
3293
|
-
*/
|
|
3294
|
-
progressDot?: IDot[];
|
|
3295
3227
|
}
|
|
3296
3228
|
/**
|
|
3297
3229
|
* @brief 播放源数据。支持传入视频播放地址 `url`、播放列表 `playList` 或者 `vid` 和 `playAuthToken`,还需包含新地址的过期时间戳 `urlExpireTimestamp`。
|
|
@@ -3340,11 +3272,12 @@ export interface IDefaultConfig {
|
|
|
3340
3272
|
*/
|
|
3341
3273
|
startTime?: number;
|
|
3342
3274
|
/** {zh}
|
|
3343
|
-
* @brief
|
|
3344
|
-
*
|
|
3345
|
-
* @
|
|
3275
|
+
* @brief 音量
|
|
3276
|
+
*
|
|
3277
|
+
* @type {number}
|
|
3278
|
+
* @memberof IDefaultConfig
|
|
3346
3279
|
*/
|
|
3347
|
-
volume?:
|
|
3280
|
+
volume?: number;
|
|
3348
3281
|
/** {zh}
|
|
3349
3282
|
* @brief 弹幕插件配置
|
|
3350
3283
|
*
|
|
@@ -3528,48 +3461,6 @@ export interface definitionItem {
|
|
|
3528
3461
|
*/
|
|
3529
3462
|
definitionTextKey?: string;
|
|
3530
3463
|
}
|
|
3531
|
-
/** {zh}
|
|
3532
|
-
* @brief 插件按钮位置
|
|
3533
|
-
*/
|
|
3534
|
-
export declare const enum POSITIONS {
|
|
3535
|
-
/** {zh}
|
|
3536
|
-
* @brief 播放器根节点
|
|
3537
|
-
*/
|
|
3538
|
-
ROOT = "root",
|
|
3539
|
-
/** {zh}
|
|
3540
|
-
* @brief 播放器根节点左侧
|
|
3541
|
-
*/
|
|
3542
|
-
ROOT_LEFT = "rootLeft",
|
|
3543
|
-
/** {zh}
|
|
3544
|
-
* @brief 播放器根节点右侧
|
|
3545
|
-
*/
|
|
3546
|
-
ROOT_RIGHT = "rootRight",
|
|
3547
|
-
/** {zh}
|
|
3548
|
-
* @brief 播放器根节点顶部
|
|
3549
|
-
*/
|
|
3550
|
-
ROOT_TOP = "rootTop",
|
|
3551
|
-
/** {zh}
|
|
3552
|
-
* @brief 播控栏左侧
|
|
3553
|
-
*/
|
|
3554
|
-
CONTROLS_LEFT = "controlsLeft",
|
|
3555
|
-
/** {zh}
|
|
3556
|
-
* @brief 播控栏左侧
|
|
3557
|
-
*/
|
|
3558
|
-
CONTROLS_RIGTH = "controlsRight",
|
|
3559
|
-
/** {zh}
|
|
3560
|
-
* @brief 播控栏右侧
|
|
3561
|
-
*/
|
|
3562
|
-
CONTROLS_RIGHT = "controlsRight",
|
|
3563
|
-
/** {zh}
|
|
3564
|
-
* @brief 播控栏中间
|
|
3565
|
-
*/
|
|
3566
|
-
CONTROLS_CENTER = "controlsCenter",
|
|
3567
|
-
/** {zh}
|
|
3568
|
-
* @hidden
|
|
3569
|
-
* @brief 播控栏左侧
|
|
3570
|
-
*/
|
|
3571
|
-
CONTROLS = "controls"
|
|
3572
|
-
}
|
|
3573
3464
|
/**
|
|
3574
3465
|
* @brief Plugin类插件基础配置
|
|
3575
3466
|
*/
|
|
@@ -4151,6 +4042,51 @@ declare class VeStrategyWrapper {
|
|
|
4151
4042
|
private initPreloaderConfig;
|
|
4152
4043
|
}
|
|
4153
4044
|
declare const _default: VeStrategyWrapper;
|
|
4045
|
+
/** {zh}
|
|
4046
|
+
* @hidden
|
|
4047
|
+
*/
|
|
4048
|
+
export declare type IRes = IGetPlayInfoRes & {
|
|
4049
|
+
Data: IGetPlayInfoRes & {
|
|
4050
|
+
VideoID?: string;
|
|
4051
|
+
};
|
|
4052
|
+
};
|
|
4053
|
+
/** {zh}
|
|
4054
|
+
* @hidden
|
|
4055
|
+
*/
|
|
4056
|
+
export interface IDefItem extends Stream {
|
|
4057
|
+
vid: string;
|
|
4058
|
+
lineId?: number;
|
|
4059
|
+
lineName?: string;
|
|
4060
|
+
url: string;
|
|
4061
|
+
streamType: string;
|
|
4062
|
+
backupUrl: string;
|
|
4063
|
+
backUrlList: string[];
|
|
4064
|
+
fileType?: "video" | "audio" | "evideo" | "eaudio";
|
|
4065
|
+
format: string;
|
|
4066
|
+
bitrate?: number;
|
|
4067
|
+
size?: number;
|
|
4068
|
+
kid?: string;
|
|
4069
|
+
vwidth?: number;
|
|
4070
|
+
vheight?: number;
|
|
4071
|
+
}
|
|
4072
|
+
/** {zh}
|
|
4073
|
+
* @hidden
|
|
4074
|
+
*/
|
|
4075
|
+
export interface VideoInfoRes {
|
|
4076
|
+
playList: IDefItem[];
|
|
4077
|
+
type?: string;
|
|
4078
|
+
poster: string;
|
|
4079
|
+
vid: string;
|
|
4080
|
+
duration: number;
|
|
4081
|
+
dashOpts: IRes | {
|
|
4082
|
+
Data: IRes;
|
|
4083
|
+
};
|
|
4084
|
+
thumbs: IThumbInfoItem[];
|
|
4085
|
+
barrageMaskUrl: string;
|
|
4086
|
+
enableAdaptive?: boolean;
|
|
4087
|
+
adaptiveBitrateStreamingInfo?: ABRInfo;
|
|
4088
|
+
}
|
|
4089
|
+
declare function isMSESupport(mime?: string): boolean;
|
|
4154
4090
|
/** {zh}
|
|
4155
4091
|
* @hidden
|
|
4156
4092
|
*/
|
|
@@ -4244,7 +4180,9 @@ declare class PlayerData {
|
|
|
4244
4180
|
Data: IGetPlayInfoRes;
|
|
4245
4181
|
};
|
|
4246
4182
|
sdk: VePlayer;
|
|
4247
|
-
constructor(configs: IPlayerConfig
|
|
4183
|
+
constructor(configs: IPlayerConfig & {
|
|
4184
|
+
licensSupportModuleList: string[];
|
|
4185
|
+
}, sdk: VePlayer);
|
|
4248
4186
|
/**
|
|
4249
4187
|
* 初始化播放数据
|
|
4250
4188
|
* @param configs { IPlayerConfig } 播放器配置
|
|
@@ -4444,6 +4382,34 @@ declare class umdLoader {
|
|
|
4444
4382
|
*/
|
|
4445
4383
|
loadPlugins(pluginName: UmdKeys, successCallback?: () => void): Promise<any>;
|
|
4446
4384
|
}
|
|
4385
|
+
export interface IlicenseContent {
|
|
4386
|
+
content: string;
|
|
4387
|
+
sign: string;
|
|
4388
|
+
mainUrl?: string;
|
|
4389
|
+
}
|
|
4390
|
+
declare enum LicenseEdition {
|
|
4391
|
+
EDITION_STANDARD = "standard_edition",
|
|
4392
|
+
EDITION_PREMIUM = "premium_edition",
|
|
4393
|
+
EDITION_NONE = "none_edition"
|
|
4394
|
+
}
|
|
4395
|
+
declare enum LicenseFeature {
|
|
4396
|
+
H265 = "h265",
|
|
4397
|
+
PRELOAD = "preload",
|
|
4398
|
+
ADAPT_RANGE = "adaptRange",
|
|
4399
|
+
ABR = "abr"
|
|
4400
|
+
}
|
|
4401
|
+
declare enum LicenseStatus {
|
|
4402
|
+
LICENSE_STATUS_INVALID = 0,
|
|
4403
|
+
LICENSE_STATUS_OK = 1,
|
|
4404
|
+
LICENSE_STATUS_EXPIRED = 2,
|
|
4405
|
+
LICENSE_STATUS_ERROR_PARAM_PACKAGENAME = 401
|
|
4406
|
+
}
|
|
4407
|
+
export interface ILicenseConfig {
|
|
4408
|
+
license: string | IlicenseContent;
|
|
4409
|
+
autoUpload?: boolean;
|
|
4410
|
+
expireDiffTime?: number;
|
|
4411
|
+
expireCallback?: (expireDiffTime?: number) => void;
|
|
4412
|
+
}
|
|
4447
4413
|
/** {zh}
|
|
4448
4414
|
* @hidden
|
|
4449
4415
|
*/
|
|
@@ -4582,10 +4548,6 @@ declare class VePlayer {
|
|
|
4582
4548
|
* @memberof VePlayer
|
|
4583
4549
|
*/
|
|
4584
4550
|
static sdkVersion: string;
|
|
4585
|
-
/**
|
|
4586
|
-
* @hidden
|
|
4587
|
-
*/
|
|
4588
|
-
private veErrorIns;
|
|
4589
4551
|
/** {zh}
|
|
4590
4552
|
* @brief 播放策略预初始化配置
|
|
4591
4553
|
* @param options 初始化配置,详情见{@link StrategyInitOptions}
|
|
@@ -4627,7 +4589,14 @@ declare class VePlayer {
|
|
|
4627
4589
|
static isRTMSupportCodec: (codec: RTMCodec, options: {
|
|
4628
4590
|
targetProfileLevel?: string;
|
|
4629
4591
|
}) => Promise<boolean>;
|
|
4630
|
-
|
|
4592
|
+
static setLicenseConfig(config: ILicenseConfig): void;
|
|
4593
|
+
static checkLicense(): Promise<LicenseEdition>;
|
|
4594
|
+
static checkModuleList(): Promise<string[]>;
|
|
4595
|
+
static checLicenseStatus(): Promise<LicenseStatus>;
|
|
4596
|
+
static checkLicenseModuleAuth(module: string, featureName: LicenseFeature): Promise<boolean>;
|
|
4597
|
+
private static vodLogCommon;
|
|
4598
|
+
private static hasInitVeStrategy;
|
|
4599
|
+
private _originConfigs;
|
|
4631
4600
|
/**
|
|
4632
4601
|
* @hidden
|
|
4633
4602
|
* 延时触发的events,即保证在player创建之后才触发
|
|
@@ -4752,7 +4721,8 @@ declare class VePlayer {
|
|
|
4752
4721
|
/** {en}
|
|
4753
4722
|
* @hidden
|
|
4754
4723
|
*/
|
|
4755
|
-
createPlayer
|
|
4724
|
+
createPlayer(): Promise<PlayerCore>;
|
|
4725
|
+
private checkLicenseCallback;
|
|
4756
4726
|
/** {zh}
|
|
4757
4727
|
* @hidden
|
|
4758
4728
|
* @brief 设置合并开发者的插件配置,如果开发者从初始化的configs里传了插件配置,则只用开发者的配置,并补齐其他参数
|
|
@@ -4800,7 +4770,7 @@ declare class VePlayer {
|
|
|
4800
4770
|
lineId?: string | number;
|
|
4801
4771
|
definition?: string;
|
|
4802
4772
|
startTime?: number;
|
|
4803
|
-
volume?:
|
|
4773
|
+
volume?: number;
|
|
4804
4774
|
DanmuPlugin?: any;
|
|
4805
4775
|
LiveSubtitlesIconPlugin?: any;
|
|
4806
4776
|
};
|
|
@@ -4830,7 +4800,6 @@ declare class VePlayer {
|
|
|
4830
4800
|
* @memberof VePlayer
|
|
4831
4801
|
*/
|
|
4832
4802
|
afterPlayerCreate(): void;
|
|
4833
|
-
_setVeError(): void;
|
|
4834
4803
|
/**
|
|
4835
4804
|
* @hidden
|
|
4836
4805
|
*
|
|
@@ -4844,11 +4813,6 @@ declare class VePlayer {
|
|
|
4844
4813
|
* @memberof VePlayer
|
|
4845
4814
|
*/
|
|
4846
4815
|
private _setPlayerInfo;
|
|
4847
|
-
/**
|
|
4848
|
-
* @hidden
|
|
4849
|
-
* @private
|
|
4850
|
-
*/
|
|
4851
|
-
private getVtype;
|
|
4852
4816
|
/**
|
|
4853
4817
|
*
|
|
4854
4818
|
*
|
|
@@ -4864,7 +4828,6 @@ declare class VePlayer {
|
|
|
4864
4828
|
* @memberof VePlayer
|
|
4865
4829
|
*/
|
|
4866
4830
|
private _bindPlayerEvents;
|
|
4867
|
-
_proxyError: (veError: any) => void;
|
|
4868
4831
|
private _onError;
|
|
4869
4832
|
/** {zh}
|
|
4870
4833
|
* @private
|
|
@@ -4955,7 +4918,6 @@ declare class VePlayer {
|
|
|
4955
4918
|
*/
|
|
4956
4919
|
set src(url: Url);
|
|
4957
4920
|
/** {zh}
|
|
4958
|
-
* @hidden
|
|
4959
4921
|
* @brief 播放时更换视频 URL,以更换视频源。
|
|
4960
4922
|
* @notes 更换后,会从更换前的时间点继续播放。
|
|
4961
4923
|
* @param url 视频播放地址。
|
|
@@ -6071,6 +6033,10 @@ export declare const Events: {
|
|
|
6071
6033
|
* @brief `<source>` 加载成功。
|
|
6072
6034
|
*/
|
|
6073
6035
|
SOURCE_SUCCESS: string;
|
|
6036
|
+
/** {zh}
|
|
6037
|
+
* @brief license 提醒
|
|
6038
|
+
*/
|
|
6039
|
+
LICENSE_STATUS: string;
|
|
6074
6040
|
/** {zh}
|
|
6075
6041
|
* @brief 在播放被终止时触发。例如当播放中的视频重新开始播放。
|
|
6076
6042
|
*/
|
|
@@ -6390,6 +6356,10 @@ export declare const Event: {
|
|
|
6390
6356
|
* @brief `<source>` 加载成功。
|
|
6391
6357
|
*/
|
|
6392
6358
|
SOURCE_SUCCESS: string;
|
|
6359
|
+
/** {zh}
|
|
6360
|
+
* @brief license 提醒
|
|
6361
|
+
*/
|
|
6362
|
+
LICENSE_STATUS: string;
|
|
6393
6363
|
};
|
|
6394
6364
|
PluginEvents: {
|
|
6395
6365
|
/** {zh}
|