@volcengine/veplayer 1.7.0 → 1.7.1-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.
- package/index.d.ts +468 -30
- package/index.min.css +1 -1
- package/index.min.js +2 -2
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import VodLogger from '@byted/xgplayer-app-logger/es/logger.js';
|
|
|
2
2
|
import { Property } from 'dom-helpers/esm/types';
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
4
|
import Player from 'xgplayer';
|
|
5
|
-
import { I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
5
|
+
import { Events as XgEvents, I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
6
6
|
|
|
7
7
|
declare enum POSITIONS {
|
|
8
8
|
ROOT = "root",
|
|
@@ -1090,14 +1090,6 @@ export declare type IPlayerOptions = {
|
|
|
1090
1090
|
volumeColor?: string;
|
|
1091
1091
|
};
|
|
1092
1092
|
};
|
|
1093
|
-
declare enum PlatformEnum {
|
|
1094
|
-
VOLC_ENGINE = "volcengine",
|
|
1095
|
-
BYTE_PLUS = "byteplus"
|
|
1096
|
-
}
|
|
1097
|
-
export interface apiMapItem {
|
|
1098
|
-
playDomain: string;
|
|
1099
|
-
backupPlayDomain?: string;
|
|
1100
|
-
}
|
|
1101
1093
|
export interface IAutoplayPluginConfig {
|
|
1102
1094
|
position?: string;
|
|
1103
1095
|
enableDegradeMuteAutoplay?: boolean;
|
|
@@ -1105,14 +1097,43 @@ export interface IAutoplayPluginConfig {
|
|
|
1105
1097
|
userActionDom?: Node;
|
|
1106
1098
|
enableUserActionAutoplay?: boolean;
|
|
1107
1099
|
}
|
|
1100
|
+
export interface IPlayInfoList {
|
|
1101
|
+
BackupPlayUrl: string;
|
|
1102
|
+
BackupUrlExpire: string;
|
|
1103
|
+
BarrageMaskOffset: string;
|
|
1104
|
+
Bitrate: number;
|
|
1105
|
+
CheckInfo: string;
|
|
1106
|
+
Codec: string;
|
|
1107
|
+
Definition: string;
|
|
1108
|
+
Duration: number;
|
|
1109
|
+
FileId: string;
|
|
1110
|
+
FileType: string;
|
|
1111
|
+
Format: string;
|
|
1112
|
+
Height: number;
|
|
1113
|
+
IndexRange: string;
|
|
1114
|
+
InitRange: string;
|
|
1115
|
+
KeyFrameAlignment: string;
|
|
1116
|
+
LogoType: string;
|
|
1117
|
+
MainPlayUrl: string;
|
|
1118
|
+
MainUrlExpire: string;
|
|
1119
|
+
Md5: string;
|
|
1120
|
+
PlayAuth: string;
|
|
1121
|
+
PlayAuthId: string;
|
|
1122
|
+
Quality: string;
|
|
1123
|
+
Size: number;
|
|
1124
|
+
Volume?: number;
|
|
1125
|
+
Width: number;
|
|
1126
|
+
}
|
|
1108
1127
|
declare enum CodecType {
|
|
1109
1128
|
H265 = "h265",
|
|
1110
|
-
H264 = "h264"
|
|
1129
|
+
H264 = "h264",
|
|
1130
|
+
UNKNOWN = "unknown"
|
|
1111
1131
|
}
|
|
1112
1132
|
declare enum RTMCodec {
|
|
1113
1133
|
H264 = "h264"
|
|
1114
1134
|
}
|
|
1115
|
-
export declare type
|
|
1135
|
+
export declare type TRegionType = "cn" | "va" | "sg";
|
|
1136
|
+
export declare type PlayModeType = "order" | "sloop" | "loop" | "random";
|
|
1116
1137
|
export interface IMusicListItem {
|
|
1117
1138
|
/**
|
|
1118
1139
|
* 音乐地址
|
|
@@ -1196,7 +1217,7 @@ export interface IMusicConfig {
|
|
|
1196
1217
|
* @type {('order' | 'sloop' | 'loop' | 'random')}
|
|
1197
1218
|
* @memberof IMusicConfig
|
|
1198
1219
|
*/
|
|
1199
|
-
mode?:
|
|
1220
|
+
mode?: PlayModeType;
|
|
1200
1221
|
/**
|
|
1201
1222
|
* 播放列表
|
|
1202
1223
|
*
|
|
@@ -1213,7 +1234,7 @@ export interface IMusicConfig {
|
|
|
1213
1234
|
* @export
|
|
1214
1235
|
* @interface Stream
|
|
1215
1236
|
*/
|
|
1216
|
-
export interface Stream {
|
|
1237
|
+
export interface Stream extends IPlayInfoList {
|
|
1217
1238
|
/**
|
|
1218
1239
|
* url类型,可以选值为“rtm”/“flv”/“mp4”/“hls”
|
|
1219
1240
|
*
|
|
@@ -1342,12 +1363,21 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
1342
1363
|
*/
|
|
1343
1364
|
streamType?: "mp4" | "hls" | "dash" | "rtm" | "flv";
|
|
1344
1365
|
/**
|
|
1345
|
-
*
|
|
1346
|
-
*
|
|
1347
|
-
*
|
|
1348
|
-
*
|
|
1366
|
+
* 区域,影响服务接口和日志上报
|
|
1367
|
+
* @volcengine/veplayer默认区域为cn, @byteplus/veplayer默认区域为sg
|
|
1368
|
+
* 火山引擎海外区域播放时请填写'sg'
|
|
1369
|
+
*
|
|
1370
|
+
* @type {TRegionType}
|
|
1371
|
+
* @memberof IPlayerConfig
|
|
1349
1372
|
*/
|
|
1350
|
-
|
|
1373
|
+
region?: TRegionType;
|
|
1374
|
+
/**
|
|
1375
|
+
* 插件加载公共路径,用于指定插件的加载路径,或者本地文件服务加载插件
|
|
1376
|
+
*
|
|
1377
|
+
* @type {(string)}
|
|
1378
|
+
* @memberof IPlayerConfig
|
|
1379
|
+
*/
|
|
1380
|
+
pluginPublicPath?: string;
|
|
1351
1381
|
/**
|
|
1352
1382
|
* 是否音乐播放器模式
|
|
1353
1383
|
*
|
|
@@ -1356,7 +1386,7 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
1356
1386
|
*/
|
|
1357
1387
|
isMusic?: boolean;
|
|
1358
1388
|
/**
|
|
1359
|
-
*
|
|
1389
|
+
* 是否开启播放器原生控件菜单(右键触发)
|
|
1360
1390
|
*
|
|
1361
1391
|
* @type {boolean}
|
|
1362
1392
|
* @memberof IPlayerConfig
|
|
@@ -1369,6 +1399,13 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
1369
1399
|
* @memberof IPlayerConfig
|
|
1370
1400
|
*/
|
|
1371
1401
|
closeVideoStopPropagation?: boolean;
|
|
1402
|
+
/**
|
|
1403
|
+
* 右键菜单是否可用,启用后enableContextmenu强制为false
|
|
1404
|
+
*
|
|
1405
|
+
* @type {boolean}
|
|
1406
|
+
* @memberof IPlayerConfig
|
|
1407
|
+
*/
|
|
1408
|
+
enableMenu?: boolean;
|
|
1372
1409
|
/**
|
|
1373
1410
|
* 是否开启hls的MSE模式,仅移动端生效,开启后采用MSE方式播放HLS,默认在移动端使用原生video播放hls
|
|
1374
1411
|
*
|
|
@@ -1925,6 +1962,10 @@ export interface IMemoryPlayConfig {
|
|
|
1925
1962
|
*/
|
|
1926
1963
|
getTime: (id: number | string) => number | Promise<number>;
|
|
1927
1964
|
}
|
|
1965
|
+
export interface ApiMapConfig {
|
|
1966
|
+
playDomain: string;
|
|
1967
|
+
backupPlayDomain?: string;
|
|
1968
|
+
}
|
|
1928
1969
|
declare class PlayerData {
|
|
1929
1970
|
id?: string;
|
|
1930
1971
|
root?: HTMLElement;
|
|
@@ -1949,13 +1990,14 @@ declare class PlayerData {
|
|
|
1949
1990
|
expireDetectType: Array<"xhrStatus" | "urlExpire" | "getUrlTime">;
|
|
1950
1991
|
onMediaExpired: () => Promise<IPlayerConfig>;
|
|
1951
1992
|
onTokenExpired: () => Promise<IPlayAuthTokenConfig>;
|
|
1952
|
-
platform: PlatformEnum;
|
|
1953
|
-
apiMap: apiMapItem;
|
|
1954
1993
|
unionId?: string;
|
|
1955
1994
|
unionInfo?: string;
|
|
1956
1995
|
isMusic?: boolean;
|
|
1957
1996
|
sdkPlugins: any[];
|
|
1958
1997
|
useHlsPluginForSafari: boolean;
|
|
1998
|
+
enableMenu: boolean;
|
|
1999
|
+
region: TRegionType;
|
|
2000
|
+
playDomainDegrade: boolean;
|
|
1959
2001
|
constructor(configs: IPlayerConfig);
|
|
1960
2002
|
initPlayData(configs: any): void;
|
|
1961
2003
|
initPlaylistAndGetCurrent(configs: IPlayerConfig): any;
|
|
@@ -2002,6 +2044,16 @@ declare class PlayerData {
|
|
|
2002
2044
|
* @param {boolean} isDown
|
|
2003
2045
|
*/
|
|
2004
2046
|
getNextDefinition(isDown: boolean, demotePriority: any): Stream[];
|
|
2047
|
+
/**
|
|
2048
|
+
* 获取api map
|
|
2049
|
+
* @return { ApiMapConfig }
|
|
2050
|
+
*/
|
|
2051
|
+
get apiMap(): ApiMapConfig;
|
|
2052
|
+
/**
|
|
2053
|
+
* 获取播放域名
|
|
2054
|
+
*/
|
|
2055
|
+
get playDomain(): string;
|
|
2056
|
+
setVodTeaId(): void;
|
|
2005
2057
|
}
|
|
2006
2058
|
declare function isMSESupport(mime?: string): boolean;
|
|
2007
2059
|
export interface IConfig {
|
|
@@ -2182,7 +2234,7 @@ declare class VePlayer {
|
|
|
2182
2234
|
initCheckExpire(): void;
|
|
2183
2235
|
/**
|
|
2184
2236
|
* @hidden
|
|
2185
|
-
* @description 更新
|
|
2237
|
+
* @description 更新umdLoader 的配置
|
|
2186
2238
|
* @memberof VePlayer
|
|
2187
2239
|
*/
|
|
2188
2240
|
private initUmdLoader;
|
|
@@ -2274,8 +2326,8 @@ declare class VePlayer {
|
|
|
2274
2326
|
/**
|
|
2275
2327
|
* @hidden
|
|
2276
2328
|
*
|
|
2277
|
-
* @param {
|
|
2278
|
-
* @return {
|
|
2329
|
+
* @param {IPlayerConfig} finalOptions
|
|
2330
|
+
* @return {void}
|
|
2279
2331
|
* @memberof VePlayer
|
|
2280
2332
|
*/
|
|
2281
2333
|
setPluginConfig(finalOptions: IPlayerConfig): void;
|
|
@@ -2520,17 +2572,17 @@ declare class VePlayer {
|
|
|
2520
2572
|
/**
|
|
2521
2573
|
* 获取音乐播放模式
|
|
2522
2574
|
* @notes 仅音乐播放模式有效
|
|
2523
|
-
* @return {
|
|
2575
|
+
* @return {PlayModeType}
|
|
2524
2576
|
* @memberof VePlayer
|
|
2525
2577
|
*/
|
|
2526
|
-
get musicMode():
|
|
2578
|
+
get musicMode(): PlayModeType;
|
|
2527
2579
|
/**
|
|
2528
2580
|
* 设置音乐播放模式
|
|
2529
2581
|
* @notes 仅音乐播放模式有效
|
|
2530
2582
|
* @memberof VePlayer
|
|
2531
|
-
* @param {
|
|
2583
|
+
* @param {PlayModeType} val 模式值
|
|
2532
2584
|
*/
|
|
2533
|
-
set musicMode(val:
|
|
2585
|
+
set musicMode(val: PlayModeType);
|
|
2534
2586
|
/**
|
|
2535
2587
|
* 获取音乐播放快进快退时间跨度
|
|
2536
2588
|
* @notes 仅音乐播放模式有效
|
|
@@ -2630,8 +2682,15 @@ declare class VePlayer {
|
|
|
2630
2682
|
/**
|
|
2631
2683
|
* 获取质量日志上报的用户id
|
|
2632
2684
|
* @return {string | undefined}
|
|
2685
|
+
* @memberof VePlayer
|
|
2633
2686
|
*/
|
|
2634
|
-
getLogUserId():
|
|
2687
|
+
getLogUserId(): string;
|
|
2688
|
+
/**
|
|
2689
|
+
* 获取当前配置的region
|
|
2690
|
+
* @return {TRegionType}
|
|
2691
|
+
* @memberof VePlayer
|
|
2692
|
+
*/
|
|
2693
|
+
get region(): TRegionType;
|
|
2635
2694
|
/**
|
|
2636
2695
|
* 销毁当前播放器SDK实例
|
|
2637
2696
|
*
|
|
@@ -2787,6 +2846,26 @@ export declare class LiveSubtitlesIconPlugin extends Plugin {
|
|
|
2787
2846
|
destroy(): void;
|
|
2788
2847
|
render(): string;
|
|
2789
2848
|
}
|
|
2849
|
+
declare class NativeSubTitle extends EventEmitter {
|
|
2850
|
+
_media: any;
|
|
2851
|
+
_list: any[];
|
|
2852
|
+
_languages: string;
|
|
2853
|
+
curIndex: number;
|
|
2854
|
+
constructor(media: any);
|
|
2855
|
+
_init(): void;
|
|
2856
|
+
_onChange: (e: any) => void;
|
|
2857
|
+
/**
|
|
2858
|
+
* @description 切换字幕
|
|
2859
|
+
* @param { null | {
|
|
2860
|
+
* id: any,
|
|
2861
|
+
* language: any
|
|
2862
|
+
* }} data
|
|
2863
|
+
* @return {Promise<{code: number}>}
|
|
2864
|
+
*/
|
|
2865
|
+
switch(data: any): Promise<unknown>;
|
|
2866
|
+
switchOff(): void;
|
|
2867
|
+
destroy(): void;
|
|
2868
|
+
}
|
|
2790
2869
|
export interface IPanelItem {
|
|
2791
2870
|
showText: string;
|
|
2792
2871
|
selected: boolean;
|
|
@@ -2826,6 +2905,9 @@ export declare class Subtitle extends Plugin {
|
|
|
2826
2905
|
subTitles: any;
|
|
2827
2906
|
curIndex: number;
|
|
2828
2907
|
curItem: ISubTitleItem;
|
|
2908
|
+
player: Player & {
|
|
2909
|
+
_subTitles?: NativeSubTitle;
|
|
2910
|
+
};
|
|
2829
2911
|
afterCreate(): void;
|
|
2830
2912
|
/**
|
|
2831
2913
|
* @description 初始化原生字幕
|
|
@@ -2900,7 +2982,10 @@ export declare class Subtitle extends Plugin {
|
|
|
2900
2982
|
* @param { boolean } needRemove 是否移除原来的字幕
|
|
2901
2983
|
*/
|
|
2902
2984
|
updateSubtitles(list?: any[], needRemove?: boolean): void;
|
|
2903
|
-
updateList(data?: {
|
|
2985
|
+
updateList(data?: {
|
|
2986
|
+
list?: any[];
|
|
2987
|
+
isOpen?: boolean;
|
|
2988
|
+
}): void;
|
|
2904
2989
|
changeTipText(): void;
|
|
2905
2990
|
showMobilePanel(): void;
|
|
2906
2991
|
updatePanel(): void;
|
|
@@ -3245,6 +3330,359 @@ export declare class SdkPlugin {
|
|
|
3245
3330
|
*/
|
|
3246
3331
|
__destroy(): void;
|
|
3247
3332
|
}
|
|
3333
|
+
export declare const Events: {
|
|
3334
|
+
/**
|
|
3335
|
+
* 弹幕配置发生变化
|
|
3336
|
+
*/
|
|
3337
|
+
DANMU_CHANGE: string;
|
|
3338
|
+
/**
|
|
3339
|
+
* @hidden
|
|
3340
|
+
*/
|
|
3341
|
+
TIME_SHIFT_CHANGE: string;
|
|
3342
|
+
/**
|
|
3343
|
+
* @hidden
|
|
3344
|
+
*/
|
|
3345
|
+
AI_SUBTITLE_LANG_CHANGE: string;
|
|
3346
|
+
/**
|
|
3347
|
+
* @hidden
|
|
3348
|
+
*/
|
|
3349
|
+
AI_SUBTITLE_MATCH: string;
|
|
3350
|
+
/**
|
|
3351
|
+
* 取消静音
|
|
3352
|
+
*/
|
|
3353
|
+
CANCEL_UNMUTE: string;
|
|
3354
|
+
/**
|
|
3355
|
+
* 处罚刷新
|
|
3356
|
+
*/
|
|
3357
|
+
REFRESH_CLICK: string;
|
|
3358
|
+
/**
|
|
3359
|
+
* 报错时触发降级
|
|
3360
|
+
*/
|
|
3361
|
+
PLAY_BACKUP_CHANGE: string;
|
|
3362
|
+
/**
|
|
3363
|
+
* 报错时触发所有降级结束
|
|
3364
|
+
*/
|
|
3365
|
+
PLAY_BACKUP_CHANGE_FINISH: string;
|
|
3366
|
+
/**
|
|
3367
|
+
* 报错时触发重试
|
|
3368
|
+
*/
|
|
3369
|
+
PLAY_ERROR_BUTTON_CLICK: string;
|
|
3370
|
+
/**
|
|
3371
|
+
* 播放url改变
|
|
3372
|
+
*/
|
|
3373
|
+
PlAY_URL_CHANGE: string;
|
|
3374
|
+
/**
|
|
3375
|
+
* 展示报错
|
|
3376
|
+
*/
|
|
3377
|
+
SHOW_PLAY_ERROR: string;
|
|
3378
|
+
/**
|
|
3379
|
+
* @hidden
|
|
3380
|
+
*/
|
|
3381
|
+
PLAYER_EXTEND_BUTTON: string;
|
|
3382
|
+
/**
|
|
3383
|
+
* 长时间waiting
|
|
3384
|
+
*/
|
|
3385
|
+
LONG_WAITING: string;
|
|
3386
|
+
/**
|
|
3387
|
+
* 频繁waiting
|
|
3388
|
+
*/
|
|
3389
|
+
OFTEN_WAITING: string;
|
|
3390
|
+
/**
|
|
3391
|
+
* 清晰度降级
|
|
3392
|
+
*/
|
|
3393
|
+
DEFINITION_DEMOTE: string;
|
|
3394
|
+
/**
|
|
3395
|
+
*@hidden
|
|
3396
|
+
*/
|
|
3397
|
+
LARKWINDOW_CHANGE: string;
|
|
3398
|
+
/**
|
|
3399
|
+
* @hidden
|
|
3400
|
+
*/
|
|
3401
|
+
PANEL_MODE_CHANGE: string;
|
|
3402
|
+
/**
|
|
3403
|
+
* 清晰度切换
|
|
3404
|
+
*/
|
|
3405
|
+
INNER_DEFINITION_CHANGE: string;
|
|
3406
|
+
/**
|
|
3407
|
+
* 线路切换
|
|
3408
|
+
*/
|
|
3409
|
+
LINE_CHANGE: string;
|
|
3410
|
+
/**
|
|
3411
|
+
* playAuthToken获取url失败
|
|
3412
|
+
*/
|
|
3413
|
+
GET_PLAY_URL_ERR: string;
|
|
3414
|
+
/**
|
|
3415
|
+
* 资源过期
|
|
3416
|
+
*/
|
|
3417
|
+
MEDIA_EXPIRED: string;
|
|
3418
|
+
/**
|
|
3419
|
+
* 开启镜像
|
|
3420
|
+
*/
|
|
3421
|
+
MIRROR_CHANGE: string;
|
|
3422
|
+
/**
|
|
3423
|
+
* 音乐播放器快进快退跨度
|
|
3424
|
+
*/
|
|
3425
|
+
TIME_SCALE_CHANGE: string;
|
|
3426
|
+
/**
|
|
3427
|
+
* 音乐播放器播放模式改变
|
|
3428
|
+
*/
|
|
3429
|
+
MUSIC_MODE_CHANGE: string;
|
|
3430
|
+
/**
|
|
3431
|
+
* 音乐播放器切换音乐
|
|
3432
|
+
*/
|
|
3433
|
+
MUSIC_CHANGE: string;
|
|
3434
|
+
/**
|
|
3435
|
+
* 音乐播放列表发生变化
|
|
3436
|
+
*/
|
|
3437
|
+
MUSIC_LIST_CHANGE: string;
|
|
3438
|
+
/**
|
|
3439
|
+
* 自动播放成功
|
|
3440
|
+
*/
|
|
3441
|
+
AUTOPLAY_SUCCESS: string;
|
|
3442
|
+
/**
|
|
3443
|
+
* 自动播放失败
|
|
3444
|
+
*/
|
|
3445
|
+
AUTOPLAY_FAILED: string;
|
|
3446
|
+
/**
|
|
3447
|
+
* 右键菜单事件,事件data中包含具体信息
|
|
3448
|
+
*/
|
|
3449
|
+
MENU_LOG: string;
|
|
3450
|
+
/**
|
|
3451
|
+
* 点击了右键菜单的反馈按钮
|
|
3452
|
+
*/
|
|
3453
|
+
MENU_REPORT: string;
|
|
3454
|
+
/**
|
|
3455
|
+
* 播放器完成创建
|
|
3456
|
+
*/
|
|
3457
|
+
PLAYER_CREATED_FINISH: string;
|
|
3458
|
+
/**
|
|
3459
|
+
* 播放器重建
|
|
3460
|
+
*/
|
|
3461
|
+
PLAYER_REBUILD: string;
|
|
3462
|
+
/**
|
|
3463
|
+
* 硬解不支持
|
|
3464
|
+
*/
|
|
3465
|
+
NOT_SUPPORT_HARDWARE_DECODER: string;
|
|
3466
|
+
/**
|
|
3467
|
+
* 软解不支持
|
|
3468
|
+
*/
|
|
3469
|
+
NOT_SUPPORT_SOFT_DECODER: string;
|
|
3470
|
+
/**
|
|
3471
|
+
* playAuthToken 过期
|
|
3472
|
+
*/
|
|
3473
|
+
TOKEN_EXPIRED: string;
|
|
3474
|
+
/**
|
|
3475
|
+
* umd 加载失败
|
|
3476
|
+
*/
|
|
3477
|
+
UMD_LOAD_FAIL: string;
|
|
3478
|
+
PLAY: "play";
|
|
3479
|
+
PLAYING: "playing";
|
|
3480
|
+
ENDED: "ended";
|
|
3481
|
+
PAUSE: "pause";
|
|
3482
|
+
ERROR: "error";
|
|
3483
|
+
SEEKING: "seeking";
|
|
3484
|
+
SEEKED: "seeked";
|
|
3485
|
+
TIME_UPDATE: "timeupdate";
|
|
3486
|
+
WAITING: "waiting";
|
|
3487
|
+
CANPLAY: "canplay";
|
|
3488
|
+
CANPLAY_THROUGH: "canplaythrough";
|
|
3489
|
+
DURATION_CHANGE: "durationchange";
|
|
3490
|
+
VOLUME_CHANGE: "volumechange";
|
|
3491
|
+
LOADED_DATA: "loadeddata";
|
|
3492
|
+
LOADED_METADATA: "loadedmetadata";
|
|
3493
|
+
RATE_CHANGE: "ratechange";
|
|
3494
|
+
PROGRESS: "progress";
|
|
3495
|
+
LOAD_START: "loadstart";
|
|
3496
|
+
EMPTIED: "emptied";
|
|
3497
|
+
STALLED: "stalled";
|
|
3498
|
+
SUSPEND: "suspend";
|
|
3499
|
+
ABORT: "abort";
|
|
3500
|
+
BUFFER_CHANGE: "bufferedChange";
|
|
3501
|
+
PLAYER_FOCUS: "focus";
|
|
3502
|
+
PLAYER_BLUR: "blur";
|
|
3503
|
+
READY: "ready";
|
|
3504
|
+
URL_NULL: "urlNull";
|
|
3505
|
+
AUTOPLAY_STARTED: "autoplay_started";
|
|
3506
|
+
AUTOPLAY_PREVENTED: "autoplay_was_prevented";
|
|
3507
|
+
COMPLETE: "complete";
|
|
3508
|
+
REPLAY: "replay";
|
|
3509
|
+
DESTROY: "destroy";
|
|
3510
|
+
URL_CHANGE: "urlchange";
|
|
3511
|
+
DOWNLOAD_SPEED_CHANGE: "download_speed_change";
|
|
3512
|
+
FULLSCREEN_CHANGE: "fullscreen_change";
|
|
3513
|
+
CSS_FULLSCREEN_CHANGE: "cssFullscreen_change";
|
|
3514
|
+
MINI_STATE_CHANGE: "mini_state_change";
|
|
3515
|
+
DEFINITION_CHANGE: "definition_change";
|
|
3516
|
+
BEFORE_DEFINITION_CHANGE: "before_definition_change";
|
|
3517
|
+
AFTER_DEFINITION_CHANGE: "after_definition_change";
|
|
3518
|
+
SEI_PARSED: "SEI_PARSED";
|
|
3519
|
+
RETRY: "retry";
|
|
3520
|
+
VIDEO_RESIZE: "video_resize";
|
|
3521
|
+
PIP_CHANGE: "pip_change";
|
|
3522
|
+
ROTATE: "rotate";
|
|
3523
|
+
SCREEN_SHOT: "screenShot";
|
|
3524
|
+
PLAYNEXT: "playnext";
|
|
3525
|
+
SHORTCUT: "shortcut";
|
|
3526
|
+
XGLOG: "xglog";
|
|
3527
|
+
USER_ACTION: "user_action";
|
|
3528
|
+
RESET: "reset";
|
|
3529
|
+
SOURCE_ERROR: "source_error";
|
|
3530
|
+
SOURCE_SUCCESS: "source_success";
|
|
3531
|
+
SWITCH_SUBTITLE: "switch_subtitle";
|
|
3532
|
+
VIDEO_EVENTS: string[];
|
|
3533
|
+
STATS_EVENTS: typeof XgEvents.STATS_EVENTS;
|
|
3534
|
+
FPS_STUCK: "fps_stuck";
|
|
3535
|
+
};
|
|
3536
|
+
export declare const Event: {
|
|
3537
|
+
SDKEvents: {
|
|
3538
|
+
/**
|
|
3539
|
+
* 播放器完成创建
|
|
3540
|
+
*/
|
|
3541
|
+
PLAYER_CREATED_FINISH: string;
|
|
3542
|
+
/**
|
|
3543
|
+
* 播放器重建
|
|
3544
|
+
*/
|
|
3545
|
+
PLAYER_REBUILD: string;
|
|
3546
|
+
/**
|
|
3547
|
+
* 硬解不支持
|
|
3548
|
+
*/
|
|
3549
|
+
NOT_SUPPORT_HARDWARE_DECODER: string;
|
|
3550
|
+
/**
|
|
3551
|
+
* 软解不支持
|
|
3552
|
+
*/
|
|
3553
|
+
NOT_SUPPORT_SOFT_DECODER: string;
|
|
3554
|
+
/**
|
|
3555
|
+
* playAuthToken 过期
|
|
3556
|
+
*/
|
|
3557
|
+
TOKEN_EXPIRED: string;
|
|
3558
|
+
/**
|
|
3559
|
+
* umd 加载失败
|
|
3560
|
+
*/
|
|
3561
|
+
UMD_LOAD_FAIL: string;
|
|
3562
|
+
};
|
|
3563
|
+
PluginEvents: {
|
|
3564
|
+
/**
|
|
3565
|
+
* 弹幕配置发生变化
|
|
3566
|
+
*/
|
|
3567
|
+
DANMU_CHANGE: string;
|
|
3568
|
+
/**
|
|
3569
|
+
* @hidden
|
|
3570
|
+
*/
|
|
3571
|
+
TIME_SHIFT_CHANGE: string;
|
|
3572
|
+
/**
|
|
3573
|
+
* @hidden
|
|
3574
|
+
*/
|
|
3575
|
+
AI_SUBTITLE_LANG_CHANGE: string;
|
|
3576
|
+
/**
|
|
3577
|
+
* @hidden
|
|
3578
|
+
*/
|
|
3579
|
+
AI_SUBTITLE_MATCH: string;
|
|
3580
|
+
/**
|
|
3581
|
+
* 取消静音
|
|
3582
|
+
*/
|
|
3583
|
+
CANCEL_UNMUTE: string;
|
|
3584
|
+
/**
|
|
3585
|
+
* 处罚刷新
|
|
3586
|
+
*/
|
|
3587
|
+
REFRESH_CLICK: string;
|
|
3588
|
+
/**
|
|
3589
|
+
* 报错时触发降级
|
|
3590
|
+
*/
|
|
3591
|
+
PLAY_BACKUP_CHANGE: string;
|
|
3592
|
+
/**
|
|
3593
|
+
* 报错时触发所有降级结束
|
|
3594
|
+
*/
|
|
3595
|
+
PLAY_BACKUP_CHANGE_FINISH: string;
|
|
3596
|
+
/**
|
|
3597
|
+
* 报错时触发重试
|
|
3598
|
+
*/
|
|
3599
|
+
PLAY_ERROR_BUTTON_CLICK: string;
|
|
3600
|
+
/**
|
|
3601
|
+
* 播放url改变
|
|
3602
|
+
*/
|
|
3603
|
+
PlAY_URL_CHANGE: string;
|
|
3604
|
+
/**
|
|
3605
|
+
* 展示报错
|
|
3606
|
+
*/
|
|
3607
|
+
SHOW_PLAY_ERROR: string;
|
|
3608
|
+
/**
|
|
3609
|
+
* @hidden
|
|
3610
|
+
*/
|
|
3611
|
+
PLAYER_EXTEND_BUTTON: string;
|
|
3612
|
+
/**
|
|
3613
|
+
* 长时间waiting
|
|
3614
|
+
*/
|
|
3615
|
+
LONG_WAITING: string;
|
|
3616
|
+
/**
|
|
3617
|
+
* 频繁waiting
|
|
3618
|
+
*/
|
|
3619
|
+
OFTEN_WAITING: string;
|
|
3620
|
+
/**
|
|
3621
|
+
* 清晰度降级
|
|
3622
|
+
*/
|
|
3623
|
+
DEFINITION_DEMOTE: string;
|
|
3624
|
+
/**
|
|
3625
|
+
*@hidden
|
|
3626
|
+
*/
|
|
3627
|
+
LARKWINDOW_CHANGE: string;
|
|
3628
|
+
/**
|
|
3629
|
+
* @hidden
|
|
3630
|
+
*/
|
|
3631
|
+
PANEL_MODE_CHANGE: string;
|
|
3632
|
+
/**
|
|
3633
|
+
* 清晰度切换
|
|
3634
|
+
*/
|
|
3635
|
+
INNER_DEFINITION_CHANGE: string;
|
|
3636
|
+
/**
|
|
3637
|
+
* 线路切换
|
|
3638
|
+
*/
|
|
3639
|
+
LINE_CHANGE: string;
|
|
3640
|
+
/**
|
|
3641
|
+
* playAuthToken获取url失败
|
|
3642
|
+
*/
|
|
3643
|
+
GET_PLAY_URL_ERR: string;
|
|
3644
|
+
/**
|
|
3645
|
+
* 资源过期
|
|
3646
|
+
*/
|
|
3647
|
+
MEDIA_EXPIRED: string;
|
|
3648
|
+
/**
|
|
3649
|
+
* 开启镜像
|
|
3650
|
+
*/
|
|
3651
|
+
MIRROR_CHANGE: string;
|
|
3652
|
+
/**
|
|
3653
|
+
* 音乐播放器快进快退跨度
|
|
3654
|
+
*/
|
|
3655
|
+
TIME_SCALE_CHANGE: string;
|
|
3656
|
+
/**
|
|
3657
|
+
* 音乐播放器播放模式改变
|
|
3658
|
+
*/
|
|
3659
|
+
MUSIC_MODE_CHANGE: string;
|
|
3660
|
+
/**
|
|
3661
|
+
* 音乐播放器切换音乐
|
|
3662
|
+
*/
|
|
3663
|
+
MUSIC_CHANGE: string;
|
|
3664
|
+
/**
|
|
3665
|
+
* 音乐播放列表发生变化
|
|
3666
|
+
*/
|
|
3667
|
+
MUSIC_LIST_CHANGE: string;
|
|
3668
|
+
/**
|
|
3669
|
+
* 自动播放成功
|
|
3670
|
+
*/
|
|
3671
|
+
AUTOPLAY_SUCCESS: string;
|
|
3672
|
+
/**
|
|
3673
|
+
* 自动播放失败
|
|
3674
|
+
*/
|
|
3675
|
+
AUTOPLAY_FAILED: string;
|
|
3676
|
+
/**
|
|
3677
|
+
* 右键菜单事件,事件data中包含具体信息
|
|
3678
|
+
*/
|
|
3679
|
+
MENU_LOG: string;
|
|
3680
|
+
/**
|
|
3681
|
+
* 点击了右键菜单的反馈按钮
|
|
3682
|
+
*/
|
|
3683
|
+
MENU_REPORT: string;
|
|
3684
|
+
};
|
|
3685
|
+
};
|
|
3248
3686
|
export * from "xgplayer";
|
|
3249
3687
|
|
|
3250
3688
|
export {
|