@volcengine/veplayer 1.6.5-rc.0 → 2.0.0-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/README.md +3 -45
- package/esm/index.d.ts +1405 -0
- package/esm/veplayer.biz.live.development.css +41 -0
- package/esm/veplayer.biz.live.development.js +3157 -0
- package/esm/veplayer.biz.live.production.css +1 -0
- package/esm/veplayer.biz.live.production.js +2 -0
- package/esm/veplayer.biz.vod.development.js +13 -0
- package/esm/veplayer.biz.vod.production.js +2 -0
- package/esm/veplayer.d.ts +3071 -0
- package/esm/veplayer.development.css +743 -0
- package/esm/veplayer.development.js +21023 -0
- package/esm/veplayer.live.d.ts +3074 -0
- package/esm/veplayer.live.development.css +743 -0
- package/esm/veplayer.live.development.js +21022 -0
- package/esm/veplayer.live.production.css +1 -0
- package/esm/veplayer.live.production.js +11 -0
- package/esm/veplayer.production.css +1 -0
- package/esm/veplayer.production.js +11 -0
- package/esm/veplayer.vod.d.ts +1405 -0
- package/esm/veplayer.vod.development.css +702 -0
- package/esm/veplayer.vod.development.js +13104 -0
- package/esm/veplayer.vod.production.css +1 -0
- package/esm/veplayer.vod.production.js +11 -0
- package/package.json +78 -6
- package/umd/index.d.ts +1405 -0
- package/umd/veplayer.biz.live.development.css +41 -0
- package/umd/veplayer.biz.live.development.js +3169 -0
- package/umd/veplayer.biz.live.production.css +1 -0
- package/umd/veplayer.biz.live.production.js +1 -0
- package/umd/veplayer.biz.vod.development.js +29 -0
- package/umd/veplayer.biz.vod.production.js +1 -0
- package/umd/veplayer.d.ts +3071 -0
- package/umd/veplayer.development.css +743 -0
- package/umd/veplayer.development.js +21026 -0
- package/umd/veplayer.live.d.ts +3074 -0
- package/umd/veplayer.live.development.css +743 -0
- package/umd/veplayer.live.development.js +21034 -0
- package/umd/veplayer.live.production.css +1 -0
- package/umd/veplayer.live.production.js +1 -0
- package/umd/veplayer.production.css +1 -0
- package/umd/veplayer.production.js +1 -0
- package/umd/veplayer.vod.d.ts +1405 -0
- package/umd/veplayer.vod.development.css +702 -0
- package/umd/veplayer.vod.development.js +13119 -0
- package/umd/veplayer.vod.production.css +1 -0
- package/umd/veplayer.vod.production.js +1 -0
- package/index.d.ts +0 -3256
- package/index.min.css +0 -1
- package/index.min.js +0 -2
package/index.d.ts
DELETED
|
@@ -1,3256 +0,0 @@
|
|
|
1
|
-
import VodLogger from '@byted/xgplayer-app-logger/es/logger.js';
|
|
2
|
-
import { Property } from 'dom-helpers/esm/types';
|
|
3
|
-
import EventEmitter from 'eventemitter3';
|
|
4
|
-
import Player from 'xgplayer';
|
|
5
|
-
import { I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
6
|
-
|
|
7
|
-
declare enum POSITIONS {
|
|
8
|
-
ROOT = "root",
|
|
9
|
-
ROOT_LEFT = "rootLeft",
|
|
10
|
-
ROOT_RIGHT = "rootRight",
|
|
11
|
-
ROOT_TOP = "rootTop",
|
|
12
|
-
CONTROLS_LEFT = "controlsLeft",
|
|
13
|
-
CONTROLS_RIGHT = "controlsRight",
|
|
14
|
-
CONTROLS_CENTER = "controlsCenter"
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @detail Options
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
|
-
* @interface ISdkErrorConfig
|
|
22
|
-
*/
|
|
23
|
-
export interface ISdkErrorConfig {
|
|
24
|
-
/**
|
|
25
|
-
* 报错时是否显示提示图片
|
|
26
|
-
* 默认:true
|
|
27
|
-
*
|
|
28
|
-
* @type {boolean}
|
|
29
|
-
* @memberof ISdkErrorConfig
|
|
30
|
-
*/
|
|
31
|
-
errorImg?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* 报错时是否展示
|
|
34
|
-
* 默认:true
|
|
35
|
-
*
|
|
36
|
-
* @type {boolean}
|
|
37
|
-
* @memberof ISdkErrorConfig
|
|
38
|
-
*/
|
|
39
|
-
errorTips?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* 报错时是否展示“刷新”按钮
|
|
42
|
-
* 默认:true
|
|
43
|
-
*
|
|
44
|
-
* @type {boolean}
|
|
45
|
-
* @memberof ISdkErrorConfig
|
|
46
|
-
*/
|
|
47
|
-
isNeedRefreshButton?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 报错后是否进行降级,true则降级到playlist中相应 backUrlList字段(type为 rtm 不能设置true)
|
|
50
|
-
* 默认:false
|
|
51
|
-
*
|
|
52
|
-
* @type {boolean}
|
|
53
|
-
* @memberof ISdkErrorConfig
|
|
54
|
-
*/
|
|
55
|
-
isNeedDemoteBack?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* 报错后重试次数
|
|
59
|
-
* 默认: 1
|
|
60
|
-
*
|
|
61
|
-
* @type {number}
|
|
62
|
-
* @memberof ISdkErrorConfig
|
|
63
|
-
*/
|
|
64
|
-
retryLoopNum?: number;
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* 报错后提示文案
|
|
68
|
-
* 默认:播放发生错误,点击刷新试试吧
|
|
69
|
-
*
|
|
70
|
-
* @type {(HTMLElement | string)}
|
|
71
|
-
* @memberof ISdkErrorConfig
|
|
72
|
-
*/
|
|
73
|
-
errorTipsText?: HTMLElement | string;
|
|
74
|
-
/**
|
|
75
|
-
* 播放器中所处的位置
|
|
76
|
-
* @hidden
|
|
77
|
-
* @type {string}
|
|
78
|
-
* @memberof ISdkErrorConfig
|
|
79
|
-
*/
|
|
80
|
-
position?: POSITIONS;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* @detail Options
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* @export
|
|
87
|
-
* @interface IRtmConfig
|
|
88
|
-
*/
|
|
89
|
-
export interface IRtmConfig {
|
|
90
|
-
/**
|
|
91
|
-
* sdp接口请求超时等待时间, 单位 ms
|
|
92
|
-
* 默认值: 5000
|
|
93
|
-
*
|
|
94
|
-
* @type {number}
|
|
95
|
-
* @memberof IRtmConfig
|
|
96
|
-
*/
|
|
97
|
-
loadTimeout?: number;
|
|
98
|
-
/**
|
|
99
|
-
* sdp接口请求失败时重试间隔时间, 单位 ms
|
|
100
|
-
* 默认值:1000
|
|
101
|
-
*
|
|
102
|
-
* @type {number}
|
|
103
|
-
* @memberof IRtmConfig
|
|
104
|
-
*/
|
|
105
|
-
retryDelay?: number;
|
|
106
|
-
/**
|
|
107
|
-
* sdp接口请求失败时的重试次数
|
|
108
|
-
* 默认值:0
|
|
109
|
-
*
|
|
110
|
-
* @type {number}
|
|
111
|
-
* @memberof IRtmConfig
|
|
112
|
-
*/
|
|
113
|
-
retryCount?: number;
|
|
114
|
-
/**
|
|
115
|
-
* rtc播放video不会触发waiting,通过timeupdate事件模拟,两次timeupdate事件触发间隔时间大于此值时模拟waiting事件触发 , 单位 ms
|
|
116
|
-
* 默认值:300
|
|
117
|
-
*
|
|
118
|
-
* @type {number}
|
|
119
|
-
* @memberof IRtmConfig
|
|
120
|
-
*/
|
|
121
|
-
stallInterval?: number;
|
|
122
|
-
/**
|
|
123
|
-
* rtc起播建联失败时降级到flv或hls播放, 指定时开启降级,不指定建联失败对外抛error
|
|
124
|
-
* 默认值:''
|
|
125
|
-
*
|
|
126
|
-
* @type {string}
|
|
127
|
-
* @memberof IRtmConfig
|
|
128
|
-
*/
|
|
129
|
-
backupURL?: string;
|
|
130
|
-
/**
|
|
131
|
-
* 降级到flv或者hls时需要的播放插件, 配合 backupURL使用
|
|
132
|
-
* 默认值:null
|
|
133
|
-
*
|
|
134
|
-
* @type {('hls' | 'flv')}
|
|
135
|
-
* @memberof IRtmConfig
|
|
136
|
-
*/
|
|
137
|
-
backupStreamType: "hls" | "flv";
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* @detail Options
|
|
141
|
-
* @brief 弹幕相关设置
|
|
142
|
-
*
|
|
143
|
-
* @export
|
|
144
|
-
* @interface InitConfig
|
|
145
|
-
*/
|
|
146
|
-
export interface InitConfig {
|
|
147
|
-
/**
|
|
148
|
-
* 透明度, 枚举值[0, 33, 66, 99], 实际对应0, 0.33, 0.66, 1
|
|
149
|
-
* 默认:99
|
|
150
|
-
*
|
|
151
|
-
* @type {number}
|
|
152
|
-
* @memberof InitConfig
|
|
153
|
-
*/
|
|
154
|
-
opacity?: number;
|
|
155
|
-
/**
|
|
156
|
-
* 枚举值[0, 33, 66, 99] 实际对应1/4, 1/2, 3/4, 1
|
|
157
|
-
* 默认:99
|
|
158
|
-
*
|
|
159
|
-
* @type {number}
|
|
160
|
-
* @memberof InitConfig
|
|
161
|
-
*/
|
|
162
|
-
area?: number;
|
|
163
|
-
/**
|
|
164
|
-
* 速度, 枚举值[0, 20, 40, 60, 80, 100], 实际对应1/4, 1/2,1,5/4,3/2,2
|
|
165
|
-
* 默认:40
|
|
166
|
-
*
|
|
167
|
-
* @type {number}
|
|
168
|
-
* @memberof InitConfig
|
|
169
|
-
*/
|
|
170
|
-
speed?: number;
|
|
171
|
-
/**
|
|
172
|
-
* 字体大小, 枚举值[0, 50, 100],实际对应14px 16px 20px
|
|
173
|
-
* 默认:50
|
|
174
|
-
*
|
|
175
|
-
* @type {number}
|
|
176
|
-
* @memberof InitConfig
|
|
177
|
-
*/
|
|
178
|
-
fontSize?: number;
|
|
179
|
-
/**
|
|
180
|
-
* 是否打开面板
|
|
181
|
-
* 默认:false
|
|
182
|
-
*
|
|
183
|
-
* @type {boolean}
|
|
184
|
-
* @memberof InitConfig
|
|
185
|
-
*/
|
|
186
|
-
active?: boolean;
|
|
187
|
-
/**
|
|
188
|
-
* 是否展示弹幕设置面板
|
|
189
|
-
* 默认: true
|
|
190
|
-
*
|
|
191
|
-
* @type {boolean}
|
|
192
|
-
* @memberof InitConfig
|
|
193
|
-
*/
|
|
194
|
-
usePanel?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* 弹幕列表
|
|
197
|
-
*
|
|
198
|
-
* @type {DanmuItem[]}
|
|
199
|
-
* @memberof InitConfig
|
|
200
|
-
*/
|
|
201
|
-
danmuItems?: DanmuItem[];
|
|
202
|
-
/**
|
|
203
|
-
* @hidden
|
|
204
|
-
*
|
|
205
|
-
* @type {ExternalItem[]}
|
|
206
|
-
* @memberof InitConfig
|
|
207
|
-
*/
|
|
208
|
-
external?: ExternalItem[];
|
|
209
|
-
/**
|
|
210
|
-
* @hidden
|
|
211
|
-
*
|
|
212
|
-
* @type {IMaskConfig}
|
|
213
|
-
* @memberof InitConfig
|
|
214
|
-
*/
|
|
215
|
-
maskConfig?: IMaskConfig;
|
|
216
|
-
/**
|
|
217
|
-
* @hidden
|
|
218
|
-
*
|
|
219
|
-
* @type {boolean}
|
|
220
|
-
* @memberof InitConfig
|
|
221
|
-
*/
|
|
222
|
-
maskActive?: boolean;
|
|
223
|
-
}
|
|
224
|
-
export interface IMaskConfig {
|
|
225
|
-
maskUrl: string;
|
|
226
|
-
maskOffset?: number;
|
|
227
|
-
interval?: number;
|
|
228
|
-
}
|
|
229
|
-
export interface Lang {
|
|
230
|
-
zh: string;
|
|
231
|
-
en: string;
|
|
232
|
-
[props: string]: string;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* @detail Options
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* @export
|
|
239
|
-
* @interface DanmuItem
|
|
240
|
-
*/
|
|
241
|
-
export interface DanmuItem {
|
|
242
|
-
/**
|
|
243
|
-
* 弹幕唯一id
|
|
244
|
-
*
|
|
245
|
-
* @type {string}
|
|
246
|
-
* @memberof DanmuItem
|
|
247
|
-
*/
|
|
248
|
-
id: string;
|
|
249
|
-
/**
|
|
250
|
-
* 弹幕文案
|
|
251
|
-
*
|
|
252
|
-
* @type {string}
|
|
253
|
-
* @memberof DanmuItem
|
|
254
|
-
*/
|
|
255
|
-
txt: string;
|
|
256
|
-
/**
|
|
257
|
-
* 弹幕出现时间, 单位为ms
|
|
258
|
-
*
|
|
259
|
-
* @type {number}
|
|
260
|
-
* @memberof DanmuItem
|
|
261
|
-
*/
|
|
262
|
-
start?: number;
|
|
263
|
-
/**
|
|
264
|
-
* 是否优先显示
|
|
265
|
-
* @hidden
|
|
266
|
-
* @type {boolean}
|
|
267
|
-
* @memberof DanmuItem
|
|
268
|
-
*/
|
|
269
|
-
prior?: boolean;
|
|
270
|
-
/**
|
|
271
|
-
* 弹幕持续显示时间, 单位为ms
|
|
272
|
-
*
|
|
273
|
-
* @type {number}
|
|
274
|
-
* @memberof DanmuItem
|
|
275
|
-
*/
|
|
276
|
-
duration?: number;
|
|
277
|
-
/**
|
|
278
|
-
* 弹幕样式
|
|
279
|
-
* style : {
|
|
280
|
-
* color: '#ff9500',
|
|
281
|
-
* fontSize: '20px',
|
|
282
|
-
* padding: '2px 11px'
|
|
283
|
-
* }
|
|
284
|
-
*
|
|
285
|
-
* @type {Partial<Record<Property, string>>}
|
|
286
|
-
* @memberof DanmuItem
|
|
287
|
-
*/
|
|
288
|
-
style?: Partial<Record<Property, string>>;
|
|
289
|
-
}
|
|
290
|
-
export interface ExternalItem {
|
|
291
|
-
key: string;
|
|
292
|
-
name: string;
|
|
293
|
-
value: boolean;
|
|
294
|
-
lang?: Lang;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* @detail Options
|
|
298
|
-
*
|
|
299
|
-
* @export
|
|
300
|
-
* @interface ISubtitleConfig
|
|
301
|
-
*/
|
|
302
|
-
export interface ISubtitleConfig {
|
|
303
|
-
/**
|
|
304
|
-
*
|
|
305
|
-
* @hidden
|
|
306
|
-
*/
|
|
307
|
-
[propName: string]: any;
|
|
308
|
-
/**
|
|
309
|
-
* 图标位置
|
|
310
|
-
* 默认值:controlsRight
|
|
311
|
-
* @type {string}
|
|
312
|
-
* @memberof ISubtitleConfig
|
|
313
|
-
*/
|
|
314
|
-
position?: string;
|
|
315
|
-
/**
|
|
316
|
-
* 图标排列权重
|
|
317
|
-
* 默认值:6
|
|
318
|
-
* @type {number}
|
|
319
|
-
* @memberof ISubtitleConfig
|
|
320
|
-
*/
|
|
321
|
-
index?: number;
|
|
322
|
-
/**
|
|
323
|
-
* 字幕列表
|
|
324
|
-
* 默认值:无
|
|
325
|
-
* @type {Array<SubTitleItem>}
|
|
326
|
-
* @memberof ISubtitleConfig
|
|
327
|
-
*/
|
|
328
|
-
list?: Array<ISubTitleItem>;
|
|
329
|
-
/**
|
|
330
|
-
* 是否默认打开
|
|
331
|
-
* 默认值:true
|
|
332
|
-
* @type {boolean}
|
|
333
|
-
* @memberof ISubtitleConfig
|
|
334
|
-
*/
|
|
335
|
-
isDefaultOpen?: boolean;
|
|
336
|
-
/**
|
|
337
|
-
* 是否显示图标
|
|
338
|
-
* 默认值:true
|
|
339
|
-
* @type {boolean}
|
|
340
|
-
* @memberof ISubtitleConfig
|
|
341
|
-
*/
|
|
342
|
-
isShowIcon?: boolean;
|
|
343
|
-
/**
|
|
344
|
-
* 字幕渲染模式,外挂字幕或原生字幕
|
|
345
|
-
* 默认值:external
|
|
346
|
-
* @type {string}
|
|
347
|
-
* @memberof ISubtitleConfig
|
|
348
|
-
*/
|
|
349
|
-
mode?: "external" | "native";
|
|
350
|
-
/**
|
|
351
|
-
* 字幕更新模式,默认vod
|
|
352
|
-
* 默认值:vod
|
|
353
|
-
* @type {string}
|
|
354
|
-
* @memberof ISubtitleConfig
|
|
355
|
-
*/
|
|
356
|
-
updateMode?: "vod" | "live";
|
|
357
|
-
/**
|
|
358
|
-
* 字幕样式
|
|
359
|
-
* 默认值:无
|
|
360
|
-
* @type {ISubtitleStyle}
|
|
361
|
-
* @memberof ISubtitleConfig
|
|
362
|
-
*/
|
|
363
|
-
style?: ISubtitleStyle;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* @detail Options
|
|
367
|
-
*
|
|
368
|
-
* @export
|
|
369
|
-
* @interface ISubtitleStyle
|
|
370
|
-
*/
|
|
371
|
-
export interface ISubtitleStyle {
|
|
372
|
-
/**
|
|
373
|
-
* 是否跟随控制栏调整位置
|
|
374
|
-
* 默认值:true
|
|
375
|
-
* @type {boolean | null}
|
|
376
|
-
* @memberof ISubtitleStyle
|
|
377
|
-
*/
|
|
378
|
-
follow: boolean | null;
|
|
379
|
-
/**
|
|
380
|
-
* 字体显示模式,默认是描边
|
|
381
|
-
* 默认值:'stroke'
|
|
382
|
-
* @type {'stroke' | 'bg'}
|
|
383
|
-
* @memberof ISubtitleStyle
|
|
384
|
-
*/
|
|
385
|
-
mode?: "stroke" | "bg";
|
|
386
|
-
/**
|
|
387
|
-
* 跟随底部控制栏的高度
|
|
388
|
-
* 默认值:50
|
|
389
|
-
* @type {number}
|
|
390
|
-
* @memberof ISubtitleStyle
|
|
391
|
-
*/
|
|
392
|
-
followBottom?: number;
|
|
393
|
-
/**
|
|
394
|
-
* 是否跟随视频自动调整字号
|
|
395
|
-
* 默认值:true
|
|
396
|
-
* @type {boolean}
|
|
397
|
-
* @memberof ISubtitleStyle
|
|
398
|
-
*/
|
|
399
|
-
fitVideo?: boolean;
|
|
400
|
-
/**
|
|
401
|
-
* 字幕距离画面底部百分比
|
|
402
|
-
* 默认值:4
|
|
403
|
-
* @type {number}
|
|
404
|
-
* @memberof ISubtitleStyle
|
|
405
|
-
*/
|
|
406
|
-
offsetBottom?: number;
|
|
407
|
-
/**
|
|
408
|
-
* 横屏视频适配基准字号
|
|
409
|
-
* 默认值:49
|
|
410
|
-
* @type {number}
|
|
411
|
-
* @memberof ISubtitleStyle
|
|
412
|
-
*/
|
|
413
|
-
baseSizeX?: number;
|
|
414
|
-
/**
|
|
415
|
-
* 竖屏视频适配基准字号
|
|
416
|
-
* 默认值:28
|
|
417
|
-
* @type {number}
|
|
418
|
-
* @memberof ISubtitleStyle
|
|
419
|
-
*/
|
|
420
|
-
baseSizeY?: number;
|
|
421
|
-
/**
|
|
422
|
-
* pc端最小字号
|
|
423
|
-
* 默认值:16
|
|
424
|
-
* @type {number}
|
|
425
|
-
* @memberof ISubtitleStyle
|
|
426
|
-
*/
|
|
427
|
-
minSize?: number;
|
|
428
|
-
/**
|
|
429
|
-
* 移动端最小字号
|
|
430
|
-
* 默认值:13
|
|
431
|
-
* @type {number}
|
|
432
|
-
* @memberof ISubtitleStyle
|
|
433
|
-
*/
|
|
434
|
-
minMobileSize?: number;
|
|
435
|
-
/**
|
|
436
|
-
* 最大显示行数
|
|
437
|
-
* 默认值:'double'
|
|
438
|
-
* @type {'double' | 'single' | 'three'}
|
|
439
|
-
* @memberof ISubtitleStyle
|
|
440
|
-
*/
|
|
441
|
-
line?: "double" | "single" | "three";
|
|
442
|
-
/**
|
|
443
|
-
* 字体颜色, 16位颜色值或rgb值
|
|
444
|
-
* 默认值:'#fff'
|
|
445
|
-
* @type {string}
|
|
446
|
-
* @memberof ISubtitleStyle
|
|
447
|
-
*/
|
|
448
|
-
fontColor?: string;
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* @detail Options
|
|
452
|
-
*
|
|
453
|
-
* @export
|
|
454
|
-
* @interface ISubTitleItem
|
|
455
|
-
*/
|
|
456
|
-
export interface ISubTitleItem {
|
|
457
|
-
/**
|
|
458
|
-
* 字幕语言
|
|
459
|
-
* 默认值:无
|
|
460
|
-
* @type {string | number}
|
|
461
|
-
* @memberof ISubTitleItem
|
|
462
|
-
*/
|
|
463
|
-
language?: string | number;
|
|
464
|
-
/**
|
|
465
|
-
* 字幕id
|
|
466
|
-
* 默认值:无
|
|
467
|
-
* @type {string | number}
|
|
468
|
-
* @memberof ISubTitleItem
|
|
469
|
-
*/
|
|
470
|
-
id?: number | string;
|
|
471
|
-
/**
|
|
472
|
-
* 是否是默认选择的字幕
|
|
473
|
-
* 默认值:false
|
|
474
|
-
* @type {boolean}
|
|
475
|
-
* @memberof ISubTitleItem
|
|
476
|
-
*/
|
|
477
|
-
isDefault?: boolean;
|
|
478
|
-
/**
|
|
479
|
-
* 字幕名称
|
|
480
|
-
* 默认值:无
|
|
481
|
-
* @type {any}
|
|
482
|
-
* @memberof ISubTitleItem
|
|
483
|
-
*/
|
|
484
|
-
text?: any;
|
|
485
|
-
/**
|
|
486
|
-
* 外挂字幕地址
|
|
487
|
-
* 默认值:false
|
|
488
|
-
* @type {string}
|
|
489
|
-
* @memberof ISubTitleItem
|
|
490
|
-
*/
|
|
491
|
-
url?: string;
|
|
492
|
-
/**
|
|
493
|
-
* stringContent
|
|
494
|
-
* 默认值:无
|
|
495
|
-
* @hidden
|
|
496
|
-
* @type {string}
|
|
497
|
-
* @memberof ISubTitleItem
|
|
498
|
-
*/
|
|
499
|
-
stringContent?: string;
|
|
500
|
-
/**
|
|
501
|
-
* 字幕内容列表,非url形式时使用
|
|
502
|
-
* 默认值:无
|
|
503
|
-
* @type {Array<Object>}
|
|
504
|
-
* @memberof ISubTitleItem
|
|
505
|
-
*/
|
|
506
|
-
list?: IListItem[];
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* @detail Options
|
|
510
|
-
*
|
|
511
|
-
* @export
|
|
512
|
-
* @interface IListItem
|
|
513
|
-
*/
|
|
514
|
-
export interface IListItem {
|
|
515
|
-
/**
|
|
516
|
-
* 开始时间
|
|
517
|
-
* @type {number}
|
|
518
|
-
*/
|
|
519
|
-
start: number;
|
|
520
|
-
/**
|
|
521
|
-
* 结束时间
|
|
522
|
-
* @type {number}
|
|
523
|
-
*/
|
|
524
|
-
end: number;
|
|
525
|
-
/**
|
|
526
|
-
* 字幕数据列表
|
|
527
|
-
* @type {Array<ITextItem>}
|
|
528
|
-
*/
|
|
529
|
-
list: Array<ITextItem>;
|
|
530
|
-
/**
|
|
531
|
-
* 默认值:无
|
|
532
|
-
* @hidden
|
|
533
|
-
* @type {any}
|
|
534
|
-
*/
|
|
535
|
-
[propName: string]: any;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* @detail Options
|
|
539
|
-
*
|
|
540
|
-
* @export
|
|
541
|
-
* @interface ITextItem
|
|
542
|
-
*/
|
|
543
|
-
export interface ITextItem {
|
|
544
|
-
/**
|
|
545
|
-
* 默认值:无
|
|
546
|
-
* @hidden
|
|
547
|
-
* @type {any}
|
|
548
|
-
*/
|
|
549
|
-
[propName: string]: any;
|
|
550
|
-
/**
|
|
551
|
-
* 开始时间
|
|
552
|
-
* @type {number}
|
|
553
|
-
*/
|
|
554
|
-
start: number;
|
|
555
|
-
/**
|
|
556
|
-
* 结束时间
|
|
557
|
-
* @type {number}
|
|
558
|
-
*/
|
|
559
|
-
end: number;
|
|
560
|
-
/**
|
|
561
|
-
* 字幕文案数组
|
|
562
|
-
* @type {string[]}
|
|
563
|
-
*/
|
|
564
|
-
text: string[];
|
|
565
|
-
/**
|
|
566
|
-
* 字幕顺序
|
|
567
|
-
* @type {number}
|
|
568
|
-
*/
|
|
569
|
-
index?: number;
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* @detail Options
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
* @export
|
|
576
|
-
* @interface IDefinitionDemotePlugin
|
|
577
|
-
*/
|
|
578
|
-
export interface IDefinitionDemotePlugin {
|
|
579
|
-
/**
|
|
580
|
-
* 超时重试次数
|
|
581
|
-
* 默认:3
|
|
582
|
-
*
|
|
583
|
-
* @type {number}
|
|
584
|
-
* @memberof IDefinitionDemotePlugin
|
|
585
|
-
*/
|
|
586
|
-
oftenWaitingCount?: number;
|
|
587
|
-
/**
|
|
588
|
-
* 设置经常超时时间
|
|
589
|
-
* 默认:5000
|
|
590
|
-
*
|
|
591
|
-
* @type {number}
|
|
592
|
-
* @memberof IDefinitionDemotePlugin
|
|
593
|
-
*/
|
|
594
|
-
oftenWaitingTime?: number;
|
|
595
|
-
/**
|
|
596
|
-
* 设置超时时间
|
|
597
|
-
* 默认5000
|
|
598
|
-
*
|
|
599
|
-
* @type {number}
|
|
600
|
-
* @memberof IDefinitionDemotePlugin
|
|
601
|
-
*/
|
|
602
|
-
longWaitingTime?: number;
|
|
603
|
-
/**
|
|
604
|
-
* 是否自动触发降级
|
|
605
|
-
* 默认:false
|
|
606
|
-
*
|
|
607
|
-
* @type {boolean}
|
|
608
|
-
* @memberof IDefinitionDemotePlugin
|
|
609
|
-
*/
|
|
610
|
-
isNeedAutoDemote?: boolean;
|
|
611
|
-
/**
|
|
612
|
-
*
|
|
613
|
-
* 降级顺序,按照数组顺序依次降级,数字元素对应playList中的definition
|
|
614
|
-
* 默认: ['uhd', 'hd', 'sd', 'ld', 'ao']
|
|
615
|
-
*
|
|
616
|
-
* @type {string[]}
|
|
617
|
-
* @memberof IDefinitionDemotePlugin
|
|
618
|
-
*/
|
|
619
|
-
demotePriority?: string[];
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
* @detail Options
|
|
623
|
-
* @brief 更多options
|
|
624
|
-
* @id 2
|
|
625
|
-
*
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* dash播放配置想
|
|
629
|
-
*
|
|
630
|
-
* @detail Options
|
|
631
|
-
* @export
|
|
632
|
-
* @interface IDashPluginConfig
|
|
633
|
-
*/
|
|
634
|
-
export interface IDashPluginConfig {
|
|
635
|
-
/**
|
|
636
|
-
* 视频vid
|
|
637
|
-
* 默认:无
|
|
638
|
-
* 播放加密视频时必选
|
|
639
|
-
*/
|
|
640
|
-
vid?: string;
|
|
641
|
-
/**
|
|
642
|
-
* 播放类型
|
|
643
|
-
* 默认:`TOP`
|
|
644
|
-
* 非必选
|
|
645
|
-
*/
|
|
646
|
-
playInfoType: "TOP";
|
|
647
|
-
/**
|
|
648
|
-
* 清晰度映射文案
|
|
649
|
-
* 默认:无
|
|
650
|
-
* 非必选
|
|
651
|
-
* @example
|
|
652
|
-
* ``` javascript
|
|
653
|
-
* { 360p: "流畅 360p",
|
|
654
|
-
* 480p: "清晰 480p",
|
|
655
|
-
* 720p: "高清 720p",
|
|
656
|
-
* 1080p: "超高清 1080p"
|
|
657
|
-
* }
|
|
658
|
-
* ```
|
|
659
|
-
*/
|
|
660
|
-
definitionText: Record<string, string>;
|
|
661
|
-
/**
|
|
662
|
-
* 默认清晰度
|
|
663
|
-
* 默认:列表第一个
|
|
664
|
-
* 非必选
|
|
665
|
-
* @example
|
|
666
|
-
* ``` javascript
|
|
667
|
-
* { 360p: "流畅 360p",
|
|
668
|
-
* 480p: "清晰 480p",
|
|
669
|
-
* 720p: "高清 720p",
|
|
670
|
-
* 1080p: "超高清 1080p"
|
|
671
|
-
* }
|
|
672
|
-
* ```
|
|
673
|
-
*/
|
|
674
|
-
defaultDefinition?: string;
|
|
675
|
-
/**
|
|
676
|
-
* 获取证书地址
|
|
677
|
-
* 默认:`//i.snssdk.com/video/drm/v1/play_licenses`
|
|
678
|
-
* 播放加密视频时必选
|
|
679
|
-
*/
|
|
680
|
-
getLicenseUrl?: string;
|
|
681
|
-
/**
|
|
682
|
-
* dash播放信息,由`Service.url`服务接口获取
|
|
683
|
-
* 默认:无
|
|
684
|
-
* 必选
|
|
685
|
-
*/
|
|
686
|
-
dashOpts?: {
|
|
687
|
-
Data: any;
|
|
688
|
-
};
|
|
689
|
-
/**
|
|
690
|
-
* 兜底的mp4播放列表,由`Service.url`服务接口获取
|
|
691
|
-
* 默认:无
|
|
692
|
-
* 非必选
|
|
693
|
-
*/
|
|
694
|
-
mp4Opts: {
|
|
695
|
-
mp4List: mp4OptsItem[];
|
|
696
|
-
};
|
|
697
|
-
/**
|
|
698
|
-
* 预加载时间,单位ms
|
|
699
|
-
* 默认:undefined
|
|
700
|
-
* 非必选
|
|
701
|
-
*/
|
|
702
|
-
preloadTime?: number;
|
|
703
|
-
/**
|
|
704
|
-
* @hidden
|
|
705
|
-
* 自适应配置项
|
|
706
|
-
* 默认:undefined
|
|
707
|
-
* 非必选
|
|
708
|
-
*/
|
|
709
|
-
autoBitrateOpts?: any;
|
|
710
|
-
/**
|
|
711
|
-
* @hidden
|
|
712
|
-
* 备用地址降级,默认情况下,当dash播放出问题后,会降级为mp4播放;
|
|
713
|
-
* 设置改参数后,会优先使用备用地址进行dash的降级播放,再次出错时,会降级为mp4播放
|
|
714
|
-
* 默认:false
|
|
715
|
-
* 非必选
|
|
716
|
-
*/
|
|
717
|
-
useBackUrl?: boolean;
|
|
718
|
-
/**
|
|
719
|
-
* @hidden
|
|
720
|
-
* 优化首帧
|
|
721
|
-
* 是针对域名,将range参数放在url后面,避免OPTIONS请求,从而优化首帧
|
|
722
|
-
* 默认:无
|
|
723
|
-
* 非必选
|
|
724
|
-
*/
|
|
725
|
-
url_range_domains?: string[];
|
|
726
|
-
}
|
|
727
|
-
/**
|
|
728
|
-
* dash播放的mp4兜底播放列表配置
|
|
729
|
-
*
|
|
730
|
-
* @detail Options
|
|
731
|
-
* @export
|
|
732
|
-
* @interface mp4OptsItem
|
|
733
|
-
*/
|
|
734
|
-
export interface mp4OptsItem {
|
|
735
|
-
/**
|
|
736
|
-
* 清晰度
|
|
737
|
-
* 默认: 无
|
|
738
|
-
* 必传
|
|
739
|
-
*/
|
|
740
|
-
definition: string;
|
|
741
|
-
/**
|
|
742
|
-
* mp4地址
|
|
743
|
-
* 默认: 无
|
|
744
|
-
* 必传
|
|
745
|
-
*/
|
|
746
|
-
url: string;
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* DASH播放配置
|
|
750
|
-
*
|
|
751
|
-
* @detail Options
|
|
752
|
-
* @export
|
|
753
|
-
* @interface IDashPluginConfig
|
|
754
|
-
*/
|
|
755
|
-
export interface IEncryptHlsPluginConfig {
|
|
756
|
-
/**
|
|
757
|
-
* 播放地址请求域名
|
|
758
|
-
* 默认:无
|
|
759
|
-
* 必选
|
|
760
|
-
*/
|
|
761
|
-
playDomain: string;
|
|
762
|
-
/**
|
|
763
|
-
* 请求类型,固定值 'TOP'
|
|
764
|
-
* 默认: 无
|
|
765
|
-
*/
|
|
766
|
-
getKeyType: string;
|
|
767
|
-
/**
|
|
768
|
-
* 密钥请求域名
|
|
769
|
-
* 默认:无
|
|
770
|
-
* 必选
|
|
771
|
-
*/
|
|
772
|
-
keyDomain: string;
|
|
773
|
-
/**
|
|
774
|
-
* 播放地址获取token,由服务端生成下发,详见{@link https://www.volcengine.com/docs/4/67350#%E4%B8%B4%E6%97%B6%E5%AE%89%E5%85%A8%E5%87%AD%E8%AF%81%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E 播放临时安全凭证(PlayAuthToken)}
|
|
775
|
-
* 默认:无
|
|
776
|
-
* 必选
|
|
777
|
-
*/
|
|
778
|
-
playAuthToken: string;
|
|
779
|
-
/**
|
|
780
|
-
* 密钥获取token,由服务端生成下发,详见{@link https://www.volcengine.com/docs/4/65659#%E7%AD%BE%E5%8F%91-hls-%E6%A0%87%E5%87%86%E5%8A%A0%E5%AF%86-authtoken%EF%BC%88sha1hlsdrmauthtoken%EF%BC%89 签发 Hls 标准加密AuthToken}
|
|
781
|
-
* 默认:无
|
|
782
|
-
* 必选
|
|
783
|
-
*/
|
|
784
|
-
keyToken: string;
|
|
785
|
-
/**
|
|
786
|
-
* hls加密播放地址
|
|
787
|
-
* 默认:无
|
|
788
|
-
*/
|
|
789
|
-
url?: string;
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* 质量日志配置
|
|
793
|
-
*
|
|
794
|
-
* @detail Options
|
|
795
|
-
* @export
|
|
796
|
-
* @interface IVodLogOptsConfig
|
|
797
|
-
*/
|
|
798
|
-
export interface IVodLogOptsConfig {
|
|
799
|
-
/**
|
|
800
|
-
* 表示业务来源,使用业务自己的appid即可
|
|
801
|
-
* 默认:无
|
|
802
|
-
* 必选
|
|
803
|
-
*/
|
|
804
|
-
line_app_id: number;
|
|
805
|
-
/**
|
|
806
|
-
* 用于识别单一用户的id
|
|
807
|
-
* 默认:无
|
|
808
|
-
* 必选
|
|
809
|
-
*/
|
|
810
|
-
line_user_id: string | number;
|
|
811
|
-
/**
|
|
812
|
-
* 视频类型
|
|
813
|
-
* 默认:无
|
|
814
|
-
* 必选
|
|
815
|
-
*/
|
|
816
|
-
vtype?: "MP4" | "HLS" | "DASH" | "FLV";
|
|
817
|
-
/**
|
|
818
|
-
* 自定义标签,对应控制台"业务维类型"维度
|
|
819
|
-
* 默认:`default`
|
|
820
|
-
* 必选
|
|
821
|
-
*/
|
|
822
|
-
tag?: string;
|
|
823
|
-
/**
|
|
824
|
-
* 自定义子标签,对应控制台"自定义标签"维度
|
|
825
|
-
* 默认:`default`
|
|
826
|
-
* 必选
|
|
827
|
-
*/
|
|
828
|
-
subtag?: string;
|
|
829
|
-
/**
|
|
830
|
-
* 视频解码器类型名称
|
|
831
|
-
* 默认:`h264`
|
|
832
|
-
* 必选
|
|
833
|
-
*/
|
|
834
|
-
codec_type?: "h264" | "h265";
|
|
835
|
-
/**
|
|
836
|
-
* 是否加密,0:非drm视频,1:drm视频
|
|
837
|
-
* 默认:`0`
|
|
838
|
-
* 可选
|
|
839
|
-
*/
|
|
840
|
-
drm_type?: 0 | 1;
|
|
841
|
-
/**
|
|
842
|
-
* 播放内核版本号
|
|
843
|
-
* 默认:无
|
|
844
|
-
* 可选
|
|
845
|
-
*/
|
|
846
|
-
playerCoreVersion?: string;
|
|
847
|
-
/**
|
|
848
|
-
* 播放器版本号
|
|
849
|
-
* 默认:无
|
|
850
|
-
* 可选
|
|
851
|
-
*/
|
|
852
|
-
playerVersion?: string;
|
|
853
|
-
/**
|
|
854
|
-
* DASH播放的封装类型
|
|
855
|
-
* 默认:无
|
|
856
|
-
* 可选
|
|
857
|
-
*/
|
|
858
|
-
dynamic_type?: "segment_base" | "segment_template";
|
|
859
|
-
/**
|
|
860
|
-
* 是否使用bash,0:不使用,1:使用
|
|
861
|
-
* 默认:`0`
|
|
862
|
-
* 可选
|
|
863
|
-
*/
|
|
864
|
-
enable_bash?: 0 | 1;
|
|
865
|
-
/**
|
|
866
|
-
* 发送的埋点日志是本地缓存的时候回调
|
|
867
|
-
* 默认:无
|
|
868
|
-
* 可选
|
|
869
|
-
*/
|
|
870
|
-
sendLocalCallback?: (event: any, data: any) => void;
|
|
871
|
-
/**
|
|
872
|
-
* 是否禁用localStorage暂时缓存onPlay逻辑
|
|
873
|
-
* 默认:`false`
|
|
874
|
-
* 可选
|
|
875
|
-
*/
|
|
876
|
-
disableLocalCache?: boolean;
|
|
877
|
-
/**
|
|
878
|
-
* 数据上报渠道,可选值:cn(国内)、va(美东) 、sg(新加坡)
|
|
879
|
-
* 默认:`cn`
|
|
880
|
-
* 可选
|
|
881
|
-
*/
|
|
882
|
-
channel?: "cn" | "va" | "sg";
|
|
883
|
-
/**
|
|
884
|
-
* 是否关闭清晰度切换埋点
|
|
885
|
-
* 默认:`false`
|
|
886
|
-
* 可选
|
|
887
|
-
*/
|
|
888
|
-
closeResolutionLog?: boolean;
|
|
889
|
-
/**
|
|
890
|
-
* 关闭seek相关埋点
|
|
891
|
-
* 默认:`false`
|
|
892
|
-
* 可选
|
|
893
|
-
*/
|
|
894
|
-
closeSeekLog?: boolean;
|
|
895
|
-
/**
|
|
896
|
-
* 队列超过多少条日志的时候发送
|
|
897
|
-
* 默认:`5`
|
|
898
|
-
* 可选
|
|
899
|
-
*/
|
|
900
|
-
maxQueueCount?: number;
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* mp4加密日志配置项
|
|
904
|
-
*
|
|
905
|
-
* @detail Options
|
|
906
|
-
* @export
|
|
907
|
-
* @interface IMp4EncryptPlayerConfig
|
|
908
|
-
*/
|
|
909
|
-
export interface IMp4EncryptPlayerConfig {
|
|
910
|
-
/**
|
|
911
|
-
* 是否加密
|
|
912
|
-
* 默认:`false`
|
|
913
|
-
* 可选
|
|
914
|
-
*/
|
|
915
|
-
isEncrypt?: boolean;
|
|
916
|
-
/**
|
|
917
|
-
* 视频vid
|
|
918
|
-
* 默认:无
|
|
919
|
-
* 可选
|
|
920
|
-
*/
|
|
921
|
-
vid?: string;
|
|
922
|
-
/**
|
|
923
|
-
* 视频密钥 id
|
|
924
|
-
* 默认:无
|
|
925
|
-
* 可选
|
|
926
|
-
*/
|
|
927
|
-
kid?: string;
|
|
928
|
-
/**
|
|
929
|
-
* 获取密钥凭证地址
|
|
930
|
-
* 默认:无
|
|
931
|
-
* 可选
|
|
932
|
-
*/
|
|
933
|
-
getLicenseUrl?: string;
|
|
934
|
-
/**
|
|
935
|
-
* 是否使用EME
|
|
936
|
-
* 默认:`false`
|
|
937
|
-
* 可选
|
|
938
|
-
*/
|
|
939
|
-
useEME?: boolean;
|
|
940
|
-
/**
|
|
941
|
-
* 视频密钥值
|
|
942
|
-
* 默认:无
|
|
943
|
-
* 可选
|
|
944
|
-
*/
|
|
945
|
-
keyValue?: string;
|
|
946
|
-
/**
|
|
947
|
-
* 加密后的视频密钥值
|
|
948
|
-
* 默认:无
|
|
949
|
-
* 可选
|
|
950
|
-
*/
|
|
951
|
-
secretKey?: string;
|
|
952
|
-
/**
|
|
953
|
-
* 是否携带cookie
|
|
954
|
-
*/
|
|
955
|
-
withCredentials?: boolean;
|
|
956
|
-
/**
|
|
957
|
-
* drm内容
|
|
958
|
-
* 默认:无
|
|
959
|
-
* 可选
|
|
960
|
-
*/
|
|
961
|
-
drm?: {
|
|
962
|
-
clearKeys: {
|
|
963
|
-
[propName: string]: string;
|
|
964
|
-
};
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
export declare type IDefinition = {
|
|
968
|
-
[propName: string]: any;
|
|
969
|
-
url: any;
|
|
970
|
-
definition: any;
|
|
971
|
-
bitrate?: number;
|
|
972
|
-
bandwidth?: number;
|
|
973
|
-
text?: string | {
|
|
974
|
-
[propName: string]: any;
|
|
975
|
-
};
|
|
976
|
-
iconText?: string | {
|
|
977
|
-
[propName: string]: any;
|
|
978
|
-
};
|
|
979
|
-
};
|
|
980
|
-
export declare type IPlayerOptions = {
|
|
981
|
-
[propName: string]: any;
|
|
982
|
-
id?: string;
|
|
983
|
-
el?: HTMLElement;
|
|
984
|
-
url?: any;
|
|
985
|
-
domEventType?: "default" | "touch" | "mouse";
|
|
986
|
-
nullUrlStart?: boolean;
|
|
987
|
-
width?: number | string;
|
|
988
|
-
height?: number | string;
|
|
989
|
-
fluid?: boolean;
|
|
990
|
-
fitVideoSize?: "fixWidth" | "fixHeight" | "fixed";
|
|
991
|
-
videoFillMode?: "auto" | "fillHeight" | "fillWidth" | "fill" | "cover";
|
|
992
|
-
volume?: number | {
|
|
993
|
-
[propName: string]: any;
|
|
994
|
-
};
|
|
995
|
-
autoplay?: boolean;
|
|
996
|
-
autoplayMuted?: boolean;
|
|
997
|
-
loop?: boolean;
|
|
998
|
-
isLive?: boolean;
|
|
999
|
-
zoom?: number;
|
|
1000
|
-
videoInit?: boolean;
|
|
1001
|
-
poster?: string | {
|
|
1002
|
-
[propName: string]: any;
|
|
1003
|
-
};
|
|
1004
|
-
isMobileSimulateMode?: "mobile" | "pc";
|
|
1005
|
-
defaultPlaybackRate?: number;
|
|
1006
|
-
execBeforePluginsCall?: () => any;
|
|
1007
|
-
allowSeekAfterEnded?: boolean;
|
|
1008
|
-
enableContextmenu?: boolean;
|
|
1009
|
-
closeVideoClick?: boolean;
|
|
1010
|
-
closeVideoDblclick?: boolean;
|
|
1011
|
-
closePlayerBlur?: boolean;
|
|
1012
|
-
closeDelayBlur?: boolean;
|
|
1013
|
-
leavePlayerTime?: number;
|
|
1014
|
-
closePlayVideoFocus?: boolean;
|
|
1015
|
-
closePauseVideoFocus?: boolean;
|
|
1016
|
-
closeFocusVideoFocus?: boolean;
|
|
1017
|
-
closeControlsBlur?: boolean;
|
|
1018
|
-
topBarAutoHide?: boolean;
|
|
1019
|
-
videoAttributes?: {
|
|
1020
|
-
[propName: string]: any;
|
|
1021
|
-
};
|
|
1022
|
-
startTime?: number;
|
|
1023
|
-
seekedStatus?: "play" | "pause" | "auto";
|
|
1024
|
-
miniprogress?: boolean;
|
|
1025
|
-
disableSwipeHandler?: () => any;
|
|
1026
|
-
enableSwipeHandler?: () => any;
|
|
1027
|
-
ignores?: Array<"cssfullscreen" | "screenshot" | "pip" | "miniscreen" | "keyboard" | "download" | "playbackrate" | "time" | "definition" | "error" | "fullscreen" | "loading" | "mobile" | "pc" | "play" | "poster" | "progress" | "replay" | "start" | "volume" | string>;
|
|
1028
|
-
inactive?: number;
|
|
1029
|
-
lang?: string;
|
|
1030
|
-
controls?: boolean | {
|
|
1031
|
-
[propName: string]: any;
|
|
1032
|
-
};
|
|
1033
|
-
marginControls?: boolean;
|
|
1034
|
-
fullscreenTarget?: HTMLElement;
|
|
1035
|
-
screenShot?: boolean | {
|
|
1036
|
-
[propName: string]: any;
|
|
1037
|
-
};
|
|
1038
|
-
rotate?: boolean | {
|
|
1039
|
-
[propName: string]: any;
|
|
1040
|
-
};
|
|
1041
|
-
pip?: boolean | {
|
|
1042
|
-
[propName: string]: any;
|
|
1043
|
-
};
|
|
1044
|
-
download?: boolean | {
|
|
1045
|
-
[propName: string]: any;
|
|
1046
|
-
};
|
|
1047
|
-
mini?: boolean | {
|
|
1048
|
-
[propName: string]: any;
|
|
1049
|
-
};
|
|
1050
|
-
cssFullscreen?: boolean | {
|
|
1051
|
-
[propName: string]: any;
|
|
1052
|
-
};
|
|
1053
|
-
keyShortcut?: boolean;
|
|
1054
|
-
presets?: any[];
|
|
1055
|
-
plugins?: any[];
|
|
1056
|
-
playbackRate?: number | number[] | {
|
|
1057
|
-
[propName: string]: any;
|
|
1058
|
-
};
|
|
1059
|
-
definition?: {
|
|
1060
|
-
[propName: string]: any;
|
|
1061
|
-
list: Array<IDefinition>;
|
|
1062
|
-
defaultDefinition?: IDefinition["definition"];
|
|
1063
|
-
};
|
|
1064
|
-
playsinline?: boolean;
|
|
1065
|
-
customDuration?: number;
|
|
1066
|
-
timeOffset?: number;
|
|
1067
|
-
icons?: {
|
|
1068
|
-
[propName: string]: string | HTMLElement | (() => HTMLElement | string);
|
|
1069
|
-
};
|
|
1070
|
-
i18n?: Array<any>;
|
|
1071
|
-
tabindex?: number;
|
|
1072
|
-
thumbnail?: {
|
|
1073
|
-
urls: Array<string>;
|
|
1074
|
-
pic_num: number;
|
|
1075
|
-
col: number;
|
|
1076
|
-
row: number;
|
|
1077
|
-
height?: number;
|
|
1078
|
-
width?: number;
|
|
1079
|
-
};
|
|
1080
|
-
videoConfig?: {
|
|
1081
|
-
[propName: string]: any;
|
|
1082
|
-
};
|
|
1083
|
-
commonStyle?: {
|
|
1084
|
-
progressColor?: string;
|
|
1085
|
-
playedColor?: string;
|
|
1086
|
-
cachedColor?: string;
|
|
1087
|
-
sliderBtnStyle?: {
|
|
1088
|
-
[propName: string]: any;
|
|
1089
|
-
};
|
|
1090
|
-
volumeColor?: string;
|
|
1091
|
-
};
|
|
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
|
-
export interface IAutoplayPluginConfig {
|
|
1102
|
-
position?: string;
|
|
1103
|
-
enableDegradeMuteAutoplay?: boolean;
|
|
1104
|
-
enableWxJsBridgeAutoplay?: boolean;
|
|
1105
|
-
userActionDom?: Node;
|
|
1106
|
-
enableUserActionAutoplay?: boolean;
|
|
1107
|
-
}
|
|
1108
|
-
declare enum CodecType {
|
|
1109
|
-
H265 = "h265",
|
|
1110
|
-
H264 = "h264"
|
|
1111
|
-
}
|
|
1112
|
-
declare enum RTMCodec {
|
|
1113
|
-
H264 = "h264"
|
|
1114
|
-
}
|
|
1115
|
-
export declare type PLAY_MODE_TYPE = "order" | "sloop" | "loop" | "random";
|
|
1116
|
-
export interface IMusicListItem {
|
|
1117
|
-
/**
|
|
1118
|
-
* 音乐地址
|
|
1119
|
-
*
|
|
1120
|
-
* @type {string}
|
|
1121
|
-
* @memberof IMusicListItem
|
|
1122
|
-
*/
|
|
1123
|
-
src: string;
|
|
1124
|
-
/**
|
|
1125
|
-
* 音乐唯一vid
|
|
1126
|
-
*
|
|
1127
|
-
* @type {string | number}
|
|
1128
|
-
* @memberof IMusicListItem
|
|
1129
|
-
*/
|
|
1130
|
-
vid: string | number;
|
|
1131
|
-
/**
|
|
1132
|
-
* 音乐封面
|
|
1133
|
-
*
|
|
1134
|
-
* @type {string}
|
|
1135
|
-
* @memberof IMusicListItem
|
|
1136
|
-
*/
|
|
1137
|
-
poster?: string;
|
|
1138
|
-
/**
|
|
1139
|
-
* 音乐标题
|
|
1140
|
-
*
|
|
1141
|
-
* @type {string}
|
|
1142
|
-
* @memberof IMusicListItem
|
|
1143
|
-
*/
|
|
1144
|
-
title?: string;
|
|
1145
|
-
[propName: string]: any;
|
|
1146
|
-
}
|
|
1147
|
-
export interface IABCycle {
|
|
1148
|
-
/**
|
|
1149
|
-
* AB循环段开始时间
|
|
1150
|
-
*
|
|
1151
|
-
* @type {boolean}
|
|
1152
|
-
* @memberof IABCycle
|
|
1153
|
-
*/
|
|
1154
|
-
start: number;
|
|
1155
|
-
/**
|
|
1156
|
-
* AB循环段结束时间
|
|
1157
|
-
*
|
|
1158
|
-
* @type {boolean}
|
|
1159
|
-
* @memberof IABCycle
|
|
1160
|
-
*/
|
|
1161
|
-
end: number;
|
|
1162
|
-
/**
|
|
1163
|
-
* AB段是否循环播放
|
|
1164
|
-
*
|
|
1165
|
-
* @type {boolean}
|
|
1166
|
-
* @memberof IABCycle
|
|
1167
|
-
*/
|
|
1168
|
-
loop?: boolean;
|
|
1169
|
-
[propName: string]: any;
|
|
1170
|
-
}
|
|
1171
|
-
export interface IMusicConfig {
|
|
1172
|
-
/**
|
|
1173
|
-
* 是否启用离线下载播放
|
|
1174
|
-
*
|
|
1175
|
-
* @type {boolean}
|
|
1176
|
-
* @memberof IMusicConfig
|
|
1177
|
-
*/
|
|
1178
|
-
offline?: boolean;
|
|
1179
|
-
/**
|
|
1180
|
-
* AB循环设置
|
|
1181
|
-
*
|
|
1182
|
-
* @type {IABCycle}
|
|
1183
|
-
* @memberof IMusicConfig
|
|
1184
|
-
*/
|
|
1185
|
-
abCycle?: IABCycle | null;
|
|
1186
|
-
/**
|
|
1187
|
-
* 快进快退时间跨度
|
|
1188
|
-
*
|
|
1189
|
-
* @type {number}
|
|
1190
|
-
* @memberof IMusicConfig
|
|
1191
|
-
*/
|
|
1192
|
-
timeScale?: number;
|
|
1193
|
-
/**
|
|
1194
|
-
* 循环模式
|
|
1195
|
-
*
|
|
1196
|
-
* @type {('order' | 'sloop' | 'loop' | 'random')}
|
|
1197
|
-
* @memberof IMusicConfig
|
|
1198
|
-
*/
|
|
1199
|
-
mode?: PLAY_MODE_TYPE;
|
|
1200
|
-
/**
|
|
1201
|
-
* 播放列表
|
|
1202
|
-
*
|
|
1203
|
-
* @type {Array<IMusicListItem>}
|
|
1204
|
-
* @memberof IMusicConfig
|
|
1205
|
-
*/
|
|
1206
|
-
list?: Array<IMusicListItem>;
|
|
1207
|
-
[propName: string]: any;
|
|
1208
|
-
}
|
|
1209
|
-
/**
|
|
1210
|
-
* @detail Options
|
|
1211
|
-
* @brief 播放地址列表, 可配置多线路和多清晰度
|
|
1212
|
-
*
|
|
1213
|
-
* @export
|
|
1214
|
-
* @interface Stream
|
|
1215
|
-
*/
|
|
1216
|
-
export interface Stream {
|
|
1217
|
-
/**
|
|
1218
|
-
* url类型,可以选值为“rtm”/“flv”/“mp4”/“hls”
|
|
1219
|
-
*
|
|
1220
|
-
* @type {('rtm' | 'flv' | 'mp4' | 'hls')}
|
|
1221
|
-
* @memberof IPlayerConfig
|
|
1222
|
-
*/
|
|
1223
|
-
streamType?: string;
|
|
1224
|
-
/**
|
|
1225
|
-
* 播放地址
|
|
1226
|
-
*
|
|
1227
|
-
* @type {string}
|
|
1228
|
-
* @memberof IPlayerConfig
|
|
1229
|
-
*/
|
|
1230
|
-
url: string;
|
|
1231
|
-
/**
|
|
1232
|
-
* 清晰度key
|
|
1233
|
-
*
|
|
1234
|
-
* @type {string}
|
|
1235
|
-
* @memberof Stream
|
|
1236
|
-
*/
|
|
1237
|
-
definition?: string;
|
|
1238
|
-
/**
|
|
1239
|
-
* 多语言词典中对应的key, 比如 definitionTextKey: HD_TEXT_KEY
|
|
1240
|
-
*
|
|
1241
|
-
* languages: {
|
|
1242
|
-
* zh: {
|
|
1243
|
-
* HD_TEXT_KEY: '高清'
|
|
1244
|
-
* }
|
|
1245
|
-
* }
|
|
1246
|
-
*
|
|
1247
|
-
* 则清晰度切换选项显示“高清”, 不设置则显示definition的值
|
|
1248
|
-
*
|
|
1249
|
-
* @type {string}
|
|
1250
|
-
* @memberof Stream
|
|
1251
|
-
*/
|
|
1252
|
-
definitionTextKey?: string;
|
|
1253
|
-
/**
|
|
1254
|
-
* 编码格式
|
|
1255
|
-
*
|
|
1256
|
-
* @type {('h265' | 'h264')}
|
|
1257
|
-
* @memberof Stream
|
|
1258
|
-
*/
|
|
1259
|
-
codec?: CodecType;
|
|
1260
|
-
/**
|
|
1261
|
-
* 线路唯一id
|
|
1262
|
-
*
|
|
1263
|
-
* @type {(number | string)}
|
|
1264
|
-
* @memberof Stream
|
|
1265
|
-
*/
|
|
1266
|
-
lineId?: number | string;
|
|
1267
|
-
/**
|
|
1268
|
-
* 多语言词典中对应的key, 比如 lineTextKey: LINE_ONE
|
|
1269
|
-
*
|
|
1270
|
-
* languages: {
|
|
1271
|
-
* zh: {
|
|
1272
|
-
* LINE_ONE: '线路一'
|
|
1273
|
-
* }
|
|
1274
|
-
* }
|
|
1275
|
-
*
|
|
1276
|
-
* 则线路切换选项中显示“线路一”
|
|
1277
|
-
*
|
|
1278
|
-
* @type {string}
|
|
1279
|
-
* @memberof Stream
|
|
1280
|
-
*/
|
|
1281
|
-
lineTextKey?: string;
|
|
1282
|
-
[propName: string]: any;
|
|
1283
|
-
}
|
|
1284
|
-
export interface Condition {
|
|
1285
|
-
definition?: string;
|
|
1286
|
-
lineId?: number | string;
|
|
1287
|
-
[propName: string]: any;
|
|
1288
|
-
}
|
|
1289
|
-
/**
|
|
1290
|
-
* @description 播放器当前状态
|
|
1291
|
-
*/
|
|
1292
|
-
export interface Current {
|
|
1293
|
-
definition: string;
|
|
1294
|
-
streamType: string;
|
|
1295
|
-
language: string;
|
|
1296
|
-
lineId?: number | string;
|
|
1297
|
-
codec?: CodecType;
|
|
1298
|
-
[propName: string]: any;
|
|
1299
|
-
}
|
|
1300
|
-
/**
|
|
1301
|
-
* @detail Options
|
|
1302
|
-
* @id 1
|
|
1303
|
-
* @brief options参数列表:
|
|
1304
|
-
* 本文档是介绍火山引擎直播和点播播放器VePlayer的相关参数和Api。
|
|
1305
|
-
*/
|
|
1306
|
-
export interface IPlayerConfig extends IPlayerOptions {
|
|
1307
|
-
/**
|
|
1308
|
-
* 是否是直播,默认为false
|
|
1309
|
-
* @type {boolean}
|
|
1310
|
-
* @memberof IPlayerConfig
|
|
1311
|
-
*/
|
|
1312
|
-
isLive?: boolean;
|
|
1313
|
-
/**
|
|
1314
|
-
* 播放器容器id,VePlayer将被插入在该容器中
|
|
1315
|
-
*
|
|
1316
|
-
* @notes id和root必填一个
|
|
1317
|
-
* @type {string}
|
|
1318
|
-
* @memberof IPlayerConfig
|
|
1319
|
-
*/
|
|
1320
|
-
id?: string;
|
|
1321
|
-
/**
|
|
1322
|
-
* 播放器容器,VePlayer将被插入在该容器中
|
|
1323
|
-
*
|
|
1324
|
-
* @type {HTMLElement}
|
|
1325
|
-
* @memberof IPlayerConfig
|
|
1326
|
-
*/
|
|
1327
|
-
root?: HTMLElement;
|
|
1328
|
-
/**
|
|
1329
|
-
* 播放地址
|
|
1330
|
-
* 直播可通过 {@link https://console.volcengine.com/live/main/locationGenerate 视频直播控制台} 生成
|
|
1331
|
-
*
|
|
1332
|
-
* @type {string}
|
|
1333
|
-
* @memberof IPlayerConfig
|
|
1334
|
-
*/
|
|
1335
|
-
url?: string;
|
|
1336
|
-
/**
|
|
1337
|
-
* 播放地址类型,可以选值为“rtm”/“flv”/“mp4”/“hls”
|
|
1338
|
-
* @notes 播放地址带后缀的则streamType非必填,否则为必填
|
|
1339
|
-
*
|
|
1340
|
-
* @type {(''mp4' | 'hls' | 'dash' | 'rtm' | 'flv')}
|
|
1341
|
-
* @memberof IPlayerConfig
|
|
1342
|
-
*/
|
|
1343
|
-
streamType?: "mp4" | "hls" | "dash" | "rtm" | "flv";
|
|
1344
|
-
/**
|
|
1345
|
-
* 点播服务平台,可选值为'volcengine' 和 'byteplus',默认为'volcengine'即火山引擎视频点播
|
|
1346
|
-
* 设定此参数会指定默认的服务接口
|
|
1347
|
-
* @type {('volcengine' | 'byteplus')}
|
|
1348
|
-
* @memberof playerConfig
|
|
1349
|
-
*/
|
|
1350
|
-
platform?: PlatformEnum;
|
|
1351
|
-
/**
|
|
1352
|
-
* 是否音乐播放器模式
|
|
1353
|
-
*
|
|
1354
|
-
* @type {boolean}
|
|
1355
|
-
* @memberof IPlayerConfig
|
|
1356
|
-
*/
|
|
1357
|
-
isMusic?: boolean;
|
|
1358
|
-
/**
|
|
1359
|
-
* 右键是否可用
|
|
1360
|
-
*
|
|
1361
|
-
* @type {boolean}
|
|
1362
|
-
* @memberof IPlayerConfig
|
|
1363
|
-
*/
|
|
1364
|
-
enableContextmenu?: boolean;
|
|
1365
|
-
/**
|
|
1366
|
-
* 关闭video上的阻止事件传播
|
|
1367
|
-
*
|
|
1368
|
-
* @type {boolean}
|
|
1369
|
-
* @memberof IPlayerConfig
|
|
1370
|
-
*/
|
|
1371
|
-
closeVideoStopPropagation?: boolean;
|
|
1372
|
-
/**
|
|
1373
|
-
* 是否开启hls的MSE模式,仅移动端生效,开启后采用MSE方式播放HLS,默认在移动端使用原生video播放hls
|
|
1374
|
-
*
|
|
1375
|
-
* @type {boolean}
|
|
1376
|
-
* @memberof IPlayerConfig
|
|
1377
|
-
*/
|
|
1378
|
-
enableHlsMSE?: boolean;
|
|
1379
|
-
/**
|
|
1380
|
-
* 在PC Safari上是否不使用hls插件播放,默认true。true: 启用;false: 不启用
|
|
1381
|
-
*
|
|
1382
|
-
* @type {boolean}
|
|
1383
|
-
* @memberof IPlayerConfig
|
|
1384
|
-
*/
|
|
1385
|
-
useHlsPluginForSafari?: boolean;
|
|
1386
|
-
/**
|
|
1387
|
-
* 是否开启mp4的MSE模式,开启后采用MSE方式播放MP4,
|
|
1388
|
-
* 同时带来精确的seek加载、视频的无缝切换、流量节省等功能
|
|
1389
|
-
*
|
|
1390
|
-
* @type {boolean}
|
|
1391
|
-
* @memberof IPlayerConfig
|
|
1392
|
-
*/
|
|
1393
|
-
enableMp4MSE?: boolean;
|
|
1394
|
-
/**
|
|
1395
|
-
* 播放列表
|
|
1396
|
-
* @notes url和playList必填一个,二者都传入时, url必须在playList中。
|
|
1397
|
-
*
|
|
1398
|
-
* @type {Stream[]}
|
|
1399
|
-
* @memberof IPlayerConfig
|
|
1400
|
-
*/
|
|
1401
|
-
playList?: Stream[];
|
|
1402
|
-
/**
|
|
1403
|
-
* 插件,可自行选择高级插件。
|
|
1404
|
-
* 目前支持的高级插件为: DefinitionDemotePlugin
|
|
1405
|
-
*
|
|
1406
|
-
* @type {any[]}
|
|
1407
|
-
* @memberof IPlayerConfig
|
|
1408
|
-
*/
|
|
1409
|
-
plugins?: any[];
|
|
1410
|
-
/**
|
|
1411
|
-
* 默认配置
|
|
1412
|
-
* @hidden
|
|
1413
|
-
*
|
|
1414
|
-
* @type {IDefaultConfig}
|
|
1415
|
-
* @memberof IPlayerConfig
|
|
1416
|
-
*/
|
|
1417
|
-
defaultConfig?: IDefaultConfig;
|
|
1418
|
-
/**
|
|
1419
|
-
* 设置多语言词典,可设置每个语言的多语言词典,
|
|
1420
|
-
* 例如:
|
|
1421
|
-
* {
|
|
1422
|
-
* zh: {
|
|
1423
|
-
* PIP: '画中画'
|
|
1424
|
-
* },
|
|
1425
|
-
* en: {
|
|
1426
|
-
* PIP: 'pip'
|
|
1427
|
-
* }
|
|
1428
|
-
* }
|
|
1429
|
-
*
|
|
1430
|
-
* @type {{ [key: string]: Record<string, any> }}
|
|
1431
|
-
* @memberof IPlayerConfig
|
|
1432
|
-
*/
|
|
1433
|
-
languages?: {
|
|
1434
|
-
[key: string]: Record<string, any>;
|
|
1435
|
-
};
|
|
1436
|
-
/**
|
|
1437
|
-
* @hidden
|
|
1438
|
-
*
|
|
1439
|
-
* @type {boolean}
|
|
1440
|
-
* @memberof IPlayerConfig
|
|
1441
|
-
*/
|
|
1442
|
-
isMobile?: boolean;
|
|
1443
|
-
/**
|
|
1444
|
-
* umd依赖备用地址
|
|
1445
|
-
* 用于依赖的CDN发生网络错误时的降级备用地址
|
|
1446
|
-
* 支持的依赖有hls(非加密hls播放)、flv(flv播放)、XGVideo(软解播放)、hlsEncrypt(加密hls播放)、dash(dash播放)、mp4Encrypt(加密np4播放)、danmujs(弹幕)、danmuMask(蒙版弹幕)、subtitle(外挂字幕)
|
|
1447
|
-
*/
|
|
1448
|
-
umdUrlMap?: Record<string, string>;
|
|
1449
|
-
/**
|
|
1450
|
-
* 是否启用软解
|
|
1451
|
-
* 默认: false
|
|
1452
|
-
*
|
|
1453
|
-
* @type {boolean}
|
|
1454
|
-
* @memberof IPlayerConfig
|
|
1455
|
-
*/
|
|
1456
|
-
useSoftDecoding?: boolean;
|
|
1457
|
-
/**
|
|
1458
|
-
* 视频编码方式
|
|
1459
|
-
* 软解useSoftDecoding设置为true时,提供codec可提升软解初始效率
|
|
1460
|
-
*
|
|
1461
|
-
* @type {('h264' | 'h265')}
|
|
1462
|
-
* @memberof IPlayerConfig
|
|
1463
|
-
*/
|
|
1464
|
-
codec?: CodecType;
|
|
1465
|
-
/**
|
|
1466
|
-
* 是否开H265播放降级,即H.265硬解不支持时自动降级为软解
|
|
1467
|
-
*
|
|
1468
|
-
* @type {boolean}
|
|
1469
|
-
* @memberof IPlayerConfig
|
|
1470
|
-
*/
|
|
1471
|
-
enableH265Degrade?: boolean;
|
|
1472
|
-
/**
|
|
1473
|
-
* 资源过期时的回调函数,用来更新视频资源
|
|
1474
|
-
*
|
|
1475
|
-
* @type {(any) => Promise<IPlayerConfig>}
|
|
1476
|
-
* @memberof IPlayerConfig
|
|
1477
|
-
*/
|
|
1478
|
-
onMediaExpired?: () => Promise<IPlayerConfig>;
|
|
1479
|
-
/**
|
|
1480
|
-
* playAuthToken过期时的回调函数,用来更新playAuthToken
|
|
1481
|
-
*
|
|
1482
|
-
* @type {(any) => Promise<IPlayAuthTokenConfig>}
|
|
1483
|
-
* @memberof IPlayerConfig
|
|
1484
|
-
*/
|
|
1485
|
-
onTokenExpired?: () => Promise<IPlayAuthTokenConfig>;
|
|
1486
|
-
/**
|
|
1487
|
-
* 定期检查资源过期的周期,单位秒,默认400
|
|
1488
|
-
*
|
|
1489
|
-
* @type {boolean}
|
|
1490
|
-
* @memberof IPlayerConfig
|
|
1491
|
-
*/
|
|
1492
|
-
checkExpireInterval?: number;
|
|
1493
|
-
/**
|
|
1494
|
-
* 定期检查资源过期的方式,支持三种类型
|
|
1495
|
-
* urlExpire 根据url的过期时间判断
|
|
1496
|
-
* xhrStatus 发送资源请求,根据资源xhr状态判断
|
|
1497
|
-
* getUrlTime 根据估算的地址获取时间判断
|
|
1498
|
-
* @type {boolean}
|
|
1499
|
-
* @memberof IPlayerConfig
|
|
1500
|
-
*/
|
|
1501
|
-
expireDetectType?: Array<"xhrStatus" | "getUrlTime">;
|
|
1502
|
-
/**
|
|
1503
|
-
* 有声音自动播放失败时是否降级成静音自动播放,默认不降级
|
|
1504
|
-
*
|
|
1505
|
-
* @type {boolean}
|
|
1506
|
-
* @memberof IPlayerConfig
|
|
1507
|
-
*/
|
|
1508
|
-
enableDegradeMuteAutoplay?: boolean;
|
|
1509
|
-
/**
|
|
1510
|
-
* 启用微信jsBridge方式的自动播放,默认不开启
|
|
1511
|
-
*
|
|
1512
|
-
* @type {boolean}
|
|
1513
|
-
* @memberof IPlayerConfig
|
|
1514
|
-
*/
|
|
1515
|
-
enableWxJsBridgeAutoplay?: boolean;
|
|
1516
|
-
/**
|
|
1517
|
-
* 开启任意点击的用户行为触发自动播放,默认不开启
|
|
1518
|
-
*
|
|
1519
|
-
* @type {boolean}
|
|
1520
|
-
* @memberof IPlayerConfig
|
|
1521
|
-
*/
|
|
1522
|
-
enableUserActionAutoplay?: boolean;
|
|
1523
|
-
/**
|
|
1524
|
-
* 禁用点播日志配置检测,默认开启,如果未配置line_app_id则会播放报错
|
|
1525
|
-
*
|
|
1526
|
-
* @type {boolean}
|
|
1527
|
-
* @memberof IPlayerConfig
|
|
1528
|
-
*/
|
|
1529
|
-
disableVodLogOptsCheck?: boolean;
|
|
1530
|
-
/**
|
|
1531
|
-
* 播放器报错展示配置, 可以配置播放异常时的播放器显示的异常文案、图片,以及是否提供刷新按钮等
|
|
1532
|
-
*
|
|
1533
|
-
*/
|
|
1534
|
-
sdkErrorPlugin?: ISdkErrorConfig;
|
|
1535
|
-
/**
|
|
1536
|
-
* rtm配置,配置rtm拉流参数
|
|
1537
|
-
* @notes 传入rtm流url时才生效
|
|
1538
|
-
*
|
|
1539
|
-
* @type {IRtmConfig}
|
|
1540
|
-
* @memberof IPlayerConfig
|
|
1541
|
-
*/
|
|
1542
|
-
rtm?: IRtmConfig;
|
|
1543
|
-
/**
|
|
1544
|
-
* 弹幕及面板配置,可配置弹幕的一些参数,如弹幕文字大小、透明度、展示区域等,
|
|
1545
|
-
*
|
|
1546
|
-
* @type {InitConfig | boolean}
|
|
1547
|
-
* @memberof IPlayerConfig
|
|
1548
|
-
*/
|
|
1549
|
-
DanmuPlugin?: InitConfig | boolean;
|
|
1550
|
-
/**
|
|
1551
|
-
* 清晰度自动降级配置
|
|
1552
|
-
* @notes 需要先引入DefinitionDemotePlugin插件,plugins: [window.VePlayer.DefinitionDemotePlugin]
|
|
1553
|
-
*
|
|
1554
|
-
* @type {IDefinitionDemotePlugin}
|
|
1555
|
-
* @memberof IPlayerConfig
|
|
1556
|
-
*/
|
|
1557
|
-
DefinitionDemotePlugin?: IDefinitionDemotePlugin;
|
|
1558
|
-
/**
|
|
1559
|
-
* 唯一id,用于私有DRM加密
|
|
1560
|
-
*
|
|
1561
|
-
* @type {string}
|
|
1562
|
-
* @memberof IPlayerConfig
|
|
1563
|
-
*/
|
|
1564
|
-
unionId?: string;
|
|
1565
|
-
/**
|
|
1566
|
-
* vid播放配置项
|
|
1567
|
-
* @notes 需要业务方服务端通过vid生成临时playAuthToken
|
|
1568
|
-
*
|
|
1569
|
-
* @type {IPlayAuthTokenConfig}
|
|
1570
|
-
* @memberof IPlayerConfig
|
|
1571
|
-
*/
|
|
1572
|
-
getVideoByToken?: IPlayAuthTokenConfig;
|
|
1573
|
-
/**
|
|
1574
|
-
* dash 播放配置项
|
|
1575
|
-
* @type {Partial<IDashPluginConfig>}
|
|
1576
|
-
* @memberof IPlayerConfig
|
|
1577
|
-
*/
|
|
1578
|
-
DASHPlugin?: Partial<IDashPluginConfig>;
|
|
1579
|
-
/**
|
|
1580
|
-
* hls 加密播放配置项
|
|
1581
|
-
* @type {Partial<IEncryptHlsPluginConfig> | boolean}
|
|
1582
|
-
* @memberof IPlayerConfig
|
|
1583
|
-
*/
|
|
1584
|
-
EncryptHlsPlugin?: Partial<IEncryptHlsPluginConfig> | boolean;
|
|
1585
|
-
/**
|
|
1586
|
-
* 质量日志配置项
|
|
1587
|
-
* @type {Partial<IVodLogOptsConfig>}
|
|
1588
|
-
* @memberof IPlayerConfig
|
|
1589
|
-
*/
|
|
1590
|
-
vodLogOpts?: Partial<IVodLogOptsConfig>;
|
|
1591
|
-
/**
|
|
1592
|
-
* mp4加密播放配置项
|
|
1593
|
-
* @type {Partial<IMp4EncryptPlayerConfig> | boolean}
|
|
1594
|
-
* @memberof IPlayerConfig
|
|
1595
|
-
*/
|
|
1596
|
-
Mp4EncryptPlayer?: Partial<IMp4EncryptPlayerConfig> | boolean;
|
|
1597
|
-
/**
|
|
1598
|
-
* 自适应码率配置项
|
|
1599
|
-
* @type {IAutoBitrateOptsConfig}
|
|
1600
|
-
* @memberof IPlayerConfig
|
|
1601
|
-
*/
|
|
1602
|
-
autoBitrateOpts?: IAutoBitrateOptsConfig;
|
|
1603
|
-
/**
|
|
1604
|
-
* 外挂字幕配置项
|
|
1605
|
-
* @type {ISubtitleConfig}
|
|
1606
|
-
* @memberof IPlayerConfig
|
|
1607
|
-
*/
|
|
1608
|
-
Subtitle?: ISubtitleConfig;
|
|
1609
|
-
/**
|
|
1610
|
-
* 记忆播放配置项
|
|
1611
|
-
* @type {IMemoryPlayConfig}
|
|
1612
|
-
* @memberof IPlayerConfig
|
|
1613
|
-
*/
|
|
1614
|
-
MemoryPlay?: IMemoryPlayConfig | boolean;
|
|
1615
|
-
/**
|
|
1616
|
-
* 音乐播放器配置项
|
|
1617
|
-
* @type {IMusicConfig}
|
|
1618
|
-
* @memberof IPlayerConfig
|
|
1619
|
-
*/
|
|
1620
|
-
music?: IMusicConfig;
|
|
1621
|
-
/**
|
|
1622
|
-
* 自动播放配置
|
|
1623
|
-
* @type {IMusicConfig}
|
|
1624
|
-
* @memberof IPlayerConfig
|
|
1625
|
-
*/
|
|
1626
|
-
AutoplayPlugin?: IAutoplayPluginConfig;
|
|
1627
|
-
}
|
|
1628
|
-
/**
|
|
1629
|
-
* 初始配置
|
|
1630
|
-
*
|
|
1631
|
-
* @export
|
|
1632
|
-
* @interface IDefaultConfig
|
|
1633
|
-
*/
|
|
1634
|
-
export interface IDefaultConfig {
|
|
1635
|
-
/**
|
|
1636
|
-
* “点播”还是“直播”
|
|
1637
|
-
*
|
|
1638
|
-
* @type {('live' | 'vod')}
|
|
1639
|
-
* @memberof IPlayerConfig
|
|
1640
|
-
*/
|
|
1641
|
-
type?: "live" | "vod";
|
|
1642
|
-
/**
|
|
1643
|
-
* 是否是直播
|
|
1644
|
-
*
|
|
1645
|
-
* @type {boolean}
|
|
1646
|
-
* @memberof IPlayerConfig
|
|
1647
|
-
*/
|
|
1648
|
-
isLive?: boolean;
|
|
1649
|
-
/**
|
|
1650
|
-
* 线路唯一key
|
|
1651
|
-
*
|
|
1652
|
-
* @type {(number | string)}
|
|
1653
|
-
* @memberof Stream
|
|
1654
|
-
*/
|
|
1655
|
-
lineId?: number | string;
|
|
1656
|
-
/**
|
|
1657
|
-
* 清晰度选择
|
|
1658
|
-
*
|
|
1659
|
-
* @type {string}
|
|
1660
|
-
* @memberof Stream
|
|
1661
|
-
*/
|
|
1662
|
-
definition?: string;
|
|
1663
|
-
/**
|
|
1664
|
-
* 开始播放时间
|
|
1665
|
-
*
|
|
1666
|
-
* @type {number}
|
|
1667
|
-
* @memberof IDefaultConfig
|
|
1668
|
-
*/
|
|
1669
|
-
startTime?: number;
|
|
1670
|
-
/**
|
|
1671
|
-
* 音量
|
|
1672
|
-
*
|
|
1673
|
-
* @type {number}
|
|
1674
|
-
* @memberof IDefaultConfig
|
|
1675
|
-
*/
|
|
1676
|
-
volume?: number;
|
|
1677
|
-
/**
|
|
1678
|
-
* 弹幕插件配置
|
|
1679
|
-
*
|
|
1680
|
-
* @type {*}
|
|
1681
|
-
* @memberof IDefaultConfig
|
|
1682
|
-
*/
|
|
1683
|
-
DanmuPlugin?: any;
|
|
1684
|
-
/**
|
|
1685
|
-
* 字幕插件配置
|
|
1686
|
-
*
|
|
1687
|
-
* @type {*}
|
|
1688
|
-
* @memberof IDefaultConfig
|
|
1689
|
-
*/
|
|
1690
|
-
LiveSubtitlesIconPlugin?: any;
|
|
1691
|
-
}
|
|
1692
|
-
/**
|
|
1693
|
-
* vid播放配置信息
|
|
1694
|
-
*
|
|
1695
|
-
* @detail Options
|
|
1696
|
-
* @description PlayAuthToken获取视频信息配置
|
|
1697
|
-
* @export
|
|
1698
|
-
* @interface IPlayAuthTokenConfig
|
|
1699
|
-
*/
|
|
1700
|
-
export interface IPlayAuthTokenConfig {
|
|
1701
|
-
/**
|
|
1702
|
-
* 服务端生成的临时playAuthToken
|
|
1703
|
-
*
|
|
1704
|
-
* @type {string}
|
|
1705
|
-
* @memberof IPlayAuthTokenConfig
|
|
1706
|
-
*/
|
|
1707
|
-
playAuthToken: string;
|
|
1708
|
-
/**
|
|
1709
|
-
* 默认清晰度
|
|
1710
|
-
*
|
|
1711
|
-
* @notes 为空时默认为最大码率的清晰度
|
|
1712
|
-
* @type {string}
|
|
1713
|
-
* @memberof IPlayAuthTokenConfig
|
|
1714
|
-
*/
|
|
1715
|
-
defaultDefinition?: string;
|
|
1716
|
-
/**
|
|
1717
|
-
* 求地址接口域名
|
|
1718
|
-
*
|
|
1719
|
-
* @notes 默认为`//vod.volcengineapi.com`
|
|
1720
|
-
* @type {string}
|
|
1721
|
-
* @memberof IPlayAuthTokenConfig
|
|
1722
|
-
*/
|
|
1723
|
-
playDomain?: string;
|
|
1724
|
-
/**
|
|
1725
|
-
* 是否启用控制台设置的封面图,默认false
|
|
1726
|
-
* @type {boolean}
|
|
1727
|
-
* @memberof IPlayAuthTokenConfig
|
|
1728
|
-
*/
|
|
1729
|
-
needPoster?: boolean;
|
|
1730
|
-
/**
|
|
1731
|
-
* 是否启用控制台设置的雪碧图,默认false
|
|
1732
|
-
* @type {boolean}
|
|
1733
|
-
* @memberof IPlayAuthTokenConfig
|
|
1734
|
-
*/
|
|
1735
|
-
needThumbs?: boolean;
|
|
1736
|
-
/**
|
|
1737
|
-
* 是否启用控制台设置的蒙版弹幕,默认false
|
|
1738
|
-
* @type {boolean}
|
|
1739
|
-
* @memberof IPlayAuthTokenConfig
|
|
1740
|
-
*/
|
|
1741
|
-
needBarrageMask?: boolean;
|
|
1742
|
-
/**
|
|
1743
|
-
* 是否需要多清晰度,默认为true
|
|
1744
|
-
* @type {boolean}
|
|
1745
|
-
* @memberof IPlayAuthTokenConfig
|
|
1746
|
-
*/
|
|
1747
|
-
needDefinitionList?: boolean;
|
|
1748
|
-
/**
|
|
1749
|
-
* hls标准加密播放所用的keyToken
|
|
1750
|
-
* @type {boolean}
|
|
1751
|
-
* @memberof IPlayAuthTokenConfig
|
|
1752
|
-
*/
|
|
1753
|
-
keyToken?: string;
|
|
1754
|
-
/**
|
|
1755
|
-
* 密钥请求域名
|
|
1756
|
-
* @type {string}
|
|
1757
|
-
* @memberof IPlayAuthTokenConfig
|
|
1758
|
-
*/
|
|
1759
|
-
keyDomain?: string;
|
|
1760
|
-
/**
|
|
1761
|
-
* 获取key方式,默认'TOP'
|
|
1762
|
-
* @type {string}
|
|
1763
|
-
* @memberof IPlayAuthTokenConfig
|
|
1764
|
-
*/
|
|
1765
|
-
getKeyType?: string;
|
|
1766
|
-
/**
|
|
1767
|
-
* 获取privateDrmAuthToken的异步回调,
|
|
1768
|
-
* @type {(
|
|
1769
|
-
* playAuthIds: string,
|
|
1770
|
-
* vid: string,
|
|
1771
|
-
* unionInfo: string,
|
|
1772
|
-
* ) => Promise<string>}
|
|
1773
|
-
* 回调入参:
|
|
1774
|
-
* playAuthIds 视频的密钥 KeyID,对应OpenAPI GetPlayInfo{@link https://www.volcengine.com/docs/4/2918#%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E} 返回视频信息中的PlayAuthId,当有多个KeyID时以英文逗号相连
|
|
1775
|
-
* vid 视频vid
|
|
1776
|
-
* unionInfo 由unionId生成的unionInfo,以用来加密PrivateDrmAuthToken
|
|
1777
|
-
* @memberof IPlayAuthTokenConfig
|
|
1778
|
-
*
|
|
1779
|
-
*/
|
|
1780
|
-
getDrmAuthToken?: (playAuthIds: string, vid: string, unionInfo: string) => Promise<string>;
|
|
1781
|
-
/**
|
|
1782
|
-
* 可携带aid等透传参数,如
|
|
1783
|
-
* {aid: 1234},以playAuthToken下发的参数的优先级最高。
|
|
1784
|
-
* 具体可传参数见{@link https://www.volcengine.com/docs/4/65659 签发 PlayAuthToken}
|
|
1785
|
-
*
|
|
1786
|
-
* @type {Record<string, number | string | boolean>}
|
|
1787
|
-
* @memberof IPlayAuthTokenConfig
|
|
1788
|
-
*/
|
|
1789
|
-
reqParams?: Record<string, number | string | boolean>;
|
|
1790
|
-
/**
|
|
1791
|
-
* 定义清晰度的映射
|
|
1792
|
-
*
|
|
1793
|
-
* @example 如:
|
|
1794
|
-
* ``` javascript
|
|
1795
|
-
* {
|
|
1796
|
-
* '480p': '标清',
|
|
1797
|
-
* '720p': '高清'
|
|
1798
|
-
* }
|
|
1799
|
-
* ```
|
|
1800
|
-
* 或
|
|
1801
|
-
* ``` javascript
|
|
1802
|
-
* {
|
|
1803
|
-
* '480p': {
|
|
1804
|
-
* definition: 'hd', // 清晰度兜底文案
|
|
1805
|
-
* definitionTextKey: 'HD' // 多语言文案key
|
|
1806
|
-
* },
|
|
1807
|
-
* '720p': {
|
|
1808
|
-
* definition: 'uhd',
|
|
1809
|
-
* definitionTextKey: 'UHD'
|
|
1810
|
-
* }
|
|
1811
|
-
* }
|
|
1812
|
-
* ```
|
|
1813
|
-
* `definitionTextKey`用来指定多语言的key
|
|
1814
|
-
* @type {Record<string, string | definitionItem>}
|
|
1815
|
-
* @memberof IPlayAuthTokenConfig
|
|
1816
|
-
*/
|
|
1817
|
-
definitionMap?: Record<string, string | definitionItem>;
|
|
1818
|
-
/**
|
|
1819
|
-
* 服务502错误时重试次数,默认为1
|
|
1820
|
-
* @type {number}
|
|
1821
|
-
* @memberof IPlayAuthTokenConfig
|
|
1822
|
-
*/
|
|
1823
|
-
retryCount?: number;
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* 清晰度定义
|
|
1827
|
-
*
|
|
1828
|
-
* @detail Options
|
|
1829
|
-
* @export
|
|
1830
|
-
* @interface definitionItem
|
|
1831
|
-
*/
|
|
1832
|
-
export interface definitionItem {
|
|
1833
|
-
/**
|
|
1834
|
-
* 清晰度
|
|
1835
|
-
*
|
|
1836
|
-
* @type {string}
|
|
1837
|
-
* @memberof definitionItem
|
|
1838
|
-
*/
|
|
1839
|
-
definition?: string;
|
|
1840
|
-
/**
|
|
1841
|
-
* 清晰度多语言key
|
|
1842
|
-
*
|
|
1843
|
-
* @type {string}
|
|
1844
|
-
* @memberof definitionItem
|
|
1845
|
-
*/
|
|
1846
|
-
definitionTextKey?: string;
|
|
1847
|
-
}
|
|
1848
|
-
export interface IAutoBitrateOptsConfig {
|
|
1849
|
-
/**
|
|
1850
|
-
* 是否开启功能,默认为false
|
|
1851
|
-
*
|
|
1852
|
-
* @type {boolean}
|
|
1853
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1854
|
-
*/
|
|
1855
|
-
isOpenAutoDefi?: boolean;
|
|
1856
|
-
/**
|
|
1857
|
-
* 自动切换清晰度对应显示文案
|
|
1858
|
-
*
|
|
1859
|
-
* @type {string}
|
|
1860
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1861
|
-
*/
|
|
1862
|
-
autoDefiText?: string;
|
|
1863
|
-
/**
|
|
1864
|
-
* 起播是否调整到自动切换, 默认为false
|
|
1865
|
-
*
|
|
1866
|
-
* @type {boolean}
|
|
1867
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1868
|
-
*/
|
|
1869
|
-
isPlayAutoDefi?: boolean;
|
|
1870
|
-
/**
|
|
1871
|
-
* 调用算法频率
|
|
1872
|
-
*
|
|
1873
|
-
* @type {boolean}
|
|
1874
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1875
|
-
*/
|
|
1876
|
-
interval?: number;
|
|
1877
|
-
/**
|
|
1878
|
-
* 多久后算消费视频,单位秒
|
|
1879
|
-
*
|
|
1880
|
-
* @type {number}
|
|
1881
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1882
|
-
*/
|
|
1883
|
-
noStallCheckTime?: number;
|
|
1884
|
-
/**
|
|
1885
|
-
* 算法 方法选择见文档,默认使用31即可,目前31策略卡顿收益很高
|
|
1886
|
-
*
|
|
1887
|
-
* @type {number}
|
|
1888
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1889
|
-
*/
|
|
1890
|
-
method?: number;
|
|
1891
|
-
/**
|
|
1892
|
-
* 算法模块, CDN方式为window.DashAbralgo
|
|
1893
|
-
*
|
|
1894
|
-
* @type {any}
|
|
1895
|
-
* @memberof IAutoBitrateOptsConfig
|
|
1896
|
-
*/
|
|
1897
|
-
module?: any;
|
|
1898
|
-
}
|
|
1899
|
-
/**
|
|
1900
|
-
* 初始配置
|
|
1901
|
-
*
|
|
1902
|
-
* @export
|
|
1903
|
-
* @interface IMemoryPlayConfig
|
|
1904
|
-
*/
|
|
1905
|
-
export interface IMemoryPlayConfig {
|
|
1906
|
-
/**
|
|
1907
|
-
* 存储标识id
|
|
1908
|
-
*
|
|
1909
|
-
* @type {number | string}
|
|
1910
|
-
* @memberof IMemoryPlayConfig
|
|
1911
|
-
*/
|
|
1912
|
-
memoryId: number | string;
|
|
1913
|
-
/**
|
|
1914
|
-
* 设置时间函数
|
|
1915
|
-
*
|
|
1916
|
-
* @type {(id: number | string, time: number) => unknown}
|
|
1917
|
-
* @memberof IMemoryPlayConfig
|
|
1918
|
-
*/
|
|
1919
|
-
saveTime: (id: number | string, time: number) => unknown;
|
|
1920
|
-
/**
|
|
1921
|
-
* 获取最后一次播放时间函数
|
|
1922
|
-
*
|
|
1923
|
-
* @type {(id: number | string) => number | Promise<number>}
|
|
1924
|
-
* @memberof IMemoryPlayConfig
|
|
1925
|
-
*/
|
|
1926
|
-
getTime: (id: number | string) => number | Promise<number>;
|
|
1927
|
-
}
|
|
1928
|
-
declare class PlayerData {
|
|
1929
|
-
id?: string;
|
|
1930
|
-
root?: HTMLElement;
|
|
1931
|
-
configs: any;
|
|
1932
|
-
type: string;
|
|
1933
|
-
isLive: boolean;
|
|
1934
|
-
options: any;
|
|
1935
|
-
isMobile: boolean;
|
|
1936
|
-
playList: Stream[];
|
|
1937
|
-
plugins: any[];
|
|
1938
|
-
openSoftDecoding: boolean;
|
|
1939
|
-
defaultConfig: IDefaultConfig | undefined;
|
|
1940
|
-
isHitDefault: boolean;
|
|
1941
|
-
codec?: CodecType;
|
|
1942
|
-
enableH265Degrade: boolean;
|
|
1943
|
-
languageData: {
|
|
1944
|
-
extraLangList: IXGI18nText[];
|
|
1945
|
-
extendLangList: IXGI18nText[];
|
|
1946
|
-
};
|
|
1947
|
-
current: Current;
|
|
1948
|
-
checkExpireInterval: number;
|
|
1949
|
-
expireDetectType: Array<"xhrStatus" | "urlExpire" | "getUrlTime">;
|
|
1950
|
-
onMediaExpired: () => Promise<IPlayerConfig>;
|
|
1951
|
-
onTokenExpired: () => Promise<IPlayAuthTokenConfig>;
|
|
1952
|
-
platform: PlatformEnum;
|
|
1953
|
-
apiMap: apiMapItem;
|
|
1954
|
-
unionId?: string;
|
|
1955
|
-
unionInfo?: string;
|
|
1956
|
-
isMusic?: boolean;
|
|
1957
|
-
sdkPlugins: any[];
|
|
1958
|
-
useHlsPluginForSafari: boolean;
|
|
1959
|
-
constructor(configs: IPlayerConfig);
|
|
1960
|
-
initPlayData(configs: any): void;
|
|
1961
|
-
initPlaylistAndGetCurrent(configs: IPlayerConfig): any;
|
|
1962
|
-
isCurrentH265(): boolean;
|
|
1963
|
-
getCurrentByDefaultConfig(): Stream;
|
|
1964
|
-
initCurrent(currentStreams: any): void;
|
|
1965
|
-
initI18nData(languages: any): {
|
|
1966
|
-
extraLangList: any[];
|
|
1967
|
-
extendLangList: any[];
|
|
1968
|
-
};
|
|
1969
|
-
/**
|
|
1970
|
-
* @description: 获取当前直播url
|
|
1971
|
-
*/
|
|
1972
|
-
getCurrentUrl(): string;
|
|
1973
|
-
/**
|
|
1974
|
-
* @description: 获取当前的streamType
|
|
1975
|
-
*/
|
|
1976
|
-
getCurrentStreamType(): any;
|
|
1977
|
-
/**
|
|
1978
|
-
* @description: 获取满足当前直播条件的流
|
|
1979
|
-
*/
|
|
1980
|
-
getCurrentStreams(): Stream[];
|
|
1981
|
-
/**
|
|
1982
|
-
* @description: 获取根据线路ID去重的流,用于获取有几个线路
|
|
1983
|
-
*/
|
|
1984
|
-
getLineList(): Stream[];
|
|
1985
|
-
/**
|
|
1986
|
-
* @description: 根据线路ID获取符合条件的流
|
|
1987
|
-
* @param {number} lineId
|
|
1988
|
-
*/
|
|
1989
|
-
getLineListByLineId(lineId: number | string): Stream[];
|
|
1990
|
-
/**
|
|
1991
|
-
* @description: 根据线路ID获取清晰度list,用于获取某个线路下有几个清晰度
|
|
1992
|
-
* @param {number} lineId
|
|
1993
|
-
*/
|
|
1994
|
-
getDefinitionListByLineId(lineId: number | string): Stream[];
|
|
1995
|
-
/**
|
|
1996
|
-
* @description: 根据条件筛选符合条件的流list
|
|
1997
|
-
* @param {Condition} condition
|
|
1998
|
-
*/
|
|
1999
|
-
getUrlList(condition: Condition): Stream[];
|
|
2000
|
-
/**
|
|
2001
|
-
* @description: 获取当期清晰的上一级清晰度或下一级清晰度
|
|
2002
|
-
* @param {boolean} isDown
|
|
2003
|
-
*/
|
|
2004
|
-
getNextDefinition(isDown: boolean, demotePriority: any): Stream[];
|
|
2005
|
-
}
|
|
2006
|
-
declare function isMSESupport(mime?: string): boolean;
|
|
2007
|
-
export interface IConfig {
|
|
2008
|
-
mode?: number;
|
|
2009
|
-
isAutoChange?: boolean;
|
|
2010
|
-
}
|
|
2011
|
-
declare class MobilePlayerPanel {
|
|
2012
|
-
config: IConfig;
|
|
2013
|
-
parent: HTMLElement;
|
|
2014
|
-
root: any;
|
|
2015
|
-
mode: number;
|
|
2016
|
-
isAutoChange: number;
|
|
2017
|
-
player: any;
|
|
2018
|
-
children: HTMLElement | undefined;
|
|
2019
|
-
container: HTMLElement | undefined;
|
|
2020
|
-
title: HTMLElement | undefined;
|
|
2021
|
-
isShow: boolean;
|
|
2022
|
-
showCancelBtn: boolean;
|
|
2023
|
-
constructor(args: any);
|
|
2024
|
-
initEvents(): void;
|
|
2025
|
-
handleOrientationChange(): void;
|
|
2026
|
-
changeConfig(config: IConfig): void;
|
|
2027
|
-
changeMode(mode: number): void;
|
|
2028
|
-
renderPanel(): void;
|
|
2029
|
-
showPanel(children: HTMLElement, title?: string, isItemList?: boolean): Promise<void>;
|
|
2030
|
-
updatePanel(children: HTMLElement): void;
|
|
2031
|
-
setTitle(title: any): void;
|
|
2032
|
-
renderTitle(title: any): HTMLElement;
|
|
2033
|
-
show(): void;
|
|
2034
|
-
hide(): void;
|
|
2035
|
-
handleHide(e: any): void;
|
|
2036
|
-
bind(event: string, eventHandle: any, isBubble?: boolean): void;
|
|
2037
|
-
destroy(): void;
|
|
2038
|
-
}
|
|
2039
|
-
declare class VePlayer {
|
|
2040
|
-
/**
|
|
2041
|
-
* 播放相关配置数据
|
|
2042
|
-
* @hidden
|
|
2043
|
-
*
|
|
2044
|
-
* @type {PlayerData}
|
|
2045
|
-
* @memberof VePlayer
|
|
2046
|
-
*/
|
|
2047
|
-
playerData: PlayerData;
|
|
2048
|
-
/**
|
|
2049
|
-
* 播放器内核实例
|
|
2050
|
-
* @type {*}
|
|
2051
|
-
* @memberof VePlayer
|
|
2052
|
-
*/
|
|
2053
|
-
player: Player & {
|
|
2054
|
-
changePluginsIcon?: (name: any, isShow: any) => void;
|
|
2055
|
-
playerData?: PlayerData;
|
|
2056
|
-
playerType?: string;
|
|
2057
|
-
playerVersion?: string;
|
|
2058
|
-
panel?: MobilePlayerPanel;
|
|
2059
|
-
emitExpireTimestamp?: number;
|
|
2060
|
-
vodLogger?: VodLogger;
|
|
2061
|
-
};
|
|
2062
|
-
/**
|
|
2063
|
-
* @hidden
|
|
2064
|
-
*
|
|
2065
|
-
* @type {*}
|
|
2066
|
-
* @memberof VePlayer
|
|
2067
|
-
*/
|
|
2068
|
-
mountingDom: any;
|
|
2069
|
-
/**
|
|
2070
|
-
* @hidden
|
|
2071
|
-
*
|
|
2072
|
-
* @type {*}
|
|
2073
|
-
* @memberof VePlayer
|
|
2074
|
-
*/
|
|
2075
|
-
playerContainer: any;
|
|
2076
|
-
/**
|
|
2077
|
-
* @hidden
|
|
2078
|
-
*
|
|
2079
|
-
* @type {*}
|
|
2080
|
-
* @memberof VePlayer
|
|
2081
|
-
*/
|
|
2082
|
-
mobilePanel: any;
|
|
2083
|
-
/**
|
|
2084
|
-
*
|
|
2085
|
-
* @private
|
|
2086
|
-
* @type {*}
|
|
2087
|
-
* @memberof VePlayer
|
|
2088
|
-
*/
|
|
2089
|
-
private _emitter;
|
|
2090
|
-
/**
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
* @private
|
|
2094
|
-
* @memberof VePlayer
|
|
2095
|
-
*/
|
|
2096
|
-
private _isFirstCreated;
|
|
2097
|
-
/**
|
|
2098
|
-
* @hidden
|
|
2099
|
-
* 要注册的sdk插件
|
|
2100
|
-
*
|
|
2101
|
-
* @type {*}
|
|
2102
|
-
* @memberof VePlayer
|
|
2103
|
-
*/
|
|
2104
|
-
sdkPlugins: any[];
|
|
2105
|
-
/**
|
|
2106
|
-
* @hidden
|
|
2107
|
-
* 缓存运行的sdk插件实例
|
|
2108
|
-
*
|
|
2109
|
-
* @type {*}
|
|
2110
|
-
* @memberof VePlayer
|
|
2111
|
-
*/
|
|
2112
|
-
_sdkPlugins: any;
|
|
2113
|
-
/**
|
|
2114
|
-
* @hidden
|
|
2115
|
-
*
|
|
2116
|
-
* @type {*}
|
|
2117
|
-
* @memberof VePlayer
|
|
2118
|
-
*/
|
|
2119
|
-
private checkExpireTimer;
|
|
2120
|
-
/**
|
|
2121
|
-
* @hidden
|
|
2122
|
-
*
|
|
2123
|
-
* @type {*}
|
|
2124
|
-
* @memberof VePlayer
|
|
2125
|
-
*/
|
|
2126
|
-
private _playOriginalUrl;
|
|
2127
|
-
/**
|
|
2128
|
-
* @hidden
|
|
2129
|
-
* 过期次数
|
|
2130
|
-
* @type {*}
|
|
2131
|
-
* @memberof VePlayer
|
|
2132
|
-
*/
|
|
2133
|
-
private expireCount;
|
|
2134
|
-
/**
|
|
2135
|
-
* @hidden
|
|
2136
|
-
* 获取url的时间
|
|
2137
|
-
* @type {*}
|
|
2138
|
-
* @memberof VePlayer
|
|
2139
|
-
*/
|
|
2140
|
-
private getUrlTime;
|
|
2141
|
-
/**
|
|
2142
|
-
* @hidden
|
|
2143
|
-
* 延迟触发但错误
|
|
2144
|
-
* @type {*}
|
|
2145
|
-
* @memberof VePlayer
|
|
2146
|
-
*/
|
|
2147
|
-
delayError: any[];
|
|
2148
|
-
private isFirstEmitted;
|
|
2149
|
-
/**
|
|
2150
|
-
* @hidden
|
|
2151
|
-
* umd加载器
|
|
2152
|
-
* @type {*}
|
|
2153
|
-
* @memberof VePlayer
|
|
2154
|
-
*/
|
|
2155
|
-
private sdkUmdLoader;
|
|
2156
|
-
static isMSESupported: typeof isMSESupport;
|
|
2157
|
-
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
2158
|
-
static sdkVersion: string;
|
|
2159
|
-
static isRTMSupportCodec: (codec: RTMCodec, options: {
|
|
2160
|
-
targetProfileLevel?: string;
|
|
2161
|
-
}) => Promise<boolean>;
|
|
2162
|
-
constructor(configs: IPlayerConfig);
|
|
2163
|
-
/**
|
|
2164
|
-
*
|
|
2165
|
-
*
|
|
2166
|
-
* @private
|
|
2167
|
-
* @param {IPlayerConfig} configs
|
|
2168
|
-
* @memberof VePlayer
|
|
2169
|
-
*/
|
|
2170
|
-
private _init;
|
|
2171
|
-
/**
|
|
2172
|
-
* @hidden
|
|
2173
|
-
* @description 初始化并注册sdk插件(非西瓜插件)
|
|
2174
|
-
* @memberof VePlayer
|
|
2175
|
-
*/
|
|
2176
|
-
_initSdkPlugins(): void;
|
|
2177
|
-
/**
|
|
2178
|
-
* @hidden
|
|
2179
|
-
* @description 初始化过期检测
|
|
2180
|
-
* @memberof VePlayer
|
|
2181
|
-
*/
|
|
2182
|
-
initCheckExpire(): void;
|
|
2183
|
-
/**
|
|
2184
|
-
* @hidden
|
|
2185
|
-
* @description 更新umd的备用地址
|
|
2186
|
-
* @memberof VePlayer
|
|
2187
|
-
*/
|
|
2188
|
-
private initUmdLoader;
|
|
2189
|
-
private checkVodLogOptions;
|
|
2190
|
-
/**
|
|
2191
|
-
* @hidden
|
|
2192
|
-
* @description umd 加载失败的回调
|
|
2193
|
-
* @memberof VePlayer
|
|
2194
|
-
*/
|
|
2195
|
-
umdLoadErr(umdName: any, err: any): void;
|
|
2196
|
-
/**
|
|
2197
|
-
* @hidden
|
|
2198
|
-
* @description 循环执行过期检测
|
|
2199
|
-
* @memberof VePlayer
|
|
2200
|
-
*/
|
|
2201
|
-
onRepeat(): void;
|
|
2202
|
-
/**
|
|
2203
|
-
* @hidden
|
|
2204
|
-
* @description 触发过期事件
|
|
2205
|
-
* @memberof VePlayer
|
|
2206
|
-
*/
|
|
2207
|
-
emitExpireEvent(): void;
|
|
2208
|
-
/**
|
|
2209
|
-
* @hidden
|
|
2210
|
-
* @description 地址获取时间
|
|
2211
|
-
* @memberof VePlayer
|
|
2212
|
-
*/
|
|
2213
|
-
getUrlTimestamp(url: string): void;
|
|
2214
|
-
/**
|
|
2215
|
-
* @description 监听sdk事件
|
|
2216
|
-
*
|
|
2217
|
-
* @param {string} action
|
|
2218
|
-
* @param {(...args: any[]) => void} func
|
|
2219
|
-
* @memberof VePlayer
|
|
2220
|
-
*/
|
|
2221
|
-
on(action: string, func: (...args: any[]) => void): void;
|
|
2222
|
-
/**
|
|
2223
|
-
* @description 触发sdk事件
|
|
2224
|
-
*
|
|
2225
|
-
* @param {string} action
|
|
2226
|
-
* @param {*} [payload]
|
|
2227
|
-
* @memberof VePlayer
|
|
2228
|
-
*/
|
|
2229
|
-
emit(action: string, payload?: any): void;
|
|
2230
|
-
/**
|
|
2231
|
-
* 监听sdk事件,事件处理函数只执行一次
|
|
2232
|
-
*
|
|
2233
|
-
* @param {string} action
|
|
2234
|
-
* @param {(...args: any[]) => void} func
|
|
2235
|
-
* @memberof VePlayer
|
|
2236
|
-
*/
|
|
2237
|
-
once(action: string, func: (...args: any[]) => void): void;
|
|
2238
|
-
/**
|
|
2239
|
-
* 解绑事件监听
|
|
2240
|
-
*
|
|
2241
|
-
* @param {string} action
|
|
2242
|
-
* @param {(...args: any[]) => void} func
|
|
2243
|
-
* @memberof VePlayer
|
|
2244
|
-
*/
|
|
2245
|
-
off(action: string, func: (...args: any[]) => void): void;
|
|
2246
|
-
/**
|
|
2247
|
-
* @hidden
|
|
2248
|
-
*
|
|
2249
|
-
* @memberof VePlayer
|
|
2250
|
-
*/
|
|
2251
|
-
renderDom(): void;
|
|
2252
|
-
/**
|
|
2253
|
-
* @hidden
|
|
2254
|
-
*
|
|
2255
|
-
* @return {*}
|
|
2256
|
-
* @memberof VePlayer
|
|
2257
|
-
*/
|
|
2258
|
-
renderPoster(): void;
|
|
2259
|
-
/**
|
|
2260
|
-
* @hidden
|
|
2261
|
-
*
|
|
2262
|
-
* @return {*}
|
|
2263
|
-
* @memberof VePlayer
|
|
2264
|
-
*/
|
|
2265
|
-
createPlayer(): Promise<Player & {
|
|
2266
|
-
changePluginsIcon?: (name: any, isShow: any) => void;
|
|
2267
|
-
playerData?: PlayerData;
|
|
2268
|
-
playerType?: string;
|
|
2269
|
-
playerVersion?: string;
|
|
2270
|
-
panel?: MobilePlayerPanel;
|
|
2271
|
-
emitExpireTimestamp?: number;
|
|
2272
|
-
vodLogger?: VodLogger;
|
|
2273
|
-
}>;
|
|
2274
|
-
/**
|
|
2275
|
-
* @hidden
|
|
2276
|
-
*
|
|
2277
|
-
* @param {*} finalOptions
|
|
2278
|
-
* @return {*}
|
|
2279
|
-
* @memberof VePlayer
|
|
2280
|
-
*/
|
|
2281
|
-
setPluginConfig(finalOptions: IPlayerConfig): void;
|
|
2282
|
-
/**
|
|
2283
|
-
* @hidden
|
|
2284
|
-
*
|
|
2285
|
-
* @param {string} url 地址
|
|
2286
|
-
* @memberof VePlayer
|
|
2287
|
-
*/
|
|
2288
|
-
detectCodec(url: string): Promise<void>;
|
|
2289
|
-
/**
|
|
2290
|
-
* @hidden
|
|
2291
|
-
*
|
|
2292
|
-
* @param {*} options
|
|
2293
|
-
* @return {*}
|
|
2294
|
-
* @memberof VePlayer
|
|
2295
|
-
*/
|
|
2296
|
-
setDefaultConfigOptions(options: any): void;
|
|
2297
|
-
/**
|
|
2298
|
-
* 获取当前播放视频数据
|
|
2299
|
-
*
|
|
2300
|
-
* @return {any}
|
|
2301
|
-
* @memberof VePlayer
|
|
2302
|
-
*/
|
|
2303
|
-
getCurrentPlayerConfig(): {
|
|
2304
|
-
type?: "vod" | "live";
|
|
2305
|
-
isLive?: boolean;
|
|
2306
|
-
lineId?: string | number;
|
|
2307
|
-
definition?: string;
|
|
2308
|
-
startTime?: number;
|
|
2309
|
-
volume?: number;
|
|
2310
|
-
DanmuPlugin?: any;
|
|
2311
|
-
LiveSubtitlesIconPlugin?: any;
|
|
2312
|
-
};
|
|
2313
|
-
/**
|
|
2314
|
-
*
|
|
2315
|
-
* @private
|
|
2316
|
-
* @return {*}
|
|
2317
|
-
* @memberof VePlayer
|
|
2318
|
-
*/
|
|
2319
|
-
private _analyzeExtendPlugins;
|
|
2320
|
-
/**
|
|
2321
|
-
* @hidden
|
|
2322
|
-
*
|
|
2323
|
-
* @memberof VePlayer
|
|
2324
|
-
*/
|
|
2325
|
-
beforePlayerCreate(): Promise<void>;
|
|
2326
|
-
/**
|
|
2327
|
-
* @hidden
|
|
2328
|
-
*
|
|
2329
|
-
* @memberof VePlayer
|
|
2330
|
-
*/
|
|
2331
|
-
afterPlayerCreate(): void;
|
|
2332
|
-
/**
|
|
2333
|
-
* @hidden
|
|
2334
|
-
*
|
|
2335
|
-
* @memberof VePlayer
|
|
2336
|
-
*/
|
|
2337
|
-
emitDelayError(): void;
|
|
2338
|
-
/**
|
|
2339
|
-
* @hidden
|
|
2340
|
-
*
|
|
2341
|
-
* @memberof VePlayer
|
|
2342
|
-
*/
|
|
2343
|
-
private _setPlayerInfo;
|
|
2344
|
-
/**
|
|
2345
|
-
*
|
|
2346
|
-
*
|
|
2347
|
-
* @private
|
|
2348
|
-
* @param {boolean} isMobile
|
|
2349
|
-
* @memberof VePlayer
|
|
2350
|
-
*/
|
|
2351
|
-
private _mountingPlayerPanel;
|
|
2352
|
-
/**
|
|
2353
|
-
*
|
|
2354
|
-
*
|
|
2355
|
-
* @private
|
|
2356
|
-
* @return {*}
|
|
2357
|
-
* @memberof VePlayer
|
|
2358
|
-
*/
|
|
2359
|
-
private _bindPlayerEvents;
|
|
2360
|
-
/**
|
|
2361
|
-
* @private
|
|
2362
|
-
* @return {*}
|
|
2363
|
-
* @memberof VePlayer
|
|
2364
|
-
*/
|
|
2365
|
-
private onMediaExpiredAction;
|
|
2366
|
-
/**
|
|
2367
|
-
* @hidden
|
|
2368
|
-
*
|
|
2369
|
-
* @memberof VePlayer
|
|
2370
|
-
*/
|
|
2371
|
-
private onTokenExpiredAction;
|
|
2372
|
-
/**
|
|
2373
|
-
*
|
|
2374
|
-
*
|
|
2375
|
-
* @private
|
|
2376
|
-
* @memberof VePlayer
|
|
2377
|
-
*/
|
|
2378
|
-
private _bindSdkEvents;
|
|
2379
|
-
/**
|
|
2380
|
-
* @hidden
|
|
2381
|
-
*
|
|
2382
|
-
* @memberof VePlayer
|
|
2383
|
-
*/
|
|
2384
|
-
private _mountingExtendMethods;
|
|
2385
|
-
/**
|
|
2386
|
-
*
|
|
2387
|
-
*
|
|
2388
|
-
* @private
|
|
2389
|
-
* @return {*}
|
|
2390
|
-
* @memberof VePlayer
|
|
2391
|
-
*/
|
|
2392
|
-
private _offPlayerEvents;
|
|
2393
|
-
/**
|
|
2394
|
-
* @hidden
|
|
2395
|
-
* 切换插件展示
|
|
2396
|
-
*
|
|
2397
|
-
* @param {*} pluginName
|
|
2398
|
-
* @param {*} IsShow
|
|
2399
|
-
* @return {*}
|
|
2400
|
-
* @memberof VePlayer
|
|
2401
|
-
*/
|
|
2402
|
-
changePluginsIcon(pluginName: any, IsShow: any): void;
|
|
2403
|
-
/**
|
|
2404
|
-
* @hidden
|
|
2405
|
-
*
|
|
2406
|
-
* @description 对外提供获取SDK插件实例的方法
|
|
2407
|
-
* @param { string } name
|
|
2408
|
-
* @return {*}
|
|
2409
|
-
* @memberof VePlayer
|
|
2410
|
-
*/
|
|
2411
|
-
getSdkPlugin(name: any): any;
|
|
2412
|
-
/**
|
|
2413
|
-
* @description 更换playAuthToken的方法
|
|
2414
|
-
* @notes 这里指同一个视频切换视频源,不能用来切换不同类型的视频
|
|
2415
|
-
* @param { IPlayAuthTokenConfig } config authToken配置
|
|
2416
|
-
* @param { boolean } isNewVideo 是否是新视频,默认true。若未false即表示同一个视频切换token播放,会在切换前时间点继续播放
|
|
2417
|
-
* @memberof VePlayer
|
|
2418
|
-
*/
|
|
2419
|
-
switchAuthToken(config: IPlayAuthTokenConfig, isNewVideo?: boolean): Promise<void>;
|
|
2420
|
-
/**
|
|
2421
|
-
* @description 更新playAuthToken的方法,用来更新视频地址
|
|
2422
|
-
* @param { IPlayAuthTokenConfig } config
|
|
2423
|
-
* @memberof VePlayer
|
|
2424
|
-
*/
|
|
2425
|
-
updateAuthToken(config: IPlayAuthTokenConfig): Promise<void>;
|
|
2426
|
-
/**
|
|
2427
|
-
* @description 返回当前视频的地址
|
|
2428
|
-
* @memberof VePlayer
|
|
2429
|
-
*/
|
|
2430
|
-
get src(): any;
|
|
2431
|
-
/**
|
|
2432
|
-
* @description 设置当前视频的地址
|
|
2433
|
-
* @notes 会重新拉取新的视频,从0开始起播
|
|
2434
|
-
* @memberof VePlayer
|
|
2435
|
-
*/
|
|
2436
|
-
set src(url: any);
|
|
2437
|
-
/**
|
|
2438
|
-
* 切换视频url
|
|
2439
|
-
* @param {string} url 同一个视频,更新视频地址
|
|
2440
|
-
* @notes 切换后从切换前的时间点继续播放
|
|
2441
|
-
* @return {Promise<void>}
|
|
2442
|
-
* @memberof VePlayer
|
|
2443
|
-
*/
|
|
2444
|
-
switchURL(url: string): Promise<void>;
|
|
2445
|
-
/**
|
|
2446
|
-
* 重建播放下一个
|
|
2447
|
-
*
|
|
2448
|
-
* @param {playerConfig} config
|
|
2449
|
-
* @param { boolean } isNewVideo 是否是新视频,默认true。若为false即表示同一个视频切换token播放,会在切换前时间点继续播放
|
|
2450
|
-
* @memberof VePlayer
|
|
2451
|
-
*/
|
|
2452
|
-
next(config: IPlayerConfig, isNewVideo?: boolean): Promise<void>;
|
|
2453
|
-
/**
|
|
2454
|
-
* 切换视频源
|
|
2455
|
-
*
|
|
2456
|
-
* @param {IPlayerConfig} config
|
|
2457
|
-
* @param { boolean } isNewVideo 是否是新视频,默认true。若为false即表示同一个视频切换地址播放,会在切换前的时间点继续播放
|
|
2458
|
-
* @return{Promise<any>}
|
|
2459
|
-
* @memberof VePlayer
|
|
2460
|
-
*/
|
|
2461
|
-
playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
|
|
2462
|
-
/**
|
|
2463
|
-
* @hidden
|
|
2464
|
-
*
|
|
2465
|
-
* @return {*}
|
|
2466
|
-
* @memberof VePlayer
|
|
2467
|
-
*/
|
|
2468
|
-
resetUrlState(url: any): void;
|
|
2469
|
-
/**
|
|
2470
|
-
* 销毁xgplayer实例
|
|
2471
|
-
*
|
|
2472
|
-
* @private
|
|
2473
|
-
* @memberof VePlayer
|
|
2474
|
-
*/
|
|
2475
|
-
private _destroyPlayer;
|
|
2476
|
-
/**
|
|
2477
|
-
* @hidden
|
|
2478
|
-
*
|
|
2479
|
-
* @return {*}
|
|
2480
|
-
* @memberof VePlayer
|
|
2481
|
-
*/
|
|
2482
|
-
getPlayerInstance(): Player & {
|
|
2483
|
-
changePluginsIcon?: (name: any, isShow: any) => void;
|
|
2484
|
-
playerData?: PlayerData;
|
|
2485
|
-
playerType?: string;
|
|
2486
|
-
playerVersion?: string;
|
|
2487
|
-
panel?: MobilePlayerPanel;
|
|
2488
|
-
emitExpireTimestamp?: number;
|
|
2489
|
-
vodLogger?: VodLogger;
|
|
2490
|
-
};
|
|
2491
|
-
/**
|
|
2492
|
-
* @hidden
|
|
2493
|
-
*
|
|
2494
|
-
* @return {*}
|
|
2495
|
-
* @memberof VePlayer
|
|
2496
|
-
*/
|
|
2497
|
-
getSoftDecodingOption(isOpenSoftDecoding: boolean, url: string, type: string): Promise<{
|
|
2498
|
-
mediaType: string;
|
|
2499
|
-
innerDegrade: number;
|
|
2500
|
-
codecType: string;
|
|
2501
|
-
} | {
|
|
2502
|
-
mediaType?: undefined;
|
|
2503
|
-
innerDegrade?: undefined;
|
|
2504
|
-
codecType?: undefined;
|
|
2505
|
-
}>;
|
|
2506
|
-
/**
|
|
2507
|
-
* @hidden
|
|
2508
|
-
*
|
|
2509
|
-
* @description 获取h265软解播放时的播放列表
|
|
2510
|
-
* @memberof VePlayer
|
|
2511
|
-
*/
|
|
2512
|
-
setH265SoftPlayList(): void;
|
|
2513
|
-
/**
|
|
2514
|
-
* 初始化多语言词典
|
|
2515
|
-
*
|
|
2516
|
-
* @param {*} languages
|
|
2517
|
-
* @memberof VePlayer
|
|
2518
|
-
*/
|
|
2519
|
-
private _initI18N;
|
|
2520
|
-
/**
|
|
2521
|
-
* 获取音乐播放模式
|
|
2522
|
-
* @notes 仅音乐播放模式有效
|
|
2523
|
-
* @return {PLAY_MODE_TYPE}
|
|
2524
|
-
* @memberof VePlayer
|
|
2525
|
-
*/
|
|
2526
|
-
get musicMode(): PLAY_MODE_TYPE;
|
|
2527
|
-
/**
|
|
2528
|
-
* 设置音乐播放模式
|
|
2529
|
-
* @notes 仅音乐播放模式有效
|
|
2530
|
-
* @memberof VePlayer
|
|
2531
|
-
* @param {PLAY_MODE_TYPE} val 模式值
|
|
2532
|
-
*/
|
|
2533
|
-
set musicMode(val: PLAY_MODE_TYPE);
|
|
2534
|
-
/**
|
|
2535
|
-
* 获取音乐播放快进快退时间跨度
|
|
2536
|
-
* @notes 仅音乐播放模式有效
|
|
2537
|
-
* @return {number}
|
|
2538
|
-
* @memberof VePlayer
|
|
2539
|
-
*/
|
|
2540
|
-
get musicTimeScale(): number;
|
|
2541
|
-
/**
|
|
2542
|
-
* 设置音乐播放快进快退时间跨度
|
|
2543
|
-
* @notes 仅音乐播放模式有效
|
|
2544
|
-
* @param {number} scale 时间跨度
|
|
2545
|
-
* @memberof VePlayer
|
|
2546
|
-
*/
|
|
2547
|
-
set musicTimeScale(scale: number);
|
|
2548
|
-
/**
|
|
2549
|
-
* 获取音乐播放列表
|
|
2550
|
-
* @notes 仅音乐播放模式有效
|
|
2551
|
-
* @return {IMusicListItem[]}
|
|
2552
|
-
* @memberof VePlayer
|
|
2553
|
-
*/
|
|
2554
|
-
get musicList(): IMusicListItem[];
|
|
2555
|
-
/**
|
|
2556
|
-
* 设置音乐播放列表
|
|
2557
|
-
* @notes 仅音乐播放模式有效
|
|
2558
|
-
* @param {IMusicListItem[]} list 播放列表
|
|
2559
|
-
* @memberof VePlayer
|
|
2560
|
-
*/
|
|
2561
|
-
set musicList(list: IMusicListItem[]);
|
|
2562
|
-
/**
|
|
2563
|
-
* 向播放列表中加入歌曲
|
|
2564
|
-
* @notes 仅音乐播放模式有效
|
|
2565
|
-
* @param {IMusicListItem} meta 歌曲信息
|
|
2566
|
-
* @memberof VePlayer
|
|
2567
|
-
*/
|
|
2568
|
-
musicAdd(meta: IMusicListItem): void;
|
|
2569
|
-
/**
|
|
2570
|
-
* 随机获取播放列表中某一首歌曲
|
|
2571
|
-
* @notes 仅音乐播放模式有效
|
|
2572
|
-
* @return {IMusicListItem} 歌曲信息
|
|
2573
|
-
* @memberof VePlayer
|
|
2574
|
-
*/
|
|
2575
|
-
musicRandom(): IMusicListItem;
|
|
2576
|
-
/**
|
|
2577
|
-
* 播放播放列表的下一首歌曲
|
|
2578
|
-
* @notes 仅音乐播放模式有效
|
|
2579
|
-
* @memberof VePlayer
|
|
2580
|
-
*/
|
|
2581
|
-
musicNext(): void;
|
|
2582
|
-
/**
|
|
2583
|
-
* 播放播放列表的上一首歌曲
|
|
2584
|
-
* @notes 仅音乐播放模式有效
|
|
2585
|
-
* @memberof VePlayer
|
|
2586
|
-
*/
|
|
2587
|
-
musicPrev(): void;
|
|
2588
|
-
/**
|
|
2589
|
-
* 播放播放列表的第n首歌曲
|
|
2590
|
-
* @notes 仅音乐播放模式有效
|
|
2591
|
-
* @param {number} index 播放列表中的序号
|
|
2592
|
-
* @memberof VePlayer
|
|
2593
|
-
*/
|
|
2594
|
-
musicSetIndex(index: number): void;
|
|
2595
|
-
/**
|
|
2596
|
-
* 歌曲快进
|
|
2597
|
-
* @notes 仅音乐播放模式有效
|
|
2598
|
-
* @memberof VePlayer
|
|
2599
|
-
*/
|
|
2600
|
-
musicForward(): void;
|
|
2601
|
-
/**
|
|
2602
|
-
* 歌曲后退
|
|
2603
|
-
* @notes 仅音乐播放模式有效
|
|
2604
|
-
* @memberof VePlayer
|
|
2605
|
-
*/
|
|
2606
|
-
musicBackward(): void;
|
|
2607
|
-
/**
|
|
2608
|
-
* 从播放列表移除指定歌曲
|
|
2609
|
-
* @notes 仅音乐播放模式有效
|
|
2610
|
-
* @param {string | number} vid 歌曲vid
|
|
2611
|
-
* @memberof VePlayer
|
|
2612
|
-
*/
|
|
2613
|
-
musicRemove(vid: string | number): void;
|
|
2614
|
-
/**
|
|
2615
|
-
* 设置ab循环
|
|
2616
|
-
* @param { number | IABCycle } start
|
|
2617
|
-
* @param { number } [end]
|
|
2618
|
-
* @param { boolean } [loop]
|
|
2619
|
-
* @param {{ [propName: string]: any }} [ext]
|
|
2620
|
-
* @memberof VePlayer
|
|
2621
|
-
*/
|
|
2622
|
-
musicSetAbCycle(start: number | IABCycle, end?: number, loop?: boolean, ext?: {
|
|
2623
|
-
[propName: string]: any;
|
|
2624
|
-
}): void;
|
|
2625
|
-
/**
|
|
2626
|
-
* 移除ab循环
|
|
2627
|
-
* @memberof VePlayer
|
|
2628
|
-
*/
|
|
2629
|
-
musicRemoveAbCycle(): void;
|
|
2630
|
-
/**
|
|
2631
|
-
* 获取质量日志上报的用户id
|
|
2632
|
-
* @return {string | undefined}
|
|
2633
|
-
*/
|
|
2634
|
-
getLogUserId(): any;
|
|
2635
|
-
/**
|
|
2636
|
-
* 销毁当前播放器SDK实例
|
|
2637
|
-
*
|
|
2638
|
-
* @memberof VePlayer
|
|
2639
|
-
*/
|
|
2640
|
-
destroy(): Promise<void>;
|
|
2641
|
-
}
|
|
2642
|
-
export declare function getI18N(): typeof I18N;
|
|
2643
|
-
declare class MusicPreset {
|
|
2644
|
-
ignores: string[];
|
|
2645
|
-
plugins: any[];
|
|
2646
|
-
constructor(options: any, playerConfig: any);
|
|
2647
|
-
}
|
|
2648
|
-
export interface ISubTitles {
|
|
2649
|
-
timestamp: number;
|
|
2650
|
-
text: string;
|
|
2651
|
-
duration: number;
|
|
2652
|
-
url: string;
|
|
2653
|
-
lang: string;
|
|
2654
|
-
delimiter?: string;
|
|
2655
|
-
textArr?: string[];
|
|
2656
|
-
wordpiece?: any[];
|
|
2657
|
-
}
|
|
2658
|
-
export interface ISubTitlesState {
|
|
2659
|
-
showLang: string;
|
|
2660
|
-
subTitleList: ISubTitles[];
|
|
2661
|
-
rtmpDtsGap: number;
|
|
2662
|
-
showingSubtitle: string;
|
|
2663
|
-
currentSub: any;
|
|
2664
|
-
dtsBase: number;
|
|
2665
|
-
}
|
|
2666
|
-
declare class LiveSubTitlesPlugin extends Plugin {
|
|
2667
|
-
static get pluginName(): string;
|
|
2668
|
-
static get defaultConfig(): {
|
|
2669
|
-
position: string;
|
|
2670
|
-
showLang: string;
|
|
2671
|
-
};
|
|
2672
|
-
constructor(configs: any);
|
|
2673
|
-
state: ISubTitlesState;
|
|
2674
|
-
clearLineTimer: any;
|
|
2675
|
-
showTimer: any;
|
|
2676
|
-
beforePlayerInit(): void;
|
|
2677
|
-
onPause(): void;
|
|
2678
|
-
onPlay(): void;
|
|
2679
|
-
destroy(): void;
|
|
2680
|
-
clearRtmpDtsGap(): void;
|
|
2681
|
-
clearSubTitle(isClearScreen: boolean): void;
|
|
2682
|
-
getIsSoft(): boolean;
|
|
2683
|
-
handleVideoTimeupdate(data: any): void;
|
|
2684
|
-
renderSubtitle(subTitle: ISubTitles): void;
|
|
2685
|
-
handleSEIParsed(sei: any, originPts?: any): void;
|
|
2686
|
-
insertSubTitle(...subTitles: ISubTitles[]): void;
|
|
2687
|
-
setCurrentLang(lang: string): void;
|
|
2688
|
-
adjustSubTitleTime(time: number): number;
|
|
2689
|
-
findSubTitleByTime(currentTime: number): {
|
|
2690
|
-
delimiter: string;
|
|
2691
|
-
textArr: string[];
|
|
2692
|
-
timestamp: number;
|
|
2693
|
-
text: string;
|
|
2694
|
-
duration: number;
|
|
2695
|
-
url: string;
|
|
2696
|
-
lang: string;
|
|
2697
|
-
wordpiece?: any[];
|
|
2698
|
-
};
|
|
2699
|
-
splitSubTitle(subTitle: ISubTitles): {
|
|
2700
|
-
delimiter: string;
|
|
2701
|
-
textArr: string[];
|
|
2702
|
-
timestamp: number;
|
|
2703
|
-
text: string;
|
|
2704
|
-
duration: number;
|
|
2705
|
-
url: string;
|
|
2706
|
-
lang: string;
|
|
2707
|
-
wordpiece?: any[];
|
|
2708
|
-
};
|
|
2709
|
-
showSurplus(): void;
|
|
2710
|
-
createNewDom(parent: HTMLElement): HTMLSpanElement;
|
|
2711
|
-
test(): void;
|
|
2712
|
-
getPlayTime(): void;
|
|
2713
|
-
resetDom(el: HTMLElement): void;
|
|
2714
|
-
render(): string;
|
|
2715
|
-
}
|
|
2716
|
-
export declare class LiveSubtitlesIconPlugin extends Plugin {
|
|
2717
|
-
static get pluginName(): string;
|
|
2718
|
-
static get defaultConfig(): {
|
|
2719
|
-
position: string;
|
|
2720
|
-
index: number;
|
|
2721
|
-
defaultOpen: boolean;
|
|
2722
|
-
default: string;
|
|
2723
|
-
list: {
|
|
2724
|
-
key: string;
|
|
2725
|
-
showText: string;
|
|
2726
|
-
}[];
|
|
2727
|
-
};
|
|
2728
|
-
isMobile: boolean;
|
|
2729
|
-
isOpenState: boolean;
|
|
2730
|
-
optionList: any;
|
|
2731
|
-
currentLang: string;
|
|
2732
|
-
constructor(configs: any);
|
|
2733
|
-
afterCreate(): void;
|
|
2734
|
-
afterPlayerInit(): void;
|
|
2735
|
-
registerIcons(): {
|
|
2736
|
-
aiSubOpen: {
|
|
2737
|
-
icon: any;
|
|
2738
|
-
class: string;
|
|
2739
|
-
};
|
|
2740
|
-
aiSubClose: {
|
|
2741
|
-
icon: any;
|
|
2742
|
-
class: string;
|
|
2743
|
-
};
|
|
2744
|
-
};
|
|
2745
|
-
registerLanguageTexts(): {
|
|
2746
|
-
sub: {
|
|
2747
|
-
jp: string;
|
|
2748
|
-
en: string;
|
|
2749
|
-
zh: string;
|
|
2750
|
-
"zh-hk": string;
|
|
2751
|
-
};
|
|
2752
|
-
subOpen: {
|
|
2753
|
-
jp: string;
|
|
2754
|
-
en: string;
|
|
2755
|
-
zh: string;
|
|
2756
|
-
"zh-hk": string;
|
|
2757
|
-
};
|
|
2758
|
-
subClose: {
|
|
2759
|
-
jp: string;
|
|
2760
|
-
en: string;
|
|
2761
|
-
zh: string;
|
|
2762
|
-
"zh-hk": string;
|
|
2763
|
-
};
|
|
2764
|
-
};
|
|
2765
|
-
children(): {
|
|
2766
|
-
LiveSubTitlesPlugin: {
|
|
2767
|
-
plugin: typeof LiveSubTitlesPlugin;
|
|
2768
|
-
options: {
|
|
2769
|
-
root: HTMLElement;
|
|
2770
|
-
showLang: string;
|
|
2771
|
-
};
|
|
2772
|
-
};
|
|
2773
|
-
};
|
|
2774
|
-
initEvents(): void;
|
|
2775
|
-
handleButtonChange(): void;
|
|
2776
|
-
showMobilePanel(): void;
|
|
2777
|
-
renderItemList(): HTMLElement;
|
|
2778
|
-
renderItem(item: any): HTMLElement;
|
|
2779
|
-
updatePanel(): void;
|
|
2780
|
-
showPanel(): void;
|
|
2781
|
-
hidePanel(): void;
|
|
2782
|
-
open(isInit?: boolean): void;
|
|
2783
|
-
close(): void;
|
|
2784
|
-
renderOptionList(): void;
|
|
2785
|
-
changeSubTitleLang(key: string, isInit?: boolean): void;
|
|
2786
|
-
toggleSubTitle(): void;
|
|
2787
|
-
destroy(): void;
|
|
2788
|
-
render(): string;
|
|
2789
|
-
}
|
|
2790
|
-
export interface IPanelItem {
|
|
2791
|
-
showText: string;
|
|
2792
|
-
selected: boolean;
|
|
2793
|
-
language?: string | number;
|
|
2794
|
-
"data-id"?: number | string;
|
|
2795
|
-
"data-type"?: string;
|
|
2796
|
-
}
|
|
2797
|
-
export declare class Subtitle extends Plugin {
|
|
2798
|
-
constructor(args: any);
|
|
2799
|
-
static get pluginName(): string;
|
|
2800
|
-
static get defaultConfig(): {
|
|
2801
|
-
position: string;
|
|
2802
|
-
index: number;
|
|
2803
|
-
list: any[];
|
|
2804
|
-
isDefaultOpen: boolean;
|
|
2805
|
-
style: {
|
|
2806
|
-
follow: boolean;
|
|
2807
|
-
mode: string;
|
|
2808
|
-
followBottom: number;
|
|
2809
|
-
fitVideo: boolean;
|
|
2810
|
-
offsetBottom: number;
|
|
2811
|
-
baseSizeX: number;
|
|
2812
|
-
baseSizeY: number;
|
|
2813
|
-
minSize: number;
|
|
2814
|
-
minMobileSize: number;
|
|
2815
|
-
line: string;
|
|
2816
|
-
fontColor: string;
|
|
2817
|
-
};
|
|
2818
|
-
isShowIcon: boolean;
|
|
2819
|
-
mode: string;
|
|
2820
|
-
updateMode: string;
|
|
2821
|
-
};
|
|
2822
|
-
private _delegates;
|
|
2823
|
-
isOpenState: boolean;
|
|
2824
|
-
optionList: any;
|
|
2825
|
-
currentLang: string;
|
|
2826
|
-
subTitles: any;
|
|
2827
|
-
curIndex: number;
|
|
2828
|
-
curItem: ISubTitleItem;
|
|
2829
|
-
afterCreate(): void;
|
|
2830
|
-
/**
|
|
2831
|
-
* @description 初始化原生字幕
|
|
2832
|
-
*
|
|
2833
|
-
*/
|
|
2834
|
-
_initNativeSubtitle(defaultIndex: any): void;
|
|
2835
|
-
/**
|
|
2836
|
-
* 初始化外挂字幕
|
|
2837
|
-
* @param {number} defaultIndex
|
|
2838
|
-
*/
|
|
2839
|
-
_initExtSubTitle(defaultIndex: any): void;
|
|
2840
|
-
_renderList(defaultIndex: any): void;
|
|
2841
|
-
_onOff(): void;
|
|
2842
|
-
_onChange(data: any): void;
|
|
2843
|
-
_onListReset(data: any): void;
|
|
2844
|
-
updateCurItem(cIndex: any, subtitle: any): void;
|
|
2845
|
-
initEvents(): void;
|
|
2846
|
-
handleButtonChange(e: any): void;
|
|
2847
|
-
showList(): void;
|
|
2848
|
-
hideList(): void;
|
|
2849
|
-
openSubtitle(): void;
|
|
2850
|
-
getSubTitleIndex(list: any, subtitle?: {
|
|
2851
|
-
id: string;
|
|
2852
|
-
language: string;
|
|
2853
|
-
}): number;
|
|
2854
|
-
registerIcons(): {
|
|
2855
|
-
vttSubOpen: {
|
|
2856
|
-
icon: any;
|
|
2857
|
-
class: string;
|
|
2858
|
-
};
|
|
2859
|
-
vttSubClose: {
|
|
2860
|
-
icon: any;
|
|
2861
|
-
class: string;
|
|
2862
|
-
};
|
|
2863
|
-
};
|
|
2864
|
-
registerLanguageTexts(): {
|
|
2865
|
-
sub: {
|
|
2866
|
-
jp: string;
|
|
2867
|
-
en: string;
|
|
2868
|
-
zh: string;
|
|
2869
|
-
"zh-hk": string;
|
|
2870
|
-
};
|
|
2871
|
-
subOpen: {
|
|
2872
|
-
jp: string;
|
|
2873
|
-
en: string;
|
|
2874
|
-
zh: string;
|
|
2875
|
-
"zh-hk": string;
|
|
2876
|
-
};
|
|
2877
|
-
subClose: {
|
|
2878
|
-
jp: string;
|
|
2879
|
-
en: string;
|
|
2880
|
-
zh: string;
|
|
2881
|
-
"zh-hk": string;
|
|
2882
|
-
};
|
|
2883
|
-
};
|
|
2884
|
-
creatOptionList(): void;
|
|
2885
|
-
getList(): any;
|
|
2886
|
-
renderOptionList(): void;
|
|
2887
|
-
handlerClickSwitch: (e: any, data: any) => void;
|
|
2888
|
-
/**
|
|
2889
|
-
*
|
|
2890
|
-
* @param {ISubTitleItem} subtitle
|
|
2891
|
-
* @returns
|
|
2892
|
-
*/
|
|
2893
|
-
switchSubTitle(subtitle?: ISubTitleItem): any;
|
|
2894
|
-
switchOffSubtitle(): void;
|
|
2895
|
-
noShowSubtitle(): void;
|
|
2896
|
-
renderItemList(): void;
|
|
2897
|
-
/**
|
|
2898
|
-
*
|
|
2899
|
-
* @param { Array<SubTitleItem> } list
|
|
2900
|
-
* @param { boolean } needRemove 是否移除原来的字幕
|
|
2901
|
-
*/
|
|
2902
|
-
updateSubtitles(list?: any[], needRemove?: boolean): void;
|
|
2903
|
-
updateList(data?: {}): void;
|
|
2904
|
-
changeTipText(): void;
|
|
2905
|
-
showMobilePanel(): void;
|
|
2906
|
-
updatePanel(): void;
|
|
2907
|
-
renderPanel(): HTMLElement;
|
|
2908
|
-
renderPanelItem(item: IPanelItem): HTMLElement;
|
|
2909
|
-
getTextByLang(item: any, key?: any, lang?: any): any;
|
|
2910
|
-
onPlayerFocus: (e: any) => void;
|
|
2911
|
-
onPlayerBlur: (e: any) => void;
|
|
2912
|
-
rePosition(): void;
|
|
2913
|
-
destroy(): void;
|
|
2914
|
-
render(): string;
|
|
2915
|
-
}
|
|
2916
|
-
export declare class DefinitionDemotePlugin extends Plugin {
|
|
2917
|
-
static get pluginName(): string;
|
|
2918
|
-
waitings: number[];
|
|
2919
|
-
timer: any;
|
|
2920
|
-
longWaitingEmitTime: number;
|
|
2921
|
-
waitingStartTime: number;
|
|
2922
|
-
playerData: any;
|
|
2923
|
-
isNeedShowTips: boolean;
|
|
2924
|
-
static get defaultConfig(): {
|
|
2925
|
-
oftenWaitingCount: number;
|
|
2926
|
-
oftenWaitingTime: number;
|
|
2927
|
-
longWaitingTime: number;
|
|
2928
|
-
isNeedAutoDemote: boolean;
|
|
2929
|
-
demotePriority: any[];
|
|
2930
|
-
};
|
|
2931
|
-
constructor(args: any);
|
|
2932
|
-
registerLanguageTexts(): {
|
|
2933
|
-
definition_demote_txt: {
|
|
2934
|
-
jp: string;
|
|
2935
|
-
en: string;
|
|
2936
|
-
zh: string;
|
|
2937
|
-
"zh-hk": string;
|
|
2938
|
-
};
|
|
2939
|
-
};
|
|
2940
|
-
afterCreate(): void;
|
|
2941
|
-
bindCtx(): void;
|
|
2942
|
-
bindEvents(): void;
|
|
2943
|
-
_waiting(): void;
|
|
2944
|
-
_count(): void;
|
|
2945
|
-
_time(): void;
|
|
2946
|
-
_clearTime(): void;
|
|
2947
|
-
clearState(): void;
|
|
2948
|
-
demote(): void;
|
|
2949
|
-
changeUrl(url: any): void;
|
|
2950
|
-
showToast(definition: any): void;
|
|
2951
|
-
destroy(): void;
|
|
2952
|
-
}
|
|
2953
|
-
export declare class TimeShiftPlugin extends Plugin {
|
|
2954
|
-
static get pluginName(): string;
|
|
2955
|
-
static get defaultConfig(): {
|
|
2956
|
-
position: string;
|
|
2957
|
-
livingStartTime: number;
|
|
2958
|
-
maxMoveTime: number;
|
|
2959
|
-
currentTime: number;
|
|
2960
|
-
timeShiftUrl: string;
|
|
2961
|
-
cardList: any[];
|
|
2962
|
-
};
|
|
2963
|
-
isMobile: boolean;
|
|
2964
|
-
playedBar: any;
|
|
2965
|
-
cachedBar: any;
|
|
2966
|
-
innerBar: any;
|
|
2967
|
-
progressBtn: any;
|
|
2968
|
-
progressPoint: any;
|
|
2969
|
-
backLiveBt: any;
|
|
2970
|
-
cardDomList: any[];
|
|
2971
|
-
initTime: number;
|
|
2972
|
-
liveGap: number;
|
|
2973
|
-
shiftTimeGap: number;
|
|
2974
|
-
isProgressMoving: boolean;
|
|
2975
|
-
isPlayTimeShift: boolean;
|
|
2976
|
-
private liveUrl;
|
|
2977
|
-
get duration(): any;
|
|
2978
|
-
registerLanguageTexts(): {
|
|
2979
|
-
BACKLIVE: {
|
|
2980
|
-
jp: string;
|
|
2981
|
-
en: string;
|
|
2982
|
-
zh: string;
|
|
2983
|
-
"zh-hk": string;
|
|
2984
|
-
};
|
|
2985
|
-
};
|
|
2986
|
-
updateLang(): void;
|
|
2987
|
-
afterCreate(): void;
|
|
2988
|
-
clacTime(): void;
|
|
2989
|
-
initEvents(): void;
|
|
2990
|
-
bindDomEvents(): void;
|
|
2991
|
-
handleTimeUpdate(): void;
|
|
2992
|
-
onBodyClick: (e: any) => void;
|
|
2993
|
-
handleMouseDown(e: any): void;
|
|
2994
|
-
handleMouseMove(e: any): void;
|
|
2995
|
-
handleMouseUp(e: any): void;
|
|
2996
|
-
handleMouseEnter(e: any): void;
|
|
2997
|
-
handleMouseLeave(): void;
|
|
2998
|
-
focus(): void;
|
|
2999
|
-
blur(): void;
|
|
3000
|
-
computeTime(e: any): {
|
|
3001
|
-
percent: number;
|
|
3002
|
-
offset: number;
|
|
3003
|
-
width: any;
|
|
3004
|
-
left: any;
|
|
3005
|
-
e: any;
|
|
3006
|
-
};
|
|
3007
|
-
tipsUpdate(e: any): void;
|
|
3008
|
-
updateShiftTime(percent: number): void;
|
|
3009
|
-
getCurrentProgress(): number;
|
|
3010
|
-
progressUpdate(): void;
|
|
3011
|
-
changeTimeShift(time: any): void;
|
|
3012
|
-
changeTimeUrl(): void;
|
|
3013
|
-
createBackLiveBtDom(): any;
|
|
3014
|
-
backLive(): void;
|
|
3015
|
-
toggleBackButton(): void;
|
|
3016
|
-
updateCardList(cardList: any): void;
|
|
3017
|
-
clearCardDom(): void;
|
|
3018
|
-
createTimeShiftCard(): void;
|
|
3019
|
-
renderCard(card: any): void;
|
|
3020
|
-
cardProcessUpdate(): void;
|
|
3021
|
-
calcCardProcess(time: any): number;
|
|
3022
|
-
destroy(): void;
|
|
3023
|
-
render(): string;
|
|
3024
|
-
}
|
|
3025
|
-
export declare class MirrorPlugin extends Plugin {
|
|
3026
|
-
static get pluginName(): string;
|
|
3027
|
-
static get defaultConfig(): {
|
|
3028
|
-
position: string;
|
|
3029
|
-
index: number;
|
|
3030
|
-
disable: boolean;
|
|
3031
|
-
defaultEnable: boolean;
|
|
3032
|
-
};
|
|
3033
|
-
isEnableMirror: boolean;
|
|
3034
|
-
constructor(args: any);
|
|
3035
|
-
afterCreate(): void;
|
|
3036
|
-
registerIcons(): {
|
|
3037
|
-
[x: string]: {
|
|
3038
|
-
icon: any;
|
|
3039
|
-
class: string;
|
|
3040
|
-
};
|
|
3041
|
-
};
|
|
3042
|
-
initIcons(): void;
|
|
3043
|
-
registerLanguageTexts(): {
|
|
3044
|
-
getMirror: {
|
|
3045
|
-
jp: string;
|
|
3046
|
-
en: string;
|
|
3047
|
-
zh: string;
|
|
3048
|
-
"zh-hk": string;
|
|
3049
|
-
};
|
|
3050
|
-
exitMirror: {
|
|
3051
|
-
jp: string;
|
|
3052
|
-
en: string;
|
|
3053
|
-
zh: string;
|
|
3054
|
-
"zh-hk": string;
|
|
3055
|
-
};
|
|
3056
|
-
};
|
|
3057
|
-
btnClick(e: any): void;
|
|
3058
|
-
action(flag: any): void;
|
|
3059
|
-
updateMirrorState(isEnableMirror: any): void;
|
|
3060
|
-
animate(isEnableMirror: any): void;
|
|
3061
|
-
switchTips(isEnableMirror: any): void;
|
|
3062
|
-
destroy(): void;
|
|
3063
|
-
render(): string;
|
|
3064
|
-
}
|
|
3065
|
-
declare class ToastPlugin extends Plugin {
|
|
3066
|
-
static get pluginName(): string;
|
|
3067
|
-
static get defaultConfig(): {
|
|
3068
|
-
index: number;
|
|
3069
|
-
};
|
|
3070
|
-
constructor(args: any);
|
|
3071
|
-
private toastNumber;
|
|
3072
|
-
private toastMaps;
|
|
3073
|
-
beforePlayerInit(): void;
|
|
3074
|
-
afterPlayerInit(): void;
|
|
3075
|
-
afterCreate(): void;
|
|
3076
|
-
destroy(): void;
|
|
3077
|
-
add(content: string | HTMLElement, duration?: number, isNeedCloseBt?: boolean): number;
|
|
3078
|
-
remove(id: number): void;
|
|
3079
|
-
renderToast(content: string | HTMLElement, isNeedCloseBt: any, id: any): HTMLElement;
|
|
3080
|
-
render(): string;
|
|
3081
|
-
}
|
|
3082
|
-
export declare class MemoryPlay extends Plugin {
|
|
3083
|
-
static get pluginName(): string;
|
|
3084
|
-
static get defaultConfig(): {
|
|
3085
|
-
getTime: any;
|
|
3086
|
-
saveTime: any;
|
|
3087
|
-
memoryId: string;
|
|
3088
|
-
};
|
|
3089
|
-
startTime: number;
|
|
3090
|
-
saveTimeFun: (id: number | string, time: number) => unknown;
|
|
3091
|
-
getTimeFun: (id: number | string) => number | Promise<number>;
|
|
3092
|
-
memoryId: number | string;
|
|
3093
|
-
canJump: boolean;
|
|
3094
|
-
constructor(args: any);
|
|
3095
|
-
registerLanguageTexts(): {
|
|
3096
|
-
preText: {
|
|
3097
|
-
jp: string;
|
|
3098
|
-
en: string;
|
|
3099
|
-
zh: string;
|
|
3100
|
-
"zh-hk": string;
|
|
3101
|
-
};
|
|
3102
|
-
};
|
|
3103
|
-
children(): {
|
|
3104
|
-
toast: typeof ToastPlugin;
|
|
3105
|
-
};
|
|
3106
|
-
afterCreate(): void;
|
|
3107
|
-
beforePlayerInit(): Promise<void>;
|
|
3108
|
-
destroy(): void;
|
|
3109
|
-
getTime(): Promise<void>;
|
|
3110
|
-
setSave(): void;
|
|
3111
|
-
showToast(): void;
|
|
3112
|
-
saveTimeByStorage(memoryId: any, time: any): void;
|
|
3113
|
-
getTimeByStorage(memoryId: any): string;
|
|
3114
|
-
}
|
|
3115
|
-
export declare type InfoItem = {
|
|
3116
|
-
key: string;
|
|
3117
|
-
label: string;
|
|
3118
|
-
labelTextKey?: string;
|
|
3119
|
-
value?: any;
|
|
3120
|
-
render?: (key: any) => string;
|
|
3121
|
-
type?: string;
|
|
3122
|
-
dom?: Element;
|
|
3123
|
-
};
|
|
3124
|
-
/**
|
|
3125
|
-
* 直播信息面板
|
|
3126
|
-
*/
|
|
3127
|
-
export declare class LiveInfoPanel extends Plugin {
|
|
3128
|
-
private _pollTimer;
|
|
3129
|
-
private _infoItems;
|
|
3130
|
-
static get pluginName(): string;
|
|
3131
|
-
static get defaultConfig(): {
|
|
3132
|
-
visible: boolean;
|
|
3133
|
-
showH265Info: boolean;
|
|
3134
|
-
};
|
|
3135
|
-
get streamType(): any;
|
|
3136
|
-
afterCreate(): void;
|
|
3137
|
-
registerLanguageTexts(): {
|
|
3138
|
-
DECODEFPS: {
|
|
3139
|
-
en: string;
|
|
3140
|
-
zh: string;
|
|
3141
|
-
};
|
|
3142
|
-
DECODECOST: {
|
|
3143
|
-
en: string;
|
|
3144
|
-
zh: string;
|
|
3145
|
-
};
|
|
3146
|
-
FORMAT: {
|
|
3147
|
-
en: string;
|
|
3148
|
-
zh: string;
|
|
3149
|
-
};
|
|
3150
|
-
FPS: {
|
|
3151
|
-
en: string;
|
|
3152
|
-
zh: string;
|
|
3153
|
-
};
|
|
3154
|
-
BITRATE: {
|
|
3155
|
-
en: string;
|
|
3156
|
-
zh: string;
|
|
3157
|
-
};
|
|
3158
|
-
GOP: {
|
|
3159
|
-
en: string;
|
|
3160
|
-
zh: string;
|
|
3161
|
-
};
|
|
3162
|
-
RESOLUTION: {
|
|
3163
|
-
en: string;
|
|
3164
|
-
zh: string;
|
|
3165
|
-
};
|
|
3166
|
-
ENCODETYPE: {
|
|
3167
|
-
en: string;
|
|
3168
|
-
zh: string;
|
|
3169
|
-
};
|
|
3170
|
-
BUFFEREND: {
|
|
3171
|
-
en: string;
|
|
3172
|
-
zh: string;
|
|
3173
|
-
};
|
|
3174
|
-
CURRENTTIME: {
|
|
3175
|
-
en: string;
|
|
3176
|
-
zh: string;
|
|
3177
|
-
};
|
|
3178
|
-
};
|
|
3179
|
-
_getDefaultInfo(data: any): Record<string, InfoItem>;
|
|
3180
|
-
_init(): void;
|
|
3181
|
-
_getStats(): any;
|
|
3182
|
-
_getInfoListData(): Record<string, InfoItem>;
|
|
3183
|
-
_initDom(infoItems: any): any;
|
|
3184
|
-
_updateTitle(rowDom: Element, item: InfoItem): void;
|
|
3185
|
-
_updateDom(rowdom: Element, newItem: InfoItem): void;
|
|
3186
|
-
_renderLabel(item: InfoItem): any;
|
|
3187
|
-
_renderValue(item: InfoItem): any;
|
|
3188
|
-
_handleDataChange(): void;
|
|
3189
|
-
_tick(): void;
|
|
3190
|
-
_poll(): void;
|
|
3191
|
-
destroy(): void;
|
|
3192
|
-
_handleError(): void;
|
|
3193
|
-
_handleLoadedData(): void;
|
|
3194
|
-
_open(): void;
|
|
3195
|
-
_close(): void;
|
|
3196
|
-
open(): void;
|
|
3197
|
-
close(): void;
|
|
3198
|
-
render(): string;
|
|
3199
|
-
}
|
|
3200
|
-
export declare class SdkPlugin {
|
|
3201
|
-
pluginName: string;
|
|
3202
|
-
__args: any;
|
|
3203
|
-
sdk: VePlayer;
|
|
3204
|
-
playerData: PlayerData;
|
|
3205
|
-
player: Player;
|
|
3206
|
-
_emitter: EventEmitter;
|
|
3207
|
-
static defineGetterOrSetter(Obj: any, map: any): void;
|
|
3208
|
-
/**
|
|
3209
|
-
* @type { string }
|
|
3210
|
-
*/
|
|
3211
|
-
static get pluginName(): string;
|
|
3212
|
-
/**
|
|
3213
|
-
* @constructor
|
|
3214
|
-
* @param { { sdk: object, pluginName: string, [propName: string]: any;} } args
|
|
3215
|
-
*/
|
|
3216
|
-
constructor(args: any);
|
|
3217
|
-
/**
|
|
3218
|
-
* @description sdk实例创建,挂载插件实例时首先执行
|
|
3219
|
-
*/
|
|
3220
|
-
beforeCreate(): void;
|
|
3221
|
-
/**
|
|
3222
|
-
* @description sdk实例创建,挂载插件实例完后执行
|
|
3223
|
-
*/
|
|
3224
|
-
afterCreate(): void;
|
|
3225
|
-
/**
|
|
3226
|
-
* @description sdk创建播放器前执行,只有这里能保证异步操作在creatPlayer之前同步完成
|
|
3227
|
-
*/
|
|
3228
|
-
beforePlayerCreate(): void;
|
|
3229
|
-
/**
|
|
3230
|
-
* @description sdk创建播放器完执行
|
|
3231
|
-
*/
|
|
3232
|
-
afterPlayerCreate(): void;
|
|
3233
|
-
/**
|
|
3234
|
-
* @description sdk销毁时执行
|
|
3235
|
-
*/
|
|
3236
|
-
destroy(): void;
|
|
3237
|
-
/**
|
|
3238
|
-
* @private
|
|
3239
|
-
* @param { any } args
|
|
3240
|
-
*/
|
|
3241
|
-
__init(args: any): void;
|
|
3242
|
-
/**
|
|
3243
|
-
* @description 插件销毁
|
|
3244
|
-
* @private
|
|
3245
|
-
*/
|
|
3246
|
-
__destroy(): void;
|
|
3247
|
-
}
|
|
3248
|
-
export * from "xgplayer";
|
|
3249
|
-
|
|
3250
|
-
export {
|
|
3251
|
-
LiveSubTitlesPlugin as LiveSubtitlesPlugin,
|
|
3252
|
-
MusicPreset as Music,
|
|
3253
|
-
VePlayer as default,
|
|
3254
|
-
};
|
|
3255
|
-
|
|
3256
|
-
export {};
|