@volcengine/veplayer 1.8.2-rc.0 → 1.8.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +768 -1460
- package/index.min.css +1 -1
- package/index.min.js +2 -2
- package/package.json +5 -1
- package/plugin/XGVideo.js +0 -2
- package/plugin/danmuMask.js +0 -2
- package/plugin/danmujs.js +0 -2
- package/plugin/dash.js +0 -2
- package/plugin/flv.js +0 -2
- package/plugin/hls.js +0 -2
- package/plugin/hlsEncrypt.js +0 -2
- package/plugin/mp4Encrypt.js +0 -2
- package/plugin/streamprobe.js +0 -2
- package/plugin/vestrategy.js +0 -1
- package/plugin/vestrategy_h265.js +0 -1
package/index.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import VodLogger from '@byted/xgplayer-app-logger/es/logger.js';
|
|
|
2
2
|
import VeStrategy from '@volcengine/vestrategy';
|
|
3
3
|
import { StrategyRecommendation, VeStrategyInitOptions } from '@volcengine/vestrategy';
|
|
4
4
|
import { VeStrategyH265Config } from '@volcengine/vestrategy-h265';
|
|
5
|
+
import { Property } from 'dom-helpers/esm/types';
|
|
5
6
|
import EventEmitter from 'eventemitter3';
|
|
6
7
|
import Player from 'xgplayer';
|
|
7
|
-
import { BasePlugin, I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
8
|
+
import { BasePlugin, Events as XgEvents, I18N, IXGI18nText, Plugin } from 'xgplayer';
|
|
8
9
|
|
|
9
10
|
declare enum POSITIONS {
|
|
10
11
|
ROOT = "root",
|
|
@@ -16,83 +17,76 @@ declare enum POSITIONS {
|
|
|
16
17
|
CONTROLS_CENTER = "controlsCenter"
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
|
-
* @
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* @detail Options
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
* @interface ISdkErrorConfig
|
|
22
25
|
*/
|
|
23
26
|
export interface ISdkErrorConfig {
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
+
/**
|
|
28
|
+
* 报错时是否显示提示图片
|
|
29
|
+
* 默认:true
|
|
30
|
+
*
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
* @memberof ISdkErrorConfig
|
|
27
33
|
*/
|
|
28
34
|
errorImg?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
35
|
+
/**
|
|
36
|
+
* 报错时是否展示
|
|
37
|
+
* 默认:true
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof ISdkErrorConfig
|
|
32
41
|
*/
|
|
33
42
|
errorTips?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
43
|
+
/**
|
|
44
|
+
* 报错时是否展示“刷新”按钮
|
|
45
|
+
* 默认:true
|
|
46
|
+
*
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
* @memberof ISdkErrorConfig
|
|
37
49
|
*/
|
|
38
50
|
isNeedRefreshButton?: boolean;
|
|
39
|
-
/** {zh}
|
|
40
|
-
* @brief 报错后是否进行降级,true则降级到playlist中相应 backUrlList字段(type为 rtm 不能设置true)
|
|
41
|
-
* @default false
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
isNeedDemoteBack?: boolean;
|
|
45
|
-
/** {zh}
|
|
46
|
-
* @brief 报错后重试次数
|
|
47
|
-
* @default 1
|
|
48
|
-
*/
|
|
49
|
-
retryLoopNum?: number;
|
|
50
|
-
/** {zh}
|
|
51
|
-
* @brief 报错后提示文案
|
|
52
|
-
* @default 播放发生错误,点击刷新试试吧
|
|
53
|
-
*/
|
|
54
|
-
/** {en}
|
|
55
|
-
* @brief Prompt copy after error
|
|
56
|
-
* @default An error occurred while playing, click refresh to try
|
|
57
|
-
*/
|
|
58
|
-
errorTipsText?: TipsTextConfig;
|
|
59
|
-
/** {zh}
|
|
60
|
-
* @hidden
|
|
61
|
-
* @brief 播放器中所处的位置
|
|
62
|
-
*/
|
|
63
|
-
position?: POSITIONS;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* @list Options
|
|
67
|
-
* @brief 错误文案配置
|
|
68
|
-
* @kind property
|
|
69
|
-
*/
|
|
70
|
-
export interface TipsTextConfig {
|
|
71
51
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
52
|
+
* 报错后是否进行降级,true则降级到playlist中相应 backUrlList字段(type为 rtm 不能设置true)
|
|
53
|
+
* 默认:false
|
|
54
|
+
*
|
|
55
|
+
* @type {boolean}
|
|
56
|
+
* @memberof ISdkErrorConfig
|
|
74
57
|
*/
|
|
75
|
-
|
|
58
|
+
isNeedDemoteBack?: boolean;
|
|
76
59
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
60
|
+
*
|
|
61
|
+
* 报错后重试次数
|
|
62
|
+
* 默认: 1
|
|
63
|
+
*
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof ISdkErrorConfig
|
|
79
66
|
*/
|
|
80
|
-
|
|
67
|
+
retryLoopNum?: number;
|
|
81
68
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
69
|
+
*
|
|
70
|
+
* 报错后提示文案
|
|
71
|
+
* 默认:播放发生错误,点击刷新试试吧
|
|
72
|
+
*
|
|
73
|
+
* @type {(HTMLElement | string)}
|
|
74
|
+
* @memberof ISdkErrorConfig
|
|
84
75
|
*/
|
|
85
|
-
|
|
76
|
+
errorTipsText?: HTMLElement | string;
|
|
86
77
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @
|
|
78
|
+
* 播放器中所处的位置
|
|
79
|
+
* @hidden
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof ISdkErrorConfig
|
|
89
82
|
*/
|
|
90
|
-
|
|
83
|
+
position?: POSITIONS;
|
|
91
84
|
}
|
|
92
85
|
/**
|
|
93
|
-
* @
|
|
94
|
-
*
|
|
95
|
-
*
|
|
86
|
+
* @detail Options
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* @export
|
|
96
90
|
* @interface IRtmConfig
|
|
97
91
|
*/
|
|
98
92
|
export interface IRtmConfig {
|
|
@@ -146,58 +140,87 @@ export interface IRtmConfig {
|
|
|
146
140
|
backupStreamType: "hls" | "flv";
|
|
147
141
|
}
|
|
148
142
|
/**
|
|
143
|
+
* @detail Options
|
|
149
144
|
* @brief 弹幕相关设置
|
|
150
|
-
*
|
|
151
|
-
* @
|
|
145
|
+
*
|
|
146
|
+
* @export
|
|
147
|
+
* @interface InitConfig
|
|
152
148
|
*/
|
|
153
|
-
export interface
|
|
149
|
+
export interface InitConfig {
|
|
154
150
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
151
|
+
* 透明度, 枚举值[0, 33, 66, 99], 实际对应0, 0.33, 0.66, 1
|
|
152
|
+
* 默认:99
|
|
153
|
+
*
|
|
154
|
+
* @type {number}
|
|
155
|
+
* @memberof InitConfig
|
|
157
156
|
*/
|
|
158
157
|
opacity?: number;
|
|
159
158
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
159
|
+
* 枚举值[0, 33, 66, 99] 实际对应1/4, 1/2, 3/4, 1
|
|
160
|
+
* 默认:99
|
|
161
|
+
*
|
|
162
|
+
* @type {number}
|
|
163
|
+
* @memberof InitConfig
|
|
162
164
|
*/
|
|
163
165
|
area?: number;
|
|
164
166
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
+
* 速度, 枚举值[0, 20, 40, 60, 80, 100], 实际对应1/4, 1/2,1,5/4,3/2,2
|
|
168
|
+
* 默认:40
|
|
169
|
+
*
|
|
170
|
+
* @type {number}
|
|
171
|
+
* @memberof InitConfig
|
|
167
172
|
*/
|
|
168
173
|
speed?: number;
|
|
169
174
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
175
|
+
* 字体大小, 枚举值[0, 50, 100],实际对应14px 16px 20px
|
|
176
|
+
* 默认:50
|
|
177
|
+
*
|
|
178
|
+
* @type {number}
|
|
179
|
+
* @memberof InitConfig
|
|
172
180
|
*/
|
|
173
181
|
fontSize?: number;
|
|
174
182
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
183
|
+
* 是否打开面板
|
|
184
|
+
* 默认:false
|
|
185
|
+
*
|
|
186
|
+
* @type {boolean}
|
|
187
|
+
* @memberof InitConfig
|
|
177
188
|
*/
|
|
178
189
|
active?: boolean;
|
|
179
190
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
191
|
+
* 是否展示弹幕设置面板
|
|
192
|
+
* 默认: true
|
|
193
|
+
*
|
|
194
|
+
* @type {boolean}
|
|
195
|
+
* @memberof InitConfig
|
|
182
196
|
*/
|
|
183
197
|
usePanel?: boolean;
|
|
184
198
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
199
|
+
* 弹幕列表
|
|
200
|
+
*
|
|
201
|
+
* @type {DanmuItem[]}
|
|
202
|
+
* @memberof InitConfig
|
|
187
203
|
*/
|
|
188
204
|
danmuItems?: DanmuItem[];
|
|
189
205
|
/**
|
|
190
206
|
* @hidden
|
|
207
|
+
*
|
|
191
208
|
* @type {ExternalItem[]}
|
|
192
|
-
* @memberof
|
|
209
|
+
* @memberof InitConfig
|
|
193
210
|
*/
|
|
194
211
|
external?: ExternalItem[];
|
|
195
212
|
/**
|
|
196
213
|
* @hidden
|
|
214
|
+
*
|
|
215
|
+
* @type {IMaskConfig}
|
|
216
|
+
* @memberof InitConfig
|
|
197
217
|
*/
|
|
198
218
|
maskConfig?: IMaskConfig;
|
|
199
219
|
/**
|
|
200
220
|
* @hidden
|
|
221
|
+
*
|
|
222
|
+
* @type {boolean}
|
|
223
|
+
* @memberof InitConfig
|
|
201
224
|
*/
|
|
202
225
|
maskActive?: boolean;
|
|
203
226
|
}
|
|
@@ -212,9 +235,9 @@ export interface Lang {
|
|
|
212
235
|
[props: string]: string;
|
|
213
236
|
}
|
|
214
237
|
/**
|
|
215
|
-
* @
|
|
216
|
-
*
|
|
217
|
-
*
|
|
238
|
+
* @detail Options
|
|
239
|
+
*
|
|
240
|
+
*
|
|
218
241
|
* @export
|
|
219
242
|
* @interface DanmuItem
|
|
220
243
|
*/
|
|
@@ -235,7 +258,9 @@ export interface DanmuItem {
|
|
|
235
258
|
txt: string;
|
|
236
259
|
/**
|
|
237
260
|
* 弹幕出现时间, 单位为ms
|
|
238
|
-
*
|
|
261
|
+
*
|
|
262
|
+
* @type {number}
|
|
263
|
+
* @memberof DanmuItem
|
|
239
264
|
*/
|
|
240
265
|
start?: number;
|
|
241
266
|
/**
|
|
@@ -247,7 +272,6 @@ export interface DanmuItem {
|
|
|
247
272
|
prior?: boolean;
|
|
248
273
|
/**
|
|
249
274
|
* 弹幕持续显示时间, 单位为ms
|
|
250
|
-
* @default 5000
|
|
251
275
|
*
|
|
252
276
|
* @type {number}
|
|
253
277
|
* @memberof DanmuItem
|
|
@@ -255,18 +279,16 @@ export interface DanmuItem {
|
|
|
255
279
|
duration?: number;
|
|
256
280
|
/**
|
|
257
281
|
* 弹幕样式
|
|
258
|
-
* @example
|
|
259
|
-
* ``` javascript
|
|
260
282
|
* style : {
|
|
261
283
|
* color: '#ff9500',
|
|
262
284
|
* fontSize: '20px',
|
|
263
285
|
* padding: '2px 11px'
|
|
264
286
|
* }
|
|
265
|
-
|
|
287
|
+
*
|
|
266
288
|
* @type {Partial<Record<Property, string>>}
|
|
267
289
|
* @memberof DanmuItem
|
|
268
290
|
*/
|
|
269
|
-
style?:
|
|
291
|
+
style?: Partial<Record<Property, string>>;
|
|
270
292
|
}
|
|
271
293
|
export interface ExternalItem {
|
|
272
294
|
key: string;
|
|
@@ -275,9 +297,10 @@ export interface ExternalItem {
|
|
|
275
297
|
lang?: Lang;
|
|
276
298
|
}
|
|
277
299
|
/**
|
|
278
|
-
* @
|
|
279
|
-
*
|
|
280
|
-
* @
|
|
300
|
+
* @detail Options
|
|
301
|
+
*
|
|
302
|
+
* @export
|
|
303
|
+
* @interface ISubtitleConfig
|
|
281
304
|
*/
|
|
282
305
|
export interface ISubtitleConfig {
|
|
283
306
|
/**
|
|
@@ -286,164 +309,192 @@ export interface ISubtitleConfig {
|
|
|
286
309
|
*/
|
|
287
310
|
[propName: string]: any;
|
|
288
311
|
/**
|
|
289
|
-
*
|
|
290
|
-
*
|
|
312
|
+
* 图标位置
|
|
313
|
+
* 默认值:controlsRight
|
|
314
|
+
* @type {string}
|
|
315
|
+
* @memberof ISubtitleConfig
|
|
291
316
|
*/
|
|
292
317
|
position?: string;
|
|
293
318
|
/**
|
|
294
|
-
*
|
|
295
|
-
*
|
|
319
|
+
* 图标排列权重
|
|
320
|
+
* 默认值:6
|
|
321
|
+
* @type {number}
|
|
322
|
+
* @memberof ISubtitleConfig
|
|
296
323
|
*/
|
|
297
324
|
index?: number;
|
|
298
325
|
/**
|
|
299
|
-
*
|
|
300
|
-
*
|
|
326
|
+
* 字幕列表
|
|
327
|
+
* 默认值:无
|
|
328
|
+
* @type {Array<SubTitleItem>}
|
|
329
|
+
* @memberof ISubtitleConfig
|
|
301
330
|
*/
|
|
302
331
|
list?: Array<ISubTitleItem>;
|
|
303
332
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
333
|
+
* 是否默认打开
|
|
334
|
+
* 默认值:true
|
|
335
|
+
* @type {boolean}
|
|
336
|
+
* @memberof ISubtitleConfig
|
|
306
337
|
*/
|
|
307
338
|
isDefaultOpen?: boolean;
|
|
308
339
|
/**
|
|
309
|
-
*
|
|
310
|
-
*
|
|
340
|
+
* 是否显示图标
|
|
341
|
+
* 默认值:true
|
|
342
|
+
* @type {boolean}
|
|
343
|
+
* @memberof ISubtitleConfig
|
|
311
344
|
*/
|
|
312
345
|
isShowIcon?: boolean;
|
|
313
346
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
347
|
+
* 字幕渲染模式,外挂字幕或原生字幕
|
|
348
|
+
* 默认值:external
|
|
349
|
+
* @type {string}
|
|
350
|
+
* @memberof ISubtitleConfig
|
|
316
351
|
*/
|
|
317
352
|
mode?: "external" | "native";
|
|
318
353
|
/**
|
|
319
|
-
*
|
|
320
|
-
*
|
|
354
|
+
* 字幕更新模式,默认vod
|
|
355
|
+
* 默认值:vod
|
|
356
|
+
* @type {string}
|
|
357
|
+
* @memberof ISubtitleConfig
|
|
321
358
|
*/
|
|
322
359
|
updateMode?: "vod" | "live";
|
|
323
360
|
/**
|
|
324
|
-
*
|
|
325
|
-
*
|
|
361
|
+
* 字幕样式
|
|
362
|
+
* 默认值:无
|
|
363
|
+
* @type {ISubtitleStyle}
|
|
364
|
+
* @memberof ISubtitleConfig
|
|
326
365
|
*/
|
|
327
366
|
style?: ISubtitleStyle;
|
|
328
367
|
}
|
|
329
368
|
/**
|
|
330
|
-
* @
|
|
331
|
-
*
|
|
332
|
-
* @
|
|
369
|
+
* @detail Options
|
|
370
|
+
*
|
|
371
|
+
* @export
|
|
372
|
+
* @interface ISubtitleStyle
|
|
333
373
|
*/
|
|
334
374
|
export interface ISubtitleStyle {
|
|
335
375
|
/**
|
|
336
376
|
* 是否跟随控制栏调整位置
|
|
337
|
-
*
|
|
377
|
+
* 默认值:true
|
|
338
378
|
* @type {boolean | null}
|
|
339
379
|
* @memberof ISubtitleStyle
|
|
340
380
|
*/
|
|
341
381
|
follow: boolean | null;
|
|
342
382
|
/**
|
|
343
383
|
* 字体显示模式,默认是描边
|
|
344
|
-
*
|
|
384
|
+
* 默认值:'stroke'
|
|
345
385
|
* @type {'stroke' | 'bg'}
|
|
346
386
|
* @memberof ISubtitleStyle
|
|
347
387
|
*/
|
|
348
388
|
mode?: "stroke" | "bg";
|
|
349
389
|
/**
|
|
350
390
|
* 跟随底部控制栏的高度
|
|
351
|
-
*
|
|
391
|
+
* 默认值:50
|
|
352
392
|
* @type {number}
|
|
353
393
|
* @memberof ISubtitleStyle
|
|
354
394
|
*/
|
|
355
395
|
followBottom?: number;
|
|
356
396
|
/**
|
|
357
397
|
* 是否跟随视频自动调整字号
|
|
358
|
-
*
|
|
398
|
+
* 默认值:true
|
|
359
399
|
* @type {boolean}
|
|
360
400
|
* @memberof ISubtitleStyle
|
|
361
401
|
*/
|
|
362
402
|
fitVideo?: boolean;
|
|
363
403
|
/**
|
|
364
404
|
* 字幕距离画面底部百分比
|
|
365
|
-
*
|
|
405
|
+
* 默认值:4
|
|
366
406
|
* @type {number}
|
|
367
407
|
* @memberof ISubtitleStyle
|
|
368
408
|
*/
|
|
369
409
|
offsetBottom?: number;
|
|
370
410
|
/**
|
|
371
411
|
* 横屏视频适配基准字号
|
|
372
|
-
*
|
|
412
|
+
* 默认值:49
|
|
373
413
|
* @type {number}
|
|
374
414
|
* @memberof ISubtitleStyle
|
|
375
415
|
*/
|
|
376
416
|
baseSizeX?: number;
|
|
377
417
|
/**
|
|
378
418
|
* 竖屏视频适配基准字号
|
|
379
|
-
*
|
|
419
|
+
* 默认值:28
|
|
380
420
|
* @type {number}
|
|
381
421
|
* @memberof ISubtitleStyle
|
|
382
422
|
*/
|
|
383
423
|
baseSizeY?: number;
|
|
384
424
|
/**
|
|
385
425
|
* pc端最小字号
|
|
386
|
-
*
|
|
426
|
+
* 默认值:16
|
|
387
427
|
* @type {number}
|
|
388
428
|
* @memberof ISubtitleStyle
|
|
389
429
|
*/
|
|
390
430
|
minSize?: number;
|
|
391
431
|
/**
|
|
392
432
|
* 移动端最小字号
|
|
393
|
-
*
|
|
433
|
+
* 默认值:13
|
|
394
434
|
* @type {number}
|
|
395
435
|
* @memberof ISubtitleStyle
|
|
396
436
|
*/
|
|
397
437
|
minMobileSize?: number;
|
|
398
438
|
/**
|
|
399
439
|
* 最大显示行数
|
|
400
|
-
*
|
|
440
|
+
* 默认值:'double'
|
|
401
441
|
* @type {'double' | 'single' | 'three'}
|
|
402
442
|
* @memberof ISubtitleStyle
|
|
403
443
|
*/
|
|
404
444
|
line?: "double" | "single" | "three";
|
|
405
445
|
/**
|
|
406
446
|
* 字体颜色, 16位颜色值或rgb值
|
|
407
|
-
*
|
|
447
|
+
* 默认值:'#fff'
|
|
408
448
|
* @type {string}
|
|
409
449
|
* @memberof ISubtitleStyle
|
|
410
450
|
*/
|
|
411
451
|
fontColor?: string;
|
|
412
452
|
}
|
|
413
453
|
/**
|
|
414
|
-
* @
|
|
415
|
-
*
|
|
416
|
-
* @
|
|
454
|
+
* @detail Options
|
|
455
|
+
*
|
|
456
|
+
* @export
|
|
457
|
+
* @interface ISubTitleItem
|
|
417
458
|
*/
|
|
418
459
|
export interface ISubTitleItem {
|
|
419
460
|
/**
|
|
420
|
-
*
|
|
421
|
-
*
|
|
461
|
+
* 字幕语言
|
|
462
|
+
* 默认值:无
|
|
463
|
+
* @type {string | number}
|
|
464
|
+
* @memberof ISubTitleItem
|
|
422
465
|
*/
|
|
423
466
|
language?: string | number;
|
|
424
467
|
/**
|
|
425
|
-
*
|
|
426
|
-
*
|
|
468
|
+
* 字幕id
|
|
469
|
+
* 默认值:无
|
|
470
|
+
* @type {string | number}
|
|
471
|
+
* @memberof ISubTitleItem
|
|
427
472
|
*/
|
|
428
473
|
id?: number | string;
|
|
429
474
|
/**
|
|
430
|
-
*
|
|
431
|
-
*
|
|
475
|
+
* 是否是默认选择的字幕
|
|
476
|
+
* 默认值:false
|
|
477
|
+
* @type {boolean}
|
|
478
|
+
* @memberof ISubTitleItem
|
|
432
479
|
*/
|
|
433
480
|
isDefault?: boolean;
|
|
434
481
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
482
|
+
* 字幕名称
|
|
483
|
+
* 默认值:无
|
|
484
|
+
* @type {any}
|
|
485
|
+
* @memberof ISubTitleItem
|
|
437
486
|
*/
|
|
438
|
-
text?:
|
|
487
|
+
text?: any;
|
|
439
488
|
/**
|
|
440
|
-
*
|
|
441
|
-
*
|
|
489
|
+
* 外挂字幕地址
|
|
490
|
+
* 默认值:false
|
|
491
|
+
* @type {string}
|
|
492
|
+
* @memberof ISubTitleItem
|
|
442
493
|
*/
|
|
443
494
|
url?: string;
|
|
444
495
|
/**
|
|
445
496
|
* stringContent
|
|
446
|
-
*
|
|
497
|
+
* 默认值:无
|
|
447
498
|
* @hidden
|
|
448
499
|
* @type {string}
|
|
449
500
|
* @memberof ISubTitleItem
|
|
@@ -451,16 +502,15 @@ export interface ISubTitleItem {
|
|
|
451
502
|
stringContent?: string;
|
|
452
503
|
/**
|
|
453
504
|
* 字幕内容列表,非url形式时使用
|
|
454
|
-
*
|
|
505
|
+
* 默认值:无
|
|
455
506
|
* @type {Array<Object>}
|
|
456
507
|
* @memberof ISubTitleItem
|
|
457
508
|
*/
|
|
458
509
|
list?: IListItem[];
|
|
459
510
|
}
|
|
460
511
|
/**
|
|
461
|
-
* @
|
|
462
|
-
*
|
|
463
|
-
* @kind property
|
|
512
|
+
* @detail Options
|
|
513
|
+
*
|
|
464
514
|
* @export
|
|
465
515
|
* @interface IListItem
|
|
466
516
|
*/
|
|
@@ -481,20 +531,21 @@ export interface IListItem {
|
|
|
481
531
|
*/
|
|
482
532
|
list: Array<ITextItem>;
|
|
483
533
|
/**
|
|
484
|
-
*
|
|
534
|
+
* 默认值:无
|
|
485
535
|
* @hidden
|
|
486
536
|
* @type {any}
|
|
487
537
|
*/
|
|
488
538
|
[propName: string]: any;
|
|
489
539
|
}
|
|
490
540
|
/**
|
|
491
|
-
* @
|
|
492
|
-
*
|
|
493
|
-
* @
|
|
541
|
+
* @detail Options
|
|
542
|
+
*
|
|
543
|
+
* @export
|
|
544
|
+
* @interface ITextItem
|
|
494
545
|
*/
|
|
495
546
|
export interface ITextItem {
|
|
496
547
|
/**
|
|
497
|
-
*
|
|
548
|
+
* 默认值:无
|
|
498
549
|
* @hidden
|
|
499
550
|
* @type {any}
|
|
500
551
|
*/
|
|
@@ -521,9 +572,8 @@ export interface ITextItem {
|
|
|
521
572
|
index?: number;
|
|
522
573
|
}
|
|
523
574
|
/**
|
|
524
|
-
* @
|
|
525
|
-
*
|
|
526
|
-
* @hidden
|
|
575
|
+
* @detail Options
|
|
576
|
+
*
|
|
527
577
|
*
|
|
528
578
|
* @export
|
|
529
579
|
* @interface IDefinitionDemotePlugin
|
|
@@ -572,30 +622,38 @@ export interface IDefinitionDemotePlugin {
|
|
|
572
622
|
demotePriority?: string[];
|
|
573
623
|
}
|
|
574
624
|
/**
|
|
575
|
-
* @
|
|
576
|
-
* @
|
|
577
|
-
* @
|
|
625
|
+
* @detail Options
|
|
626
|
+
* @brief 更多options
|
|
627
|
+
* @id 2
|
|
628
|
+
*
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* dash播放配置想
|
|
632
|
+
*
|
|
633
|
+
* @detail Options
|
|
634
|
+
* @export
|
|
635
|
+
* @interface IDashPluginConfig
|
|
578
636
|
*/
|
|
579
637
|
export interface IDashPluginConfig {
|
|
580
638
|
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
*
|
|
639
|
+
* 视频vid
|
|
640
|
+
* 默认:无
|
|
641
|
+
* 播放加密视频时必选
|
|
584
642
|
*/
|
|
585
643
|
vid?: string;
|
|
586
644
|
/**
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
645
|
+
* 播放类型
|
|
646
|
+
* 默认:`TOP`
|
|
647
|
+
* 非必选
|
|
590
648
|
*/
|
|
591
649
|
playInfoType: "TOP";
|
|
592
650
|
/**
|
|
593
|
-
*
|
|
594
|
-
*
|
|
651
|
+
* 清晰度映射文案
|
|
652
|
+
* 默认:无
|
|
653
|
+
* 非必选
|
|
595
654
|
* @example
|
|
596
655
|
* ``` javascript
|
|
597
|
-
* {
|
|
598
|
-
* 360p: "流畅 360p",
|
|
656
|
+
* { 360p: "流畅 360p",
|
|
599
657
|
* 480p: "清晰 480p",
|
|
600
658
|
* 720p: "高清 720p",
|
|
601
659
|
* 1080p: "超高清 1080p"
|
|
@@ -604,19 +662,26 @@ export interface IDashPluginConfig {
|
|
|
604
662
|
*/
|
|
605
663
|
definitionText: Record<string, string>;
|
|
606
664
|
/**
|
|
607
|
-
*
|
|
608
|
-
*
|
|
665
|
+
* 默认清晰度
|
|
666
|
+
* 默认:列表第一个
|
|
667
|
+
* 非必选
|
|
668
|
+
* @example
|
|
669
|
+
* ``` javascript
|
|
670
|
+
* { 360p: "流畅 360p",
|
|
671
|
+
* 480p: "清晰 480p",
|
|
672
|
+
* 720p: "高清 720p",
|
|
673
|
+
* 1080p: "超高清 1080p"
|
|
674
|
+
* }
|
|
675
|
+
* ```
|
|
609
676
|
*/
|
|
610
677
|
defaultDefinition?: string;
|
|
611
678
|
/**
|
|
612
|
-
* @hidden
|
|
613
679
|
* 获取证书地址
|
|
614
680
|
* 默认:`//i.snssdk.com/video/drm/v1/play_licenses`
|
|
615
681
|
* 播放加密视频时必选
|
|
616
682
|
*/
|
|
617
683
|
getLicenseUrl?: string;
|
|
618
684
|
/**
|
|
619
|
-
* @hidden
|
|
620
685
|
* dash播放信息,由`Service.url`服务接口获取
|
|
621
686
|
* 默认:无
|
|
622
687
|
* 必选
|
|
@@ -625,16 +690,17 @@ export interface IDashPluginConfig {
|
|
|
625
690
|
Data: any;
|
|
626
691
|
};
|
|
627
692
|
/**
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
693
|
+
* 兜底的mp4播放列表,由`Service.url`服务接口获取
|
|
694
|
+
* 默认:无
|
|
695
|
+
* 非必选
|
|
631
696
|
*/
|
|
632
697
|
mp4Opts: {
|
|
633
698
|
mp4List: mp4OptsItem[];
|
|
634
699
|
};
|
|
635
700
|
/**
|
|
636
701
|
* 预加载时间,单位ms
|
|
637
|
-
*
|
|
702
|
+
* 默认:undefined
|
|
703
|
+
* 非必选
|
|
638
704
|
*/
|
|
639
705
|
preloadTime?: number;
|
|
640
706
|
/**
|
|
@@ -662,9 +728,11 @@ export interface IDashPluginConfig {
|
|
|
662
728
|
url_range_domains?: string[];
|
|
663
729
|
}
|
|
664
730
|
/**
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
* @
|
|
731
|
+
* dash播放的mp4兜底播放列表配置
|
|
732
|
+
*
|
|
733
|
+
* @detail Options
|
|
734
|
+
* @export
|
|
735
|
+
* @interface mp4OptsItem
|
|
668
736
|
*/
|
|
669
737
|
export interface mp4OptsItem {
|
|
670
738
|
/**
|
|
@@ -681,207 +749,217 @@ export interface mp4OptsItem {
|
|
|
681
749
|
url: string;
|
|
682
750
|
}
|
|
683
751
|
/**
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
* @
|
|
752
|
+
* DASH播放配置
|
|
753
|
+
*
|
|
754
|
+
* @detail Options
|
|
755
|
+
* @export
|
|
756
|
+
* @interface IDashPluginConfig
|
|
687
757
|
*/
|
|
688
758
|
export interface IEncryptHlsPluginConfig {
|
|
689
|
-
/**
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
|
|
693
|
-
/** {en}
|
|
694
|
-
* @brief Get the requested domain name of the playback address
|
|
695
|
-
* @default https://vod.byteplusapi.com
|
|
759
|
+
/**
|
|
760
|
+
* 播放地址请求域名
|
|
761
|
+
* 默认:无
|
|
762
|
+
* 必选
|
|
696
763
|
*/
|
|
697
|
-
playDomain
|
|
764
|
+
playDomain: string;
|
|
698
765
|
/**
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
* @default TOP
|
|
766
|
+
* 请求类型,固定值 'TOP'
|
|
767
|
+
* 默认: 无
|
|
702
768
|
*/
|
|
703
|
-
getKeyType
|
|
769
|
+
getKeyType: string;
|
|
704
770
|
/**
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
771
|
+
* 密钥请求域名
|
|
772
|
+
* 默认:无
|
|
773
|
+
* 必选
|
|
708
774
|
*/
|
|
709
|
-
keyDomain
|
|
775
|
+
keyDomain: string;
|
|
710
776
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
777
|
+
* 播放地址获取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)}
|
|
778
|
+
* 默认:无
|
|
779
|
+
* 必选
|
|
713
780
|
*/
|
|
714
|
-
playAuthToken
|
|
781
|
+
playAuthToken: string;
|
|
715
782
|
/**
|
|
716
|
-
*
|
|
717
|
-
*
|
|
783
|
+
* 密钥获取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}
|
|
784
|
+
* 默认:无
|
|
785
|
+
* 必选
|
|
718
786
|
*/
|
|
719
787
|
keyToken: string;
|
|
788
|
+
/**
|
|
789
|
+
* hls加密播放地址
|
|
790
|
+
* 默认:无
|
|
791
|
+
*/
|
|
792
|
+
url?: string;
|
|
720
793
|
}
|
|
721
794
|
/**
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
* @
|
|
795
|
+
* 质量日志配置
|
|
796
|
+
*
|
|
797
|
+
* @detail Options
|
|
798
|
+
* @export
|
|
799
|
+
* @interface IVodLogOptsConfig
|
|
725
800
|
*/
|
|
726
801
|
export interface IVodLogOptsConfig {
|
|
727
802
|
/**
|
|
728
|
-
*
|
|
729
|
-
*
|
|
803
|
+
* 表示业务来源,使用业务自己的appid即可
|
|
804
|
+
* 默认:无
|
|
805
|
+
* 必选
|
|
730
806
|
*/
|
|
731
807
|
line_app_id: number;
|
|
732
808
|
/**
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
* @default -
|
|
809
|
+
* 用于识别单一用户的id
|
|
810
|
+
* 默认:无
|
|
811
|
+
* 必选
|
|
737
812
|
*/
|
|
738
813
|
line_user_id: string | number;
|
|
739
814
|
/**
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
815
|
+
* 视频类型
|
|
816
|
+
* 默认:无
|
|
817
|
+
* 必选
|
|
743
818
|
*/
|
|
744
819
|
vtype?: "MP4" | "HLS" | "DASH" | "FLV";
|
|
745
820
|
/**
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
821
|
+
* 自定义标签,对应控制台"业务维类型"维度
|
|
822
|
+
* 默认:`default`
|
|
823
|
+
* 必选
|
|
749
824
|
*/
|
|
750
825
|
tag?: string;
|
|
751
826
|
/**
|
|
752
|
-
*
|
|
753
|
-
*
|
|
827
|
+
* 自定义子标签,对应控制台"自定义标签"维度
|
|
828
|
+
* 默认:`default`
|
|
829
|
+
* 必选
|
|
754
830
|
*/
|
|
755
831
|
subtag?: string;
|
|
756
832
|
/**
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
* @default unknown
|
|
833
|
+
* 视频解码器类型名称
|
|
834
|
+
* 默认:`h264`
|
|
835
|
+
* 必选
|
|
761
836
|
*/
|
|
762
837
|
codec_type?: "h264" | "h265";
|
|
763
838
|
/**
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
839
|
+
* 是否加密,0:非drm视频,1:drm视频
|
|
840
|
+
* 默认:`0`
|
|
841
|
+
* 可选
|
|
767
842
|
*/
|
|
768
843
|
drm_type?: 0 | 1;
|
|
769
844
|
/**
|
|
770
|
-
*
|
|
771
|
-
*
|
|
845
|
+
* 播放内核版本号
|
|
846
|
+
* 默认:无
|
|
847
|
+
* 可选
|
|
772
848
|
*/
|
|
773
849
|
playerCoreVersion?: string;
|
|
774
850
|
/**
|
|
775
|
-
*
|
|
776
|
-
*
|
|
851
|
+
* 播放器版本号
|
|
852
|
+
* 默认:无
|
|
853
|
+
* 可选
|
|
777
854
|
*/
|
|
778
855
|
playerVersion?: string;
|
|
779
856
|
/**
|
|
780
|
-
*
|
|
781
|
-
*
|
|
857
|
+
* DASH播放的封装类型
|
|
858
|
+
* 默认:无
|
|
859
|
+
* 可选
|
|
782
860
|
*/
|
|
783
861
|
dynamic_type?: "segment_base" | "segment_template";
|
|
784
862
|
/**
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
863
|
+
* 是否使用bash,0:不使用,1:使用
|
|
864
|
+
* 默认:`0`
|
|
865
|
+
* 可选
|
|
788
866
|
*/
|
|
789
867
|
enable_bash?: 0 | 1;
|
|
790
868
|
/**
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
*
|
|
869
|
+
* 发送的埋点日志是本地缓存的时候回调
|
|
870
|
+
* 默认:无
|
|
871
|
+
* 可选
|
|
794
872
|
*/
|
|
795
873
|
sendLocalCallback?: (event: any, data: any) => void;
|
|
796
874
|
/**
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
875
|
+
* 是否禁用localStorage暂时缓存onPlay逻辑
|
|
876
|
+
* 默认:`false`
|
|
877
|
+
* 可选
|
|
800
878
|
*/
|
|
801
879
|
disableLocalCache?: boolean;
|
|
802
880
|
/**
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
*
|
|
881
|
+
* 数据上报渠道,可选值:cn(国内)、va(美东) 、sg(新加坡)
|
|
882
|
+
* 默认:`cn`
|
|
883
|
+
* 可选
|
|
806
884
|
*/
|
|
807
885
|
channel?: "cn" | "va" | "sg";
|
|
808
886
|
/**
|
|
809
|
-
*
|
|
810
|
-
*
|
|
811
|
-
*
|
|
887
|
+
* 是否关闭清晰度切换埋点
|
|
888
|
+
* 默认:`false`
|
|
889
|
+
* 可选
|
|
812
890
|
*/
|
|
813
891
|
closeResolutionLog?: boolean;
|
|
814
892
|
/**
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
893
|
+
* 关闭seek相关埋点
|
|
894
|
+
* 默认:`false`
|
|
895
|
+
* 可选
|
|
818
896
|
*/
|
|
819
897
|
closeSeekLog?: boolean;
|
|
820
898
|
/**
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
899
|
+
* 队列超过多少条日志的时候发送
|
|
900
|
+
* 默认:`5`
|
|
901
|
+
* 可选
|
|
824
902
|
*/
|
|
825
903
|
maxQueueCount?: number;
|
|
826
904
|
}
|
|
827
905
|
/**
|
|
828
|
-
*
|
|
829
|
-
*
|
|
830
|
-
* @
|
|
906
|
+
* mp4加密日志配置项
|
|
907
|
+
*
|
|
908
|
+
* @detail Options
|
|
909
|
+
* @export
|
|
910
|
+
* @interface IMp4EncryptPlayerConfig
|
|
831
911
|
*/
|
|
832
912
|
export interface IMp4EncryptPlayerConfig {
|
|
833
913
|
/**
|
|
834
|
-
*
|
|
835
|
-
*
|
|
836
|
-
*
|
|
914
|
+
* 是否加密
|
|
915
|
+
* 默认:`false`
|
|
916
|
+
* 可选
|
|
837
917
|
*/
|
|
838
918
|
isEncrypt?: boolean;
|
|
839
919
|
/**
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
920
|
+
* 视频vid
|
|
921
|
+
* 默认:无
|
|
922
|
+
* 可选
|
|
843
923
|
*/
|
|
844
924
|
vid?: string;
|
|
845
925
|
/**
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
926
|
+
* 视频密钥 id
|
|
927
|
+
* 默认:无
|
|
928
|
+
* 可选
|
|
849
929
|
*/
|
|
850
930
|
kid?: string;
|
|
851
931
|
/**
|
|
852
|
-
*
|
|
853
|
-
*
|
|
854
|
-
*
|
|
932
|
+
* 获取密钥凭证地址
|
|
933
|
+
* 默认:无
|
|
934
|
+
* 可选
|
|
855
935
|
*/
|
|
856
936
|
getLicenseUrl?: string;
|
|
857
937
|
/**
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
*
|
|
938
|
+
* 是否使用EME
|
|
939
|
+
* 默认:`false`
|
|
940
|
+
* 可选
|
|
861
941
|
*/
|
|
862
942
|
useEME?: boolean;
|
|
863
943
|
/**
|
|
864
|
-
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
944
|
+
* 视频密钥值
|
|
945
|
+
* 默认:无
|
|
946
|
+
* 可选
|
|
867
947
|
*/
|
|
868
948
|
keyValue?: string;
|
|
869
949
|
/**
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
950
|
+
* 加密后的视频密钥值
|
|
951
|
+
* 默认:无
|
|
952
|
+
* 可选
|
|
873
953
|
*/
|
|
874
954
|
secretKey?: string;
|
|
875
955
|
/**
|
|
876
|
-
*
|
|
877
|
-
* @brief 是否携带cookie
|
|
878
|
-
* @default false
|
|
956
|
+
* 是否携带cookie
|
|
879
957
|
*/
|
|
880
958
|
withCredentials?: boolean;
|
|
881
959
|
/**
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
*
|
|
960
|
+
* drm内容
|
|
961
|
+
* 默认:无
|
|
962
|
+
* 可选
|
|
885
963
|
*/
|
|
886
964
|
drm?: {
|
|
887
965
|
clearKeys: {
|
|
@@ -889,9 +967,6 @@ export interface IMp4EncryptPlayerConfig {
|
|
|
889
967
|
};
|
|
890
968
|
};
|
|
891
969
|
}
|
|
892
|
-
/**
|
|
893
|
-
* @hidden
|
|
894
|
-
*/
|
|
895
970
|
export declare type IDefinition = {
|
|
896
971
|
[propName: string]: any;
|
|
897
972
|
url: any;
|
|
@@ -905,9 +980,6 @@ export declare type IDefinition = {
|
|
|
905
980
|
[propName: string]: any;
|
|
906
981
|
};
|
|
907
982
|
};
|
|
908
|
-
/**
|
|
909
|
-
* @hidden
|
|
910
|
-
*/
|
|
911
983
|
export declare type IPlayerOptions = {
|
|
912
984
|
[propName: string]: any;
|
|
913
985
|
id?: string;
|
|
@@ -1021,35 +1093,11 @@ export declare type IPlayerOptions = {
|
|
|
1021
1093
|
volumeColor?: string;
|
|
1022
1094
|
};
|
|
1023
1095
|
};
|
|
1024
|
-
/**
|
|
1025
|
-
* @brief 自动播放配置
|
|
1026
|
-
* @list Options
|
|
1027
|
-
* @kind property
|
|
1028
|
-
*/
|
|
1029
1096
|
export interface IAutoplayPluginConfig {
|
|
1030
|
-
/**
|
|
1031
|
-
* @hidden
|
|
1032
|
-
*/
|
|
1033
1097
|
position?: string;
|
|
1034
|
-
/**
|
|
1035
|
-
* @brief 有声音自动播放失败时是否降级成静音自动播放
|
|
1036
|
-
* @default false
|
|
1037
|
-
*/
|
|
1038
1098
|
enableDegradeMuteAutoplay?: boolean;
|
|
1039
|
-
/**
|
|
1040
|
-
* @brief 启用微信jsBridge方式的自动播放
|
|
1041
|
-
* @default false
|
|
1042
|
-
*/
|
|
1043
1099
|
enableWxJsBridgeAutoplay?: boolean;
|
|
1044
|
-
/**
|
|
1045
|
-
* @brief 用户触发自动播放的目标dom
|
|
1046
|
-
* @default window.document.body
|
|
1047
|
-
*/
|
|
1048
1100
|
userActionDom?: Node;
|
|
1049
|
-
/**
|
|
1050
|
-
* @brief 开启任意点击/触摸的用户行为触发自动播放
|
|
1051
|
-
* @default false
|
|
1052
|
-
*/
|
|
1053
1101
|
enableUserActionAutoplay?: boolean;
|
|
1054
1102
|
}
|
|
1055
1103
|
declare class PlayList {
|
|
@@ -1075,11 +1123,6 @@ export declare const enum TOGGLE_MODES {
|
|
|
1075
1123
|
CLICK = "click",
|
|
1076
1124
|
HOVER = "hover"
|
|
1077
1125
|
}
|
|
1078
|
-
/**
|
|
1079
|
-
* @list Options
|
|
1080
|
-
* @brief 播放列表项配置,支持 DirectUrl 和 Vid + playAuthToken 两种播放模式。
|
|
1081
|
-
* @kind property
|
|
1082
|
-
*/
|
|
1083
1126
|
export interface IPlayListItem {
|
|
1084
1127
|
url?: string;
|
|
1085
1128
|
playAuthToken?: string;
|
|
@@ -1091,51 +1134,14 @@ declare enum EPlayMode {
|
|
|
1091
1134
|
ORDER = "order",
|
|
1092
1135
|
LOOP = "loop"
|
|
1093
1136
|
}
|
|
1094
|
-
/**
|
|
1095
|
-
* @list Options
|
|
1096
|
-
* @brief 播放列表插件配置项
|
|
1097
|
-
* @kind property
|
|
1098
|
-
*/
|
|
1099
1137
|
export interface IPlayListConfig {
|
|
1100
|
-
/**
|
|
1101
|
-
* @brief 图标位置
|
|
1102
|
-
* @default controlsLeft 控制栏左侧
|
|
1103
|
-
*/
|
|
1104
1138
|
position?: string;
|
|
1105
|
-
/**
|
|
1106
|
-
* @brief 图标位置权重
|
|
1107
|
-
* @default 20
|
|
1108
|
-
*/
|
|
1109
1139
|
index?: number;
|
|
1110
|
-
/**
|
|
1111
|
-
* @brief 列表数据
|
|
1112
|
-
* @default []
|
|
1113
|
-
*/
|
|
1114
1140
|
list: IPlayListItem[];
|
|
1115
|
-
/**
|
|
1116
|
-
* @brief 循环模式
|
|
1117
|
-
* @default order
|
|
1118
|
-
*/
|
|
1119
1141
|
mode?: EPlayMode;
|
|
1120
|
-
/**
|
|
1121
|
-
* @brief 默认起始播放序号
|
|
1122
|
-
* @default order
|
|
1123
|
-
*/
|
|
1124
1142
|
defaultIndex?: number;
|
|
1125
|
-
/**
|
|
1126
|
-
* @brief 列表点击之后是否隐藏列表
|
|
1127
|
-
* @default true
|
|
1128
|
-
*/
|
|
1129
1143
|
isItemClickHide?: boolean;
|
|
1130
|
-
/**
|
|
1131
|
-
* @brief 列表行为触发模式
|
|
1132
|
-
* @default click 点击
|
|
1133
|
-
*/
|
|
1134
1144
|
toggleMode?: TOGGLE_MODES;
|
|
1135
|
-
/**
|
|
1136
|
-
* @brief 是否显示图标
|
|
1137
|
-
* @default true
|
|
1138
|
-
*/
|
|
1139
1145
|
isShowIcon?: boolean;
|
|
1140
1146
|
}
|
|
1141
1147
|
export declare class PlayListPlugin extends Plugin {
|
|
@@ -1245,17 +1251,8 @@ export interface IPlayInfoList {
|
|
|
1245
1251
|
Width: number;
|
|
1246
1252
|
}
|
|
1247
1253
|
declare enum CodecType {
|
|
1248
|
-
/**
|
|
1249
|
-
* @brief H.265
|
|
1250
|
-
*/
|
|
1251
1254
|
H265 = "h265",
|
|
1252
|
-
/**
|
|
1253
|
-
* @brief H.264
|
|
1254
|
-
*/
|
|
1255
1255
|
H264 = "h264",
|
|
1256
|
-
/**
|
|
1257
|
-
* @brief 未知编码
|
|
1258
|
-
*/
|
|
1259
1256
|
UNKNOWN = "unknown"
|
|
1260
1257
|
}
|
|
1261
1258
|
declare enum RTMCodec {
|
|
@@ -1268,6 +1265,7 @@ export interface IMusicListItem {
|
|
|
1268
1265
|
* 音乐地址
|
|
1269
1266
|
*
|
|
1270
1267
|
* @type {string}
|
|
1268
|
+
* @memberof IMusicListItem
|
|
1271
1269
|
*/
|
|
1272
1270
|
src: string;
|
|
1273
1271
|
/**
|
|
@@ -1291,20 +1289,11 @@ export interface IMusicListItem {
|
|
|
1291
1289
|
* @memberof IMusicListItem
|
|
1292
1290
|
*/
|
|
1293
1291
|
title?: string;
|
|
1294
|
-
/**
|
|
1295
|
-
* @hidden
|
|
1296
|
-
*/
|
|
1297
1292
|
[propName: string]: any;
|
|
1298
1293
|
}
|
|
1299
|
-
/**
|
|
1300
|
-
* @brief 循环播放配置
|
|
1301
|
-
* @list Options
|
|
1302
|
-
* @kind property
|
|
1303
|
-
*/
|
|
1304
1294
|
export interface IABCycle {
|
|
1305
1295
|
/**
|
|
1306
1296
|
* AB循环段开始时间
|
|
1307
|
-
* @default 0
|
|
1308
1297
|
*
|
|
1309
1298
|
* @type {boolean}
|
|
1310
1299
|
* @memberof IABCycle
|
|
@@ -1312,7 +1301,6 @@ export interface IABCycle {
|
|
|
1312
1301
|
start: number;
|
|
1313
1302
|
/**
|
|
1314
1303
|
* AB循环段结束时间
|
|
1315
|
-
* @default 音乐结束时间点
|
|
1316
1304
|
*
|
|
1317
1305
|
* @type {boolean}
|
|
1318
1306
|
* @memberof IABCycle
|
|
@@ -1320,26 +1308,16 @@ export interface IABCycle {
|
|
|
1320
1308
|
end: number;
|
|
1321
1309
|
/**
|
|
1322
1310
|
* AB段是否循环播放
|
|
1323
|
-
* @default false
|
|
1324
1311
|
*
|
|
1325
1312
|
* @type {boolean}
|
|
1326
1313
|
* @memberof IABCycle
|
|
1327
1314
|
*/
|
|
1328
1315
|
loop?: boolean;
|
|
1329
|
-
/**
|
|
1330
|
-
* @hidden
|
|
1331
|
-
*/
|
|
1332
1316
|
[propName: string]: any;
|
|
1333
1317
|
}
|
|
1334
|
-
/**
|
|
1335
|
-
* @list Options
|
|
1336
|
-
* @brief 音乐播放模式配置
|
|
1337
|
-
* @kind property
|
|
1338
|
-
*/
|
|
1339
1318
|
export interface IMusicConfig {
|
|
1340
1319
|
/**
|
|
1341
1320
|
* 是否启用离线下载播放
|
|
1342
|
-
* @default false
|
|
1343
1321
|
*
|
|
1344
1322
|
* @type {boolean}
|
|
1345
1323
|
* @memberof IMusicConfig
|
|
@@ -1347,7 +1325,6 @@ export interface IMusicConfig {
|
|
|
1347
1325
|
offline?: boolean;
|
|
1348
1326
|
/**
|
|
1349
1327
|
* AB循环设置
|
|
1350
|
-
* @default null
|
|
1351
1328
|
*
|
|
1352
1329
|
* @type {IABCycle}
|
|
1353
1330
|
* @memberof IMusicConfig
|
|
@@ -1355,7 +1332,6 @@ export interface IMusicConfig {
|
|
|
1355
1332
|
abCycle?: IABCycle | null;
|
|
1356
1333
|
/**
|
|
1357
1334
|
* 快进快退时间跨度
|
|
1358
|
-
* @default 15
|
|
1359
1335
|
*
|
|
1360
1336
|
* @type {number}
|
|
1361
1337
|
* @memberof IMusicConfig
|
|
@@ -1363,7 +1339,6 @@ export interface IMusicConfig {
|
|
|
1363
1339
|
timeScale?: number;
|
|
1364
1340
|
/**
|
|
1365
1341
|
* 循环模式
|
|
1366
|
-
* @default order
|
|
1367
1342
|
*
|
|
1368
1343
|
* @type {('order' | 'sloop' | 'loop' | 'random')}
|
|
1369
1344
|
* @memberof IMusicConfig
|
|
@@ -1371,21 +1346,16 @@ export interface IMusicConfig {
|
|
|
1371
1346
|
mode?: PlayModeType;
|
|
1372
1347
|
/**
|
|
1373
1348
|
* 播放列表
|
|
1374
|
-
* @default []
|
|
1375
1349
|
*
|
|
1376
1350
|
* @type {Array<IMusicListItem>}
|
|
1377
1351
|
* @memberof IMusicConfig
|
|
1378
1352
|
*/
|
|
1379
1353
|
list?: Array<IMusicListItem>;
|
|
1380
|
-
/**
|
|
1381
|
-
* @hidden
|
|
1382
|
-
*/
|
|
1383
1354
|
[propName: string]: any;
|
|
1384
1355
|
}
|
|
1385
1356
|
/**
|
|
1386
|
-
* @
|
|
1357
|
+
* @detail Options
|
|
1387
1358
|
* @brief 播放地址列表, 可配置多线路和多清晰度
|
|
1388
|
-
* @kind property
|
|
1389
1359
|
*
|
|
1390
1360
|
* @export
|
|
1391
1361
|
* @interface Stream
|
|
@@ -1428,12 +1398,17 @@ export interface Stream extends Partial<IPlayInfoList> {
|
|
|
1428
1398
|
*/
|
|
1429
1399
|
definitionTextKey?: string;
|
|
1430
1400
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
1401
|
+
* 编码格式
|
|
1402
|
+
*
|
|
1403
|
+
* @type {('h265' | 'h264')}
|
|
1404
|
+
* @memberof Stream
|
|
1433
1405
|
*/
|
|
1434
1406
|
codec?: CodecType;
|
|
1435
1407
|
/**
|
|
1436
1408
|
* 线路唯一id
|
|
1409
|
+
*
|
|
1410
|
+
* @type {(number | string)}
|
|
1411
|
+
* @memberof Stream
|
|
1437
1412
|
*/
|
|
1438
1413
|
lineId?: number | string;
|
|
1439
1414
|
/**
|
|
@@ -1451,24 +1426,14 @@ export interface Stream extends Partial<IPlayInfoList> {
|
|
|
1451
1426
|
* @memberof Stream
|
|
1452
1427
|
*/
|
|
1453
1428
|
lineTextKey?: string;
|
|
1454
|
-
/**
|
|
1455
|
-
* @hidden
|
|
1456
|
-
*/
|
|
1457
1429
|
[propName: string]: any;
|
|
1458
1430
|
}
|
|
1459
|
-
/**
|
|
1460
|
-
* @hidden
|
|
1461
|
-
*/
|
|
1462
1431
|
export interface Condition {
|
|
1463
1432
|
definition?: string;
|
|
1464
1433
|
lineId?: number | string;
|
|
1465
|
-
/**
|
|
1466
|
-
* @hidden
|
|
1467
|
-
*/
|
|
1468
1434
|
[propName: string]: any;
|
|
1469
1435
|
}
|
|
1470
1436
|
/**
|
|
1471
|
-
* @hidden
|
|
1472
1437
|
* @description 播放器当前状态
|
|
1473
1438
|
*/
|
|
1474
1439
|
export interface Current {
|
|
@@ -1477,295 +1442,110 @@ export interface Current {
|
|
|
1477
1442
|
language: string;
|
|
1478
1443
|
lineId?: number | string;
|
|
1479
1444
|
codec?: CodecType;
|
|
1480
|
-
/**
|
|
1481
|
-
* @hidden
|
|
1482
|
-
*/
|
|
1483
1445
|
[propName: string]: any;
|
|
1484
1446
|
}
|
|
1485
1447
|
/**
|
|
1486
|
-
* @
|
|
1487
|
-
* @
|
|
1488
|
-
* @brief
|
|
1448
|
+
* @detail Options
|
|
1449
|
+
* @id 1
|
|
1450
|
+
* @brief options参数列表:
|
|
1451
|
+
* 本文档是介绍火山引擎直播和点播播放器VePlayer的相关参数和Api。
|
|
1489
1452
|
*/
|
|
1490
1453
|
export interface IPlayerConfig extends IPlayerOptions {
|
|
1491
|
-
/**
|
|
1492
|
-
*
|
|
1493
|
-
* @
|
|
1494
|
-
* @
|
|
1454
|
+
/**
|
|
1455
|
+
* 是否是直播,默认为false
|
|
1456
|
+
* @type {boolean}
|
|
1457
|
+
* @memberof IPlayerConfig
|
|
1495
1458
|
*/
|
|
1496
1459
|
isLive?: boolean;
|
|
1497
|
-
/**
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
* @
|
|
1460
|
+
/**
|
|
1461
|
+
* 播放器容器id,VePlayer将被插入在该容器中
|
|
1462
|
+
*
|
|
1463
|
+
* @notes id和root必填一个
|
|
1464
|
+
* @type {string}
|
|
1465
|
+
* @memberof IPlayerConfig
|
|
1501
1466
|
*/
|
|
1502
1467
|
id?: string;
|
|
1503
|
-
/**
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
* @
|
|
1468
|
+
/**
|
|
1469
|
+
* 播放器容器,VePlayer将被插入在该容器中
|
|
1470
|
+
*
|
|
1471
|
+
* @type {HTMLElement}
|
|
1472
|
+
* @memberof IPlayerConfig
|
|
1507
1473
|
*/
|
|
1508
1474
|
root?: HTMLElement;
|
|
1509
|
-
/**
|
|
1510
|
-
*
|
|
1511
|
-
* @
|
|
1475
|
+
/**
|
|
1476
|
+
* 播放地址
|
|
1477
|
+
* 直播可通过 {@link https://console.volcengine.com/live/main/locationGenerate 视频直播控制台} 生成
|
|
1478
|
+
*
|
|
1479
|
+
* @type {string}
|
|
1480
|
+
* @memberof IPlayerConfig
|
|
1512
1481
|
*/
|
|
1513
1482
|
url?: string;
|
|
1514
|
-
/**
|
|
1515
|
-
*
|
|
1516
|
-
* @notes
|
|
1483
|
+
/**
|
|
1484
|
+
* 播放地址类型,可以选值为“rtm”/“flv”/“mp4”/“hls”
|
|
1485
|
+
* @notes 播放地址带后缀的则streamType非必填,否则为必填
|
|
1517
1486
|
*
|
|
1518
|
-
* @type {
|
|
1487
|
+
* @type {(''mp4' | 'hls' | 'dash' | 'rtm' | 'flv')}
|
|
1519
1488
|
* @memberof IPlayerConfig
|
|
1520
1489
|
*/
|
|
1521
|
-
getVideoByToken?: IPlayAuthTokenConfig;
|
|
1522
|
-
/** {zh}
|
|
1523
|
-
* @brief 视频格式/协议类型。取值如下:
|
|
1524
|
-
* - `mp4`
|
|
1525
|
-
* - `hls`
|
|
1526
|
-
* - `dash`
|
|
1527
|
-
* - `flv`
|
|
1528
|
-
* @notes 如果`url`参数视频地址不包含文件格式后缀,则`streamType`必传。
|
|
1529
|
-
*/
|
|
1530
1490
|
streamType?: "mp4" | "hls" | "dash" | "rtm" | "flv";
|
|
1531
|
-
/**
|
|
1532
|
-
*
|
|
1533
|
-
* @
|
|
1534
|
-
|
|
1535
|
-
width?: number | string;
|
|
1536
|
-
/** {zh}
|
|
1537
|
-
* @brief 播放器高度,可以是数字或者css width 属性值,是数字时单位是`px`
|
|
1538
|
-
* @default 100%
|
|
1539
|
-
*/
|
|
1540
|
-
height?: number | string;
|
|
1541
|
-
/** {zh}
|
|
1542
|
-
* @brief 默认音量
|
|
1543
|
-
* @default 0.6
|
|
1544
|
-
*/
|
|
1545
|
-
volume?: number;
|
|
1546
|
-
/** {zh}
|
|
1547
|
-
* @brief 是否自动播放。取值如下:
|
|
1548
|
-
* - `true`:是
|
|
1549
|
-
* - `false`:否
|
|
1550
|
-
* @default false
|
|
1551
|
-
* @notice 受限制于浏览器策略,自动播放不一定能成功,取决于浏览器环境、用户行为、浏览器配置等,详细参考自动播放 @link https://www.volcengine.com/docs/4/68693#%E8%87%AA%E5%8A%A8%E6%92%AD%E6%94%BE
|
|
1552
|
-
*/
|
|
1553
|
-
autoplay?: boolean;
|
|
1554
|
-
poster?: string | IPoster;
|
|
1555
|
-
/** {zh}
|
|
1556
|
-
* @brief 是否开启静音自动播放。取值如下:
|
|
1557
|
-
* - `true`:是
|
|
1558
|
-
* - `false`:否
|
|
1559
|
-
* @default false
|
|
1560
|
-
*/
|
|
1561
|
-
autoplayMuted?: boolean;
|
|
1562
|
-
/** {zh}
|
|
1563
|
-
* @brief 有声音自动播放失败时是否降级成静音自动播放,默认不降级
|
|
1564
|
-
* - `true`:是,降级
|
|
1565
|
-
* - `false`:否,不降级
|
|
1566
|
-
* @default false
|
|
1567
|
-
*/
|
|
1568
|
-
enableDegradeMuteAutoplay?: boolean;
|
|
1569
|
-
/** {zh}
|
|
1570
|
-
* @brief 启用微信jsBridge方式的自动播放,默认不开启
|
|
1571
|
-
* - `true`:是,降级
|
|
1572
|
-
* - `false`:否,不降级
|
|
1573
|
-
* @default false
|
|
1574
|
-
*/
|
|
1575
|
-
enableWxJsBridgeAutoplay?: boolean;
|
|
1576
|
-
/** {zh}
|
|
1577
|
-
* @brief 开启任意点击的用户行为触发自动播放,默认不开启
|
|
1578
|
-
* - `true`:是,开启
|
|
1579
|
-
* - `false`:否,不开启
|
|
1580
|
-
* @default false
|
|
1581
|
-
*/
|
|
1582
|
-
enableUserActionAutoplay?: boolean;
|
|
1583
|
-
/** {zh}
|
|
1584
|
-
* @brief 是否开启循环播放。
|
|
1585
|
-
* - `true`:是,开启
|
|
1586
|
-
* - `false`:否,不开启
|
|
1587
|
-
* @default false
|
|
1588
|
-
*/
|
|
1589
|
-
loop?: boolean;
|
|
1590
|
-
/** {zh}
|
|
1591
|
-
* @brief 默认起播倍速。参考值 0.5/0.75/1/1.5/2
|
|
1592
|
-
* @default 1
|
|
1593
|
-
*/
|
|
1594
|
-
defaultPlaybackRate?: number;
|
|
1595
|
-
/** {zh}
|
|
1596
|
-
* @brief 国际化语言。支持自定义,默认语言类型包括:
|
|
1597
|
-
* - `zh` 或 `zh-cn`
|
|
1598
|
-
* - `en`
|
|
1599
|
-
* - `jp`
|
|
1600
|
-
* - `zh-hk`
|
|
1601
|
-
* @default zh
|
|
1602
|
-
*/
|
|
1603
|
-
lang?: "zh" | "zh-cn" | "en" | "jp" | "zh-hk";
|
|
1604
|
-
/** {zh}
|
|
1605
|
-
* @brief 自定义多语言词典。可设置每个语种的词典 `{ [key: string]: Object; }`。例如:
|
|
1606
|
-
* ```javascript
|
|
1607
|
-
* {
|
|
1608
|
-
* zh: {
|
|
1609
|
-
* PIP: '画中画'
|
|
1610
|
-
* },
|
|
1611
|
-
* en: {
|
|
1612
|
-
* PIP: 'pip'
|
|
1613
|
-
* }
|
|
1614
|
-
* }
|
|
1615
|
-
* ```
|
|
1616
|
-
* @notice
|
|
1617
|
-
* @see 了解更多,请参见{@link https://www.volcengine.com/docs/6469/127529 默认词典}。
|
|
1618
|
-
*/
|
|
1619
|
-
languages?: {
|
|
1620
|
-
[key: string]: Record<string, any>;
|
|
1621
|
-
};
|
|
1622
|
-
/** {zh}
|
|
1623
|
-
* @brief 画中画配置
|
|
1624
|
-
* @default PC: {position: 'controlsRight', index: 2.5, showIcon: true}; mobile:false
|
|
1625
|
-
* @notice 画中画功能由浏览器提供,如果本身浏览器不支持,即使有该配置也不显示画中画按钮
|
|
1626
|
-
*/
|
|
1627
|
-
pip?: IPIPConfig | boolean;
|
|
1628
|
-
/** {zh}
|
|
1629
|
-
* @brief 全屏相关配置
|
|
1630
|
-
* @default {position: 'controlsRight', index: 0, rotateFullscreen: false, useCssFullscreen: false, target: null, switchCallback: null, disable: false, needBackIcon: false }
|
|
1631
|
-
*/
|
|
1632
|
-
fullscreen?: IFullscreenConfig;
|
|
1633
|
-
/** {zh}
|
|
1634
|
-
* @breif 是否总是显示清晰度切换控件,即只有一个清晰度时也显示清晰度切换控件
|
|
1635
|
-
* @default false
|
|
1491
|
+
/**
|
|
1492
|
+
* 是否总是显示清晰度切换控件,即只有一个清晰度时也显示清晰度切换控件
|
|
1493
|
+
* @type {boolean}
|
|
1494
|
+
* @memberof IPlayerConfig
|
|
1636
1495
|
*/
|
|
1637
1496
|
alwaysShowDefinition?: boolean;
|
|
1638
|
-
/**
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1497
|
+
/**
|
|
1498
|
+
* url对应视频的清晰度文案,仅alwaysShowDefinition为true时有效
|
|
1499
|
+
*
|
|
1500
|
+
* @type {string}
|
|
1501
|
+
* @memberof IPlayerConfig
|
|
1641
1502
|
*/
|
|
1642
1503
|
definitionText?: string;
|
|
1643
|
-
/**
|
|
1644
|
-
*
|
|
1645
|
-
*
|
|
1504
|
+
/**
|
|
1505
|
+
* url对应视频的清晰度文案的多语言key,对应参数 languages 中相对应的文案,仅alwaysShowDefinition为true时有效,优先级高于definitionText
|
|
1506
|
+
*
|
|
1507
|
+
* @type {string}
|
|
1508
|
+
* @memberof IPlayerConfig
|
|
1646
1509
|
*/
|
|
1647
1510
|
definitionTextKey?: string;
|
|
1648
|
-
/**
|
|
1649
|
-
*
|
|
1511
|
+
/**
|
|
1512
|
+
* 视频编码方式
|
|
1650
1513
|
* 软解useSoftDecoding设置为true时,提供codec可提升软解初始效率
|
|
1651
|
-
*
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
/** {zh}
|
|
1655
|
-
* @brief 点播服务所在区域,影响服务接口和日志上报
|
|
1656
|
-
* @default cn
|
|
1657
|
-
* @notice 火山引擎海外区域播放时请填写'mya'
|
|
1658
|
-
* @hidden
|
|
1514
|
+
*
|
|
1515
|
+
* @type {CodecType}
|
|
1516
|
+
* @memberof IPlayerConfig
|
|
1659
1517
|
*/
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
*
|
|
1663
|
-
* @
|
|
1518
|
+
codec?: CodecType;
|
|
1519
|
+
/**
|
|
1520
|
+
* 区域,影响服务接口和日志上报
|
|
1521
|
+
* @volcengine/veplayer默认区域为cn, @byteplus/veplayer默认区域为sg
|
|
1522
|
+
* 火山引擎海外区域播放时请填写'sg'
|
|
1523
|
+
*
|
|
1524
|
+
* @type {TRegionType}
|
|
1525
|
+
* @memberof IPlayerConfig
|
|
1664
1526
|
*/
|
|
1665
1527
|
region?: TRegionType;
|
|
1666
|
-
/** {zh}
|
|
1667
|
-
* @brief 插件加载公共路径,用于指定插件的加载路径,或者本地文件服务加载插件
|
|
1668
|
-
* @default https://lf-unpkg.volccdn.com/obj/vcloudfe/sdk/@volcengine/veplayer/${version}/plugin
|
|
1669
|
-
* @notice 可将插件文件夹置于业务方服务器上,指定插件的地址即可
|
|
1670
|
-
*/
|
|
1671
|
-
/** {en}
|
|
1672
|
-
* @brief plug loading public path, used to specify the loading path of the plug-in, or the local file service to load the plug-in
|
|
1673
|
-
* @default https://sf-unpkg.bytepluscdn.com/obj/byteplusfe-sg/sdk/@byteplus/veplayer/${version}/plugin
|
|
1674
|
-
* @notice can place the plug-in folder on the business server and specify the address of the plug-in.
|
|
1675
|
-
*/
|
|
1676
|
-
pluginPublicPath?: string;
|
|
1677
1528
|
/**
|
|
1678
|
-
*
|
|
1679
|
-
* @
|
|
1529
|
+
* 多语言配置key,影响播放器文案的语言种类
|
|
1530
|
+
* @type {'zh' | 'zh-cn' | 'en' | 'jp' | 'zh-hk'}
|
|
1531
|
+
* @memberof IPlayerConfig
|
|
1680
1532
|
*/
|
|
1681
|
-
|
|
1682
|
-
/**
|
|
1683
|
-
*
|
|
1684
|
-
* - `true`:启用,表示视频将在页面文档内播放;
|
|
1685
|
-
* - `false`:停用,默认浏览器播放行为。</br>
|
|
1533
|
+
lang?: "zh" | "zh-cn" | "en" | "jp" | "zh-hk";
|
|
1534
|
+
/**
|
|
1535
|
+
* 插件加载公共路径,用于指定插件的加载路径,或者本地文件服务加载插件
|
|
1686
1536
|
*
|
|
1687
|
-
*
|
|
1688
|
-
* @
|
|
1689
|
-
* - iOS 10 及以上系统 Safari 浏览器支持配置内联播放模式;
|
|
1690
|
-
* - iOS 10 以下系统 Safari 浏览器不支持配置内联播放模式 ,默认播放即进入系统全屏。
|
|
1691
|
-
* @default true
|
|
1692
|
-
*/
|
|
1693
|
-
playsinline?: boolean;
|
|
1694
|
-
/** {zh}
|
|
1695
|
-
* @brief 为播放器设置 video 标签扩展属性,初始化时会设置在 videoElement 或 audioElement 对象上,请参考 [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#properties) 查看其支持的属性配置。
|
|
1696
|
-
* @default 无
|
|
1697
|
-
*/
|
|
1698
|
-
videoAttributes?: Partial<HTMLVideoElement>;
|
|
1699
|
-
/** {zh}
|
|
1700
|
-
* @brief 为播放器设置是否启用流式布局,启用流式布局后播放器会根据屏幕的宽度进行调整,保持在不同屏幕尺寸上都有良好的显示效果。
|
|
1701
|
-
* - `true`:启用
|
|
1702
|
-
* - `false`:停用
|
|
1703
|
-
* @listtip
|
|
1704
|
-
* 启用流式布局时:
|
|
1705
|
-
* - 如果 `width` 和 `height` 是 `Number` 类型,则按照其数值计算播放器宽高比;
|
|
1706
|
-
* - 如果 `width` 和 `height` 不是 `Number` 类型,默认使用 16:9 比例。
|
|
1707
|
-
* @default false
|
|
1537
|
+
* @type {(string)}
|
|
1538
|
+
* @memberof IPlayerConfig
|
|
1708
1539
|
*/
|
|
1709
|
-
|
|
1710
|
-
/**
|
|
1711
|
-
*
|
|
1712
|
-
* - `fixed`: 保持容器宽/高,不做适配;
|
|
1713
|
-
* - `fixWidth`: 保持容器宽度,适配高度;
|
|
1714
|
-
* - `fixHeight`: 保持容器高度,适配宽度。
|
|
1540
|
+
pluginPublicPath?: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* 是否音乐播放器模式
|
|
1715
1543
|
*
|
|
1716
|
-
* @
|
|
1717
|
-
|
|
1718
|
-
fitVideoSize?: "fixWidth" | "fixHeight" | "fixed";
|
|
1719
|
-
/** {zh}
|
|
1720
|
-
* @brief 为播放器设置视频画面填充模式,可选项有:
|
|
1721
|
-
* - `fillwidth`: 填充宽度,高度溢出则裁剪高度;
|
|
1722
|
-
* - `fillHeight`: 填充高度,宽度溢出则裁剪宽度;
|
|
1723
|
-
* - `fill`: 拉伸视频以填充容器;
|
|
1724
|
-
* - `cover`: 保持其宽高比的同时填充元素的整个内容框;
|
|
1725
|
-
* - `auto`: 使用浏览器默认的视频画面填充模式。
|
|
1726
|
-
* @default auto
|
|
1727
|
-
*/
|
|
1728
|
-
videoFillMode?: "auto" | "fillHeight" | "fillWidth" | "fill" | "cover";
|
|
1729
|
-
/** {zh}
|
|
1730
|
-
* @brief 是否开启画面和控制栏分离模式。设置为开启时,控制栏将会常驻,与视频画面不重叠。
|
|
1731
|
-
* - `true`:开启
|
|
1732
|
-
* - `false`:关闭
|
|
1733
|
-
* @default false
|
|
1734
|
-
*/
|
|
1735
|
-
marginControls?: boolean;
|
|
1736
|
-
/** {zh}
|
|
1737
|
-
* @brief 启用x5内核浏览器的同层播放。
|
|
1738
|
-
* @default 无
|
|
1739
|
-
*/
|
|
1740
|
-
"x5-video-player-type"?: string;
|
|
1741
|
-
/** {zh}
|
|
1742
|
-
* @brief 是否启用x5内核浏览器的全屏播放模式。
|
|
1743
|
-
* - `true`:启用
|
|
1744
|
-
* - `false`:停用
|
|
1745
|
-
* @default 无
|
|
1746
|
-
*/
|
|
1747
|
-
"x5-video-player-fullscreen"?: boolean;
|
|
1748
|
-
/** {zh}
|
|
1749
|
-
* @brief x5内核浏览器的横竖屏控制,支持如下取值:
|
|
1750
|
-
* - `landscape`:横屏
|
|
1751
|
-
* - `portrait`:竖屏
|
|
1752
|
-
* - `landscape|portrait`:跟随手机自动旋转
|
|
1753
|
-
* @default mobile:`landscape|portrait`,pc:-
|
|
1754
|
-
*/
|
|
1755
|
-
"x5-video-orientation"?: "landscape" | "portrait" | "landscape|portrait";
|
|
1756
|
-
/** {zh}
|
|
1757
|
-
* @brief 为播放器配置关键点样式。
|
|
1758
|
-
* @default 无
|
|
1759
|
-
* @hidden 直播目前没用到
|
|
1760
|
-
*/
|
|
1761
|
-
commonStyle?: ICommonStyle;
|
|
1762
|
-
/** {zh}
|
|
1763
|
-
* @brief 是否启用音乐播放器模式
|
|
1764
|
-
* @default `false`
|
|
1544
|
+
* @type {boolean}
|
|
1545
|
+
* @memberof IPlayerConfig
|
|
1765
1546
|
*/
|
|
1766
1547
|
isMusic?: boolean;
|
|
1767
|
-
/**
|
|
1768
|
-
* @hidden
|
|
1548
|
+
/**
|
|
1769
1549
|
* 是否开启播放器原生控件菜单(右键触发)
|
|
1770
1550
|
* @default false 默认不开启
|
|
1771
1551
|
*
|
|
@@ -1773,177 +1553,249 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
1773
1553
|
* @memberof IPlayerConfig
|
|
1774
1554
|
*/
|
|
1775
1555
|
enableContextmenu?: boolean;
|
|
1776
|
-
/**
|
|
1777
|
-
*
|
|
1778
|
-
* @default
|
|
1556
|
+
/**
|
|
1557
|
+
* 关闭video上的阻止事件传播
|
|
1558
|
+
* @default false 默认不阻止
|
|
1559
|
+
*
|
|
1560
|
+
* @type {boolean}
|
|
1561
|
+
* @memberof IPlayerConfig
|
|
1779
1562
|
*/
|
|
1780
1563
|
closeVideoStopPropagation?: boolean;
|
|
1781
|
-
/**
|
|
1782
|
-
*
|
|
1783
|
-
* @default
|
|
1564
|
+
/**
|
|
1565
|
+
* 右键菜单是否可用,启用后enableContextmenu强制为false
|
|
1566
|
+
* @default false 默认不可用
|
|
1567
|
+
*
|
|
1568
|
+
* @type {boolean}
|
|
1569
|
+
* @memberof IPlayerConfig
|
|
1784
1570
|
*/
|
|
1785
1571
|
enableMenu?: boolean;
|
|
1786
|
-
/**
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
1572
|
+
/**
|
|
1573
|
+
* 是否开启hls的MSE模式,仅移动端生效,开启后采用MSE方式播放HLS,默认在移动端使用原生video播放hls
|
|
1574
|
+
*
|
|
1575
|
+
* @type {boolean}
|
|
1576
|
+
* @memberof IPlayerConfig
|
|
1789
1577
|
*/
|
|
1790
1578
|
enableHlsMSE?: boolean;
|
|
1791
|
-
/**
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
1794
|
-
*
|
|
1795
|
-
* @
|
|
1579
|
+
/**
|
|
1580
|
+
* 在PC Safari上是否不使用hls插件播放,默认true。true: 启用;false: 不启用
|
|
1581
|
+
*
|
|
1582
|
+
* @type {boolean}
|
|
1583
|
+
* @memberof IPlayerConfig
|
|
1796
1584
|
*/
|
|
1797
1585
|
useHlsPluginForSafari?: boolean;
|
|
1798
|
-
/**
|
|
1799
|
-
*
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
1586
|
+
/**
|
|
1587
|
+
* 是否开启mp4的MSE模式,开启后采用MSE方式播放MP4,
|
|
1588
|
+
* 同时带来精确的seek加载、视频的无缝切换、流量节省等功能
|
|
1589
|
+
*
|
|
1590
|
+
* @type {boolean}
|
|
1591
|
+
* @memberof IPlayerConfig
|
|
1802
1592
|
*/
|
|
1803
1593
|
enableMp4MSE?: boolean;
|
|
1804
|
-
/**
|
|
1805
|
-
*
|
|
1594
|
+
/**
|
|
1595
|
+
* 播放列表
|
|
1806
1596
|
* @notes url和playList必填一个,二者都传入时, url必须在playList中。
|
|
1807
|
-
*
|
|
1597
|
+
*
|
|
1598
|
+
* @type {Stream[]}
|
|
1599
|
+
* @memberof IPlayerConfig
|
|
1808
1600
|
*/
|
|
1809
1601
|
playList?: Stream[];
|
|
1810
|
-
/**
|
|
1811
|
-
*
|
|
1812
|
-
*
|
|
1602
|
+
/**
|
|
1603
|
+
* 插件,可自行选择高级插件。
|
|
1604
|
+
* 目前支持的高级插件为: DefinitionDemotePlugin
|
|
1605
|
+
*
|
|
1606
|
+
* @type {any[]}
|
|
1607
|
+
* @memberof IPlayerConfig
|
|
1813
1608
|
*/
|
|
1814
1609
|
plugins?: any[];
|
|
1815
|
-
/**
|
|
1816
|
-
*
|
|
1817
|
-
* @default []
|
|
1818
|
-
*/
|
|
1819
|
-
ignores?: string[];
|
|
1820
|
-
/** {zh}
|
|
1821
|
-
* @brief 默认配置
|
|
1610
|
+
/**
|
|
1611
|
+
* 默认配置
|
|
1822
1612
|
* @hidden
|
|
1613
|
+
*
|
|
1614
|
+
* @type {IDefaultConfig}
|
|
1615
|
+
* @memberof IPlayerConfig
|
|
1823
1616
|
*/
|
|
1824
1617
|
defaultConfig?: IDefaultConfig;
|
|
1825
|
-
/**
|
|
1618
|
+
/**
|
|
1619
|
+
* 设置多语言词典,可设置每个语言的多语言词典,
|
|
1620
|
+
* 例如:
|
|
1621
|
+
* {
|
|
1622
|
+
* zh: {
|
|
1623
|
+
* PIP: '画中画'
|
|
1624
|
+
* },
|
|
1625
|
+
* en: {
|
|
1626
|
+
* PIP: 'pip'
|
|
1627
|
+
* }
|
|
1628
|
+
* }
|
|
1629
|
+
*
|
|
1630
|
+
* @type {{ [key: string]: Record<string, any> }}
|
|
1631
|
+
* @memberof IPlayerConfig
|
|
1632
|
+
*/
|
|
1633
|
+
languages?: {
|
|
1634
|
+
[key: string]: Record<string, any>;
|
|
1635
|
+
};
|
|
1636
|
+
/**
|
|
1826
1637
|
* @hidden
|
|
1827
|
-
*
|
|
1638
|
+
*
|
|
1639
|
+
* @type {boolean}
|
|
1640
|
+
* @memberof IPlayerConfig
|
|
1828
1641
|
*/
|
|
1829
1642
|
isMobile?: boolean;
|
|
1830
|
-
/**
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
1643
|
+
/**
|
|
1644
|
+
* umd依赖备用地址
|
|
1645
|
+
* 用于依赖的CDN发生网络错误时的降级备用地址
|
|
1833
1646
|
* 支持的依赖有hls(非加密hls播放)、flv(flv播放)、XGVideo(软解播放)、hlsEncrypt(加密hls播放)、dash(dash播放)、mp4Encrypt(加密np4播放)、danmujs(弹幕)、danmuMask(蒙版弹幕)、subtitle(外挂字幕)
|
|
1834
|
-
* @example 以配置hls插件的备用地址为例
|
|
1835
|
-
* ```
|
|
1836
|
-
* const playerSdkIns = new VePlayer({
|
|
1837
|
-
* url: 'demo.m3u8',
|
|
1838
|
-
* id: 'video',
|
|
1839
|
-
* umdUrlMap: {
|
|
1840
|
-
* hls: '/VePlayerPlugin/hls.js'
|
|
1841
|
-
* }
|
|
1842
|
-
* })
|
|
1843
|
-
* ```
|
|
1844
|
-
* @default -
|
|
1845
|
-
* @notice 插件可以从{@link https://www.volcengine.com/docs/4/67077 集成SDK} 章节中下载SDK离线包获取
|
|
1846
1647
|
*/
|
|
1847
1648
|
umdUrlMap?: Record<string, string>;
|
|
1848
1649
|
/**
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
* @brief 是否启用软解
|
|
1855
|
-
* @default `false`
|
|
1650
|
+
* 是否启用软解
|
|
1651
|
+
* 默认: false
|
|
1652
|
+
*
|
|
1653
|
+
* @type {boolean}
|
|
1654
|
+
* @memberof IPlayerConfig
|
|
1856
1655
|
*/
|
|
1857
1656
|
useSoftDecoding?: boolean;
|
|
1858
|
-
/**
|
|
1859
|
-
*
|
|
1860
|
-
*
|
|
1657
|
+
/**
|
|
1658
|
+
* 是否开H265播放降级,即H.265硬解不支持时自动降级为软解
|
|
1659
|
+
*
|
|
1660
|
+
* @type {boolean}
|
|
1661
|
+
* @memberof IPlayerConfig
|
|
1861
1662
|
*/
|
|
1862
1663
|
enableH265Degrade?: boolean;
|
|
1863
|
-
/**
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
* @
|
|
1664
|
+
/**
|
|
1665
|
+
* 资源过期时的回调函数,用来更新视频资源
|
|
1666
|
+
*
|
|
1667
|
+
* @type {(any) => Promise<IPlayerConfig>}
|
|
1668
|
+
* @memberof IPlayerConfig
|
|
1867
1669
|
*/
|
|
1868
1670
|
onMediaExpired?: () => Promise<IPlayerConfig>;
|
|
1869
|
-
/**
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1671
|
+
/**
|
|
1672
|
+
* playAuthToken过期时的回调函数,用来更新playAuthToken
|
|
1673
|
+
*
|
|
1674
|
+
* @type {(any) => Promise<IPlayAuthTokenConfig>}
|
|
1675
|
+
* @memberof IPlayerConfig
|
|
1872
1676
|
*/
|
|
1873
1677
|
onTokenExpired?: () => Promise<IPlayAuthTokenConfig>;
|
|
1874
|
-
/**
|
|
1875
|
-
*
|
|
1876
|
-
*
|
|
1877
|
-
* @
|
|
1678
|
+
/**
|
|
1679
|
+
* 定期检查资源过期的周期,单位秒,默认400
|
|
1680
|
+
*
|
|
1681
|
+
* @type {boolean}
|
|
1682
|
+
* @memberof IPlayerConfig
|
|
1878
1683
|
*/
|
|
1879
1684
|
checkExpireInterval?: number;
|
|
1880
|
-
/**
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
*
|
|
1884
|
-
*
|
|
1885
|
-
*
|
|
1685
|
+
/**
|
|
1686
|
+
* 定期检查资源过期的方式,支持三种类型
|
|
1687
|
+
* urlExpire 根据url的过期时间判断
|
|
1688
|
+
* xhrStatus 发送资源请求,根据资源xhr状态判断
|
|
1689
|
+
* getUrlTime 根据估算的地址获取时间判断
|
|
1690
|
+
* @type {boolean}
|
|
1691
|
+
* @memberof IPlayerConfig
|
|
1886
1692
|
*/
|
|
1887
|
-
expireDetectType?: Array<"
|
|
1888
|
-
/**
|
|
1889
|
-
*
|
|
1890
|
-
*
|
|
1891
|
-
* @
|
|
1693
|
+
expireDetectType?: Array<"xhrStatus" | "getUrlTime">;
|
|
1694
|
+
/**
|
|
1695
|
+
* 有声音自动播放失败时是否降级成静音自动播放,默认不降级
|
|
1696
|
+
*
|
|
1697
|
+
* @type {boolean}
|
|
1698
|
+
* @memberof IPlayerConfig
|
|
1699
|
+
*/
|
|
1700
|
+
enableDegradeMuteAutoplay?: boolean;
|
|
1701
|
+
/**
|
|
1702
|
+
* 启用微信jsBridge方式的自动播放,默认不开启
|
|
1703
|
+
*
|
|
1704
|
+
* @type {boolean}
|
|
1705
|
+
* @memberof IPlayerConfig
|
|
1706
|
+
*/
|
|
1707
|
+
enableWxJsBridgeAutoplay?: boolean;
|
|
1708
|
+
/**
|
|
1709
|
+
* 开启任意点击的用户行为触发自动播放,默认不开启
|
|
1710
|
+
*
|
|
1711
|
+
* @type {boolean}
|
|
1712
|
+
* @memberof IPlayerConfig
|
|
1713
|
+
*/
|
|
1714
|
+
enableUserActionAutoplay?: boolean;
|
|
1715
|
+
/**
|
|
1716
|
+
* 禁用点播日志配置检测,默认开启,如果未配置line_app_id则会播放报错
|
|
1717
|
+
*
|
|
1718
|
+
* @type {boolean}
|
|
1719
|
+
* @memberof IPlayerConfig
|
|
1892
1720
|
*/
|
|
1893
1721
|
disableVodLogOptsCheck?: boolean;
|
|
1894
|
-
/**
|
|
1895
|
-
*
|
|
1896
|
-
*
|
|
1722
|
+
/**
|
|
1723
|
+
* 播放器报错展示配置, 可以配置播放异常时的播放器显示的异常文案、图片,以及是否提供刷新按钮等
|
|
1724
|
+
*
|
|
1897
1725
|
*/
|
|
1898
1726
|
sdkErrorPlugin?: ISdkErrorConfig;
|
|
1899
|
-
/**
|
|
1900
|
-
*
|
|
1727
|
+
/**
|
|
1728
|
+
* rtm配置,配置rtm拉流参数
|
|
1901
1729
|
* @notes 传入rtm流url时才生效
|
|
1902
|
-
*
|
|
1730
|
+
*
|
|
1731
|
+
* @type {IRtmConfig}
|
|
1732
|
+
* @memberof IPlayerConfig
|
|
1903
1733
|
*/
|
|
1904
1734
|
rtm?: IRtmConfig;
|
|
1905
1735
|
/**
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1736
|
+
* 弹幕及面板配置,可配置弹幕的一些参数,如弹幕文字大小、透明度、展示区域等,
|
|
1737
|
+
*
|
|
1738
|
+
* @type {InitConfig | boolean}
|
|
1739
|
+
* @memberof IPlayerConfig
|
|
1740
|
+
*/
|
|
1741
|
+
DanmuPlugin?: InitConfig | boolean;
|
|
1742
|
+
/**
|
|
1743
|
+
* 清晰度自动降级配置
|
|
1744
|
+
* @notes 需要先引入DefinitionDemotePlugin插件,plugins: [window.VePlayer.DefinitionDemotePlugin]
|
|
1745
|
+
*
|
|
1746
|
+
* @type {IDefinitionDemotePlugin}
|
|
1747
|
+
* @memberof IPlayerConfig
|
|
1748
|
+
*/
|
|
1749
|
+
DefinitionDemotePlugin?: IDefinitionDemotePlugin;
|
|
1750
|
+
/**
|
|
1751
|
+
* 唯一id,用于私有DRM加密
|
|
1752
|
+
*
|
|
1753
|
+
* @type {string}
|
|
1754
|
+
* @memberof IPlayerConfig
|
|
1908
1755
|
*/
|
|
1909
|
-
|
|
1756
|
+
unionId?: string;
|
|
1910
1757
|
/**
|
|
1911
|
-
*
|
|
1912
|
-
* @
|
|
1913
|
-
*
|
|
1758
|
+
* vid播放配置项
|
|
1759
|
+
* @notes 需要业务方服务端通过vid生成临时playAuthToken
|
|
1760
|
+
*
|
|
1761
|
+
* @type {IPlayAuthTokenConfig}
|
|
1762
|
+
* @memberof IPlayerConfig
|
|
1914
1763
|
*/
|
|
1915
|
-
|
|
1764
|
+
getVideoByToken?: IPlayAuthTokenConfig;
|
|
1916
1765
|
/**
|
|
1917
|
-
*
|
|
1918
|
-
* @
|
|
1919
|
-
* @
|
|
1766
|
+
* dash 播放配置项
|
|
1767
|
+
* @type {Partial<IDashPluginConfig>}
|
|
1768
|
+
* @memberof IPlayerConfig
|
|
1920
1769
|
*/
|
|
1921
1770
|
DASHPlugin?: Partial<IDashPluginConfig>;
|
|
1922
1771
|
/**
|
|
1923
|
-
*
|
|
1924
|
-
* @
|
|
1772
|
+
* hls 加密播放配置项
|
|
1773
|
+
* @type {Partial<IEncryptHlsPluginConfig> | boolean}
|
|
1774
|
+
* @memberof IPlayerConfig
|
|
1925
1775
|
*/
|
|
1926
1776
|
EncryptHlsPlugin?: Partial<IEncryptHlsPluginConfig> | boolean;
|
|
1927
1777
|
/**
|
|
1928
|
-
*
|
|
1929
|
-
* @
|
|
1778
|
+
* 质量日志配置项
|
|
1779
|
+
* @type {Partial<IVodLogOptsConfig>}
|
|
1780
|
+
* @memberof IPlayerConfig
|
|
1930
1781
|
*/
|
|
1931
1782
|
vodLogOpts?: Partial<IVodLogOptsConfig>;
|
|
1932
1783
|
/**
|
|
1933
|
-
*
|
|
1934
|
-
* @
|
|
1935
|
-
* @
|
|
1784
|
+
* mp4加密播放配置项
|
|
1785
|
+
* @type {Partial<IMp4EncryptPlayerConfig> | boolean}
|
|
1786
|
+
* @memberof IPlayerConfig
|
|
1936
1787
|
*/
|
|
1937
1788
|
Mp4EncryptPlayer?: Partial<IMp4EncryptPlayerConfig> | boolean;
|
|
1938
1789
|
/**
|
|
1939
|
-
*
|
|
1940
|
-
* @
|
|
1941
|
-
* @
|
|
1790
|
+
* 自适应码率配置项
|
|
1791
|
+
* @type {IAutoBitrateOptsConfig}
|
|
1792
|
+
* @memberof IPlayerConfig
|
|
1942
1793
|
*/
|
|
1943
1794
|
autoBitrateOpts?: IAutoBitrateOptsConfig;
|
|
1944
1795
|
/**
|
|
1945
|
-
*
|
|
1946
|
-
* @
|
|
1796
|
+
* 外挂字幕配置项
|
|
1797
|
+
* @type {ISubtitleConfig}
|
|
1798
|
+
* @memberof IPlayerConfig
|
|
1947
1799
|
*/
|
|
1948
1800
|
Subtitle?: ISubtitleConfig;
|
|
1949
1801
|
/**
|
|
@@ -2036,80 +1888,105 @@ export interface IDefaultConfig {
|
|
|
2036
1888
|
LiveSubtitlesIconPlugin?: any;
|
|
2037
1889
|
}
|
|
2038
1890
|
/**
|
|
2039
|
-
*
|
|
2040
|
-
*
|
|
2041
|
-
* @
|
|
1891
|
+
* vid播放配置信息
|
|
1892
|
+
*
|
|
1893
|
+
* @detail Options
|
|
1894
|
+
* @description PlayAuthToken获取视频信息配置
|
|
1895
|
+
* @export
|
|
1896
|
+
* @interface IPlayAuthTokenConfig
|
|
2042
1897
|
*/
|
|
2043
1898
|
export interface IPlayAuthTokenConfig {
|
|
2044
|
-
/**
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
1899
|
+
/**
|
|
1900
|
+
* 服务端生成的临时playAuthToken
|
|
1901
|
+
*
|
|
1902
|
+
* @type {string}
|
|
1903
|
+
* @memberof IPlayAuthTokenConfig
|
|
2047
1904
|
*/
|
|
2048
1905
|
playAuthToken: string;
|
|
2049
|
-
/**
|
|
2050
|
-
*
|
|
2051
|
-
*
|
|
1906
|
+
/**
|
|
1907
|
+
* 默认清晰度
|
|
1908
|
+
*
|
|
2052
1909
|
* @notes 为空时默认为最大码率的清晰度
|
|
1910
|
+
* @type {string}
|
|
1911
|
+
* @memberof IPlayAuthTokenConfig
|
|
2053
1912
|
*/
|
|
2054
1913
|
defaultDefinition?: string;
|
|
2055
|
-
/**
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
* @
|
|
2061
|
-
* @default `https://vod.byteplusapi.com`
|
|
1914
|
+
/**
|
|
1915
|
+
* 求地址接口域名
|
|
1916
|
+
*
|
|
1917
|
+
* @notes 默认为`//vod.volcengineapi.com`
|
|
1918
|
+
* @type {string}
|
|
1919
|
+
* @memberof IPlayAuthTokenConfig
|
|
2062
1920
|
*/
|
|
2063
1921
|
playDomain?: string;
|
|
2064
|
-
/**
|
|
2065
|
-
*
|
|
2066
|
-
* @
|
|
1922
|
+
/**
|
|
1923
|
+
* 是否启用控制台设置的封面图,默认false
|
|
1924
|
+
* @type {boolean}
|
|
1925
|
+
* @memberof IPlayAuthTokenConfig
|
|
2067
1926
|
*/
|
|
2068
1927
|
needPoster?: boolean;
|
|
2069
|
-
/**
|
|
2070
|
-
*
|
|
2071
|
-
* @
|
|
1928
|
+
/**
|
|
1929
|
+
* 是否启用控制台设置的雪碧图,默认false
|
|
1930
|
+
* @type {boolean}
|
|
1931
|
+
* @memberof IPlayAuthTokenConfig
|
|
2072
1932
|
*/
|
|
2073
1933
|
needThumbs?: boolean;
|
|
2074
|
-
/**
|
|
2075
|
-
*
|
|
2076
|
-
* @
|
|
1934
|
+
/**
|
|
1935
|
+
* 是否启用控制台设置的蒙版弹幕,默认false
|
|
1936
|
+
* @type {boolean}
|
|
1937
|
+
* @memberof IPlayAuthTokenConfig
|
|
2077
1938
|
*/
|
|
2078
1939
|
needBarrageMask?: boolean;
|
|
2079
|
-
/**
|
|
2080
|
-
*
|
|
2081
|
-
* @
|
|
1940
|
+
/**
|
|
1941
|
+
* 是否需要多清晰度,默认为true
|
|
1942
|
+
* @type {boolean}
|
|
1943
|
+
* @memberof IPlayAuthTokenConfig
|
|
2082
1944
|
*/
|
|
2083
1945
|
needDefinitionList?: boolean;
|
|
2084
|
-
/**
|
|
2085
|
-
*
|
|
2086
|
-
* @
|
|
1946
|
+
/**
|
|
1947
|
+
* hls标准加密播放所用的keyToken
|
|
1948
|
+
* @type {boolean}
|
|
1949
|
+
* @memberof IPlayAuthTokenConfig
|
|
2087
1950
|
*/
|
|
2088
1951
|
keyToken?: string;
|
|
2089
|
-
/**
|
|
2090
|
-
*
|
|
2091
|
-
* @
|
|
2092
|
-
* @
|
|
1952
|
+
/**
|
|
1953
|
+
* 密钥请求域名
|
|
1954
|
+
* @type {string}
|
|
1955
|
+
* @memberof IPlayAuthTokenConfig
|
|
1956
|
+
*/
|
|
1957
|
+
keyDomain?: string;
|
|
1958
|
+
/**
|
|
1959
|
+
* 获取key方式,默认'TOP'
|
|
1960
|
+
* @type {string}
|
|
1961
|
+
* @memberof IPlayAuthTokenConfig
|
|
2093
1962
|
*/
|
|
2094
1963
|
getKeyType?: string;
|
|
2095
|
-
/**
|
|
2096
|
-
*
|
|
1964
|
+
/**
|
|
1965
|
+
* 获取privateDrmAuthToken的异步回调,
|
|
1966
|
+
* @type {(
|
|
1967
|
+
* playAuthIds: string,
|
|
1968
|
+
* vid: string,
|
|
1969
|
+
* unionInfo: string,
|
|
1970
|
+
* ) => Promise<string>}
|
|
2097
1971
|
* 回调入参:
|
|
2098
|
-
*
|
|
2099
|
-
*
|
|
2100
|
-
*
|
|
2101
|
-
* @
|
|
1972
|
+
* 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时以英文逗号相连
|
|
1973
|
+
* vid 视频vid
|
|
1974
|
+
* unionInfo 由unionId生成的unionInfo,以用来加密PrivateDrmAuthToken
|
|
1975
|
+
* @memberof IPlayAuthTokenConfig
|
|
1976
|
+
*
|
|
2102
1977
|
*/
|
|
2103
1978
|
getDrmAuthToken?: (playAuthIds: string, vid: string, unionInfo: string) => Promise<string>;
|
|
2104
|
-
/**
|
|
2105
|
-
*
|
|
1979
|
+
/**
|
|
1980
|
+
* 可携带aid等透传参数,如
|
|
2106
1981
|
* {aid: 1234},以playAuthToken下发的参数的优先级最高。
|
|
2107
1982
|
* 具体可传参数见{@link https://www.volcengine.com/docs/4/65659 签发 PlayAuthToken}
|
|
2108
|
-
*
|
|
1983
|
+
*
|
|
1984
|
+
* @type {Record<string, number | string | boolean>}
|
|
1985
|
+
* @memberof IPlayAuthTokenConfig
|
|
2109
1986
|
*/
|
|
2110
1987
|
reqParams?: Record<string, number | string | boolean>;
|
|
2111
|
-
/**
|
|
2112
|
-
*
|
|
1988
|
+
/**
|
|
1989
|
+
* 定义清晰度的映射
|
|
2113
1990
|
*
|
|
2114
1991
|
* @example 如:
|
|
2115
1992
|
* ``` javascript
|
|
@@ -2132,19 +2009,21 @@ export interface IPlayAuthTokenConfig {
|
|
|
2132
2009
|
* }
|
|
2133
2010
|
* ```
|
|
2134
2011
|
* `definitionTextKey`用来指定多语言的key
|
|
2135
|
-
* @
|
|
2012
|
+
* @type {Record<string, string | definitionItem>}
|
|
2013
|
+
* @memberof IPlayAuthTokenConfig
|
|
2136
2014
|
*/
|
|
2137
2015
|
definitionMap?: Record<string, string | definitionItem>;
|
|
2138
|
-
/**
|
|
2139
|
-
*
|
|
2140
|
-
* @
|
|
2016
|
+
/**
|
|
2017
|
+
* 服务502错误时重试次数,默认为1
|
|
2018
|
+
* @type {number}
|
|
2019
|
+
* @memberof IPlayAuthTokenConfig
|
|
2141
2020
|
*/
|
|
2142
2021
|
retryCount?: number;
|
|
2143
2022
|
}
|
|
2144
2023
|
/**
|
|
2145
2024
|
* 清晰度定义
|
|
2146
2025
|
*
|
|
2147
|
-
* @
|
|
2026
|
+
* @detail Options
|
|
2148
2027
|
* @export
|
|
2149
2028
|
* @interface definitionItem
|
|
2150
2029
|
*/
|
|
@@ -2216,9 +2095,9 @@ export interface IAutoBitrateOptsConfig {
|
|
|
2216
2095
|
module?: any;
|
|
2217
2096
|
}
|
|
2218
2097
|
/**
|
|
2219
|
-
*
|
|
2220
|
-
*
|
|
2221
|
-
* @
|
|
2098
|
+
* 初始配置
|
|
2099
|
+
*
|
|
2100
|
+
* @export
|
|
2222
2101
|
* @interface IMemoryPlayConfig
|
|
2223
2102
|
*/
|
|
2224
2103
|
export interface IMemoryPlayConfig {
|
|
@@ -2244,180 +2123,6 @@ export interface IMemoryPlayConfig {
|
|
|
2244
2123
|
*/
|
|
2245
2124
|
getTime: (id: number | string) => number | Promise<number>;
|
|
2246
2125
|
}
|
|
2247
|
-
export declare const enum POSITIONS {
|
|
2248
|
-
ROOT = "root",
|
|
2249
|
-
ROOT_LEFT = "rootLeft",
|
|
2250
|
-
ROOT_RIGHT = "rootRight",
|
|
2251
|
-
ROOT_TOP = "rootTop",
|
|
2252
|
-
CONTROLS_LEFT = "controlsLeft",
|
|
2253
|
-
CONTROLS_RIGTH = "controlsRight",
|
|
2254
|
-
CONTROLS_RIGHT = "controlsRight",
|
|
2255
|
-
CONTROLS_CENTER = "controlsCenter",
|
|
2256
|
-
CONTROLS = "controls"
|
|
2257
|
-
}
|
|
2258
|
-
export interface IIconPluginConfig {
|
|
2259
|
-
position?: POSITIONS;
|
|
2260
|
-
index?: number;
|
|
2261
|
-
}
|
|
2262
|
-
/**
|
|
2263
|
-
* @brief 画中画配置项
|
|
2264
|
-
* @list Options
|
|
2265
|
-
* @kind property
|
|
2266
|
-
*/
|
|
2267
|
-
export interface IPIPConfig extends IIconPluginConfig {
|
|
2268
|
-
/** {zh}
|
|
2269
|
-
* @brief 是否显示画中画按钮
|
|
2270
|
-
* - `true`:是,显示
|
|
2271
|
-
* - `false`:否,不显示
|
|
2272
|
-
* @default `false`
|
|
2273
|
-
*/
|
|
2274
|
-
showIcon?: boolean;
|
|
2275
|
-
/** {zh}
|
|
2276
|
-
* @brief 是否优先采用文档画中画,仅浏览器支持 DocumentPictureInPicture 才生效
|
|
2277
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/DocumentPictureInPicture DocumentPictureInPicture}
|
|
2278
|
-
* - `true`:是,优先使用文档画中画
|
|
2279
|
-
* - `false`:否
|
|
2280
|
-
* @default `false`
|
|
2281
|
-
*/
|
|
2282
|
-
preferDocument?: boolean;
|
|
2283
|
-
/** {zh}
|
|
2284
|
-
* @brief 文档画中画窗口的宽度
|
|
2285
|
-
* @default -
|
|
2286
|
-
*/
|
|
2287
|
-
width?: number;
|
|
2288
|
-
/** {zh}
|
|
2289
|
-
* @brief 文档画中画窗口的高度
|
|
2290
|
-
* @default -
|
|
2291
|
-
*/
|
|
2292
|
-
height?: number;
|
|
2293
|
-
/** {zh}
|
|
2294
|
-
* @brief 文档画中画窗口的根节点
|
|
2295
|
-
* @default -
|
|
2296
|
-
*/
|
|
2297
|
-
docPiPNode?: HTMLElement;
|
|
2298
|
-
/** {zh}
|
|
2299
|
-
* @brief 文档画中画窗口的css style
|
|
2300
|
-
* @default -
|
|
2301
|
-
*/
|
|
2302
|
-
docPiPStyle?: ((...arg: any) => string) | string;
|
|
2303
|
-
}
|
|
2304
|
-
/**
|
|
2305
|
-
* @brief 全屏配置
|
|
2306
|
-
* @list Options
|
|
2307
|
-
* @kind property
|
|
2308
|
-
*/
|
|
2309
|
-
export interface IFullscreenConfig {
|
|
2310
|
-
/** {zh}
|
|
2311
|
-
* @brief 是否使用页面全屏代替全屏功能。取值如下:
|
|
2312
|
-
- `true`:页面全屏;
|
|
2313
|
-
- `false`:系统全屏。
|
|
2314
|
-
* @default `false`
|
|
2315
|
-
*/
|
|
2316
|
-
useCssFullscreen?: boolean;
|
|
2317
|
-
/** {zh}
|
|
2318
|
-
* @brief 是否使用旋转横屏。取值如下:
|
|
2319
|
-
* - `false`:否。
|
|
2320
|
-
* - `true`:是,即全屏将会在竖屏状态下把 dom 旋转 90 度实现横屏效果。
|
|
2321
|
-
* @default `false`
|
|
2322
|
-
* @notice
|
|
2323
|
-
* - 该配置优先于 `useCssFullscreen` 配置。
|
|
2324
|
-
* - 该配置一般在移动端使用。
|
|
2325
|
-
*/
|
|
2326
|
-
rotateFullscreen?: boolean;
|
|
2327
|
-
/** {zh}
|
|
2328
|
-
* @brief 自定义全屏作用的dom,默认是播放器根节点, 该配置项必须是player.root的父辈节点,使用场景是解决全屏下和player.root同级的dom需要显示的场景
|
|
2329
|
-
* @default `null`
|
|
2330
|
-
*/
|
|
2331
|
-
target?: HTMLElement;
|
|
2332
|
-
/** {zh}
|
|
2333
|
-
* @brief 是否禁用全凭按钮功能,禁用后不渲染全屏按钮
|
|
2334
|
-
* - `true`:禁用;
|
|
2335
|
-
* - `false`:不禁用。
|
|
2336
|
-
* @default `false`
|
|
2337
|
-
*/
|
|
2338
|
-
disable?: boolean;
|
|
2339
|
-
/** {zh}
|
|
2340
|
-
* @brief 全屏的时候是否使用右上角返回按钮
|
|
2341
|
-
* - `true`:显示;
|
|
2342
|
-
* - `false`:不显示。
|
|
2343
|
-
* @default `false`
|
|
2344
|
-
* @notice 该配置一般在移动端开启
|
|
2345
|
-
*/
|
|
2346
|
-
needBackIcon?: boolean;
|
|
2347
|
-
/** {zh}
|
|
2348
|
-
* @brief 全屏切换自定义实现,该函数配置相当于完全替代插件内部的切换逻辑
|
|
2349
|
-
* @default `null`
|
|
2350
|
-
*/
|
|
2351
|
-
switchCallback?: (...arg: any) => any;
|
|
2352
|
-
}
|
|
2353
|
-
/**
|
|
2354
|
-
* @list Options
|
|
2355
|
-
* @kind property
|
|
2356
|
-
*/
|
|
2357
|
-
export interface ICommonStyle {
|
|
2358
|
-
/** {zh}
|
|
2359
|
-
* @brief 进度条底色
|
|
2360
|
-
* @default 无
|
|
2361
|
-
*/
|
|
2362
|
-
progressColor?: string;
|
|
2363
|
-
/** {zh}
|
|
2364
|
-
* @brief 播放完成部分进度条底色
|
|
2365
|
-
* @default 无
|
|
2366
|
-
*/
|
|
2367
|
-
playedColor?: string;
|
|
2368
|
-
/** {zh}
|
|
2369
|
-
* @brief 缓存部分进度条底色
|
|
2370
|
-
* @default 无
|
|
2371
|
-
*/
|
|
2372
|
-
cachedColor?: string;
|
|
2373
|
-
/** {zh}
|
|
2374
|
-
* @brief 进度条滑块样式
|
|
2375
|
-
* @default 无
|
|
2376
|
-
*/
|
|
2377
|
-
sliderBtnStyle?: CSSStyleDeclaration;
|
|
2378
|
-
/** {zh}
|
|
2379
|
-
* @brief 音量颜色
|
|
2380
|
-
* @default 无
|
|
2381
|
-
*/
|
|
2382
|
-
volumeColor?: string;
|
|
2383
|
-
}
|
|
2384
|
-
/**
|
|
2385
|
-
* @list Options
|
|
2386
|
-
* @brief 封面配置
|
|
2387
|
-
* @kind property
|
|
2388
|
-
*/
|
|
2389
|
-
export interface IPoster {
|
|
2390
|
-
/** {zh}
|
|
2391
|
-
* @brief 封面图地址
|
|
2392
|
-
* @default -
|
|
2393
|
-
*/
|
|
2394
|
-
poster: string;
|
|
2395
|
-
/**
|
|
2396
|
-
* @brief 是否在播放结束之后显示
|
|
2397
|
-
* @default `true`
|
|
2398
|
-
*/
|
|
2399
|
-
isEndedShow?: boolean;
|
|
2400
|
-
/**
|
|
2401
|
-
* @brief 是否播放后隐藏
|
|
2402
|
-
* - `true`:播放后才隐藏,在视频地址更新后会重新显示poster
|
|
2403
|
-
* - `false`:在play事件触发后隐藏poster
|
|
2404
|
-
* @default `false`
|
|
2405
|
-
*/
|
|
2406
|
-
hideCanplay?: boolean;
|
|
2407
|
-
/**
|
|
2408
|
-
* @brief 是否一直显示
|
|
2409
|
-
* @default `false`
|
|
2410
|
-
*/
|
|
2411
|
-
notHidden?: boolean;
|
|
2412
|
-
/**
|
|
2413
|
-
* @brief 封面图填充方式
|
|
2414
|
-
* - `fixWidth`:宽度方向填充,不会被拉伸压缩
|
|
2415
|
-
* - `fixHeight`:高度方向完全填充,不会被拉伸压缩
|
|
2416
|
-
* - `cover`:方式完全覆盖容器,多余但部分会被裁剪
|
|
2417
|
-
* - `contain`:完全覆盖,与容器不匹配时会被拉伸压缩
|
|
2418
|
-
*/
|
|
2419
|
-
fillMode?: "fixWidth" | "fixHeight" | "cover" | "contain";
|
|
2420
|
-
}
|
|
2421
2126
|
export interface ApiMapConfig {
|
|
2422
2127
|
playDomain: string;
|
|
2423
2128
|
backupPlayDomain?: string;
|
|
@@ -2638,14 +2343,15 @@ declare class umdLoader {
|
|
|
2638
2343
|
}
|
|
2639
2344
|
declare class VePlayer {
|
|
2640
2345
|
/**
|
|
2641
|
-
*
|
|
2346
|
+
* 播放相关配置数据
|
|
2642
2347
|
* @hidden
|
|
2348
|
+
*
|
|
2643
2349
|
* @type {PlayerData}
|
|
2644
2350
|
* @memberof VePlayer
|
|
2645
2351
|
*/
|
|
2646
2352
|
playerData: PlayerData;
|
|
2647
2353
|
/**
|
|
2648
|
-
*
|
|
2354
|
+
* 播放器内核实例
|
|
2649
2355
|
* @type {*}
|
|
2650
2356
|
* @memberof VePlayer
|
|
2651
2357
|
*/
|
|
@@ -2753,21 +2459,10 @@ declare class VePlayer {
|
|
|
2753
2459
|
* @memberof VePlayer
|
|
2754
2460
|
*/
|
|
2755
2461
|
sdkUmdLoader: umdLoader;
|
|
2756
|
-
/**
|
|
2757
|
-
* @hidden
|
|
2758
|
-
*/
|
|
2759
2462
|
static isMSESupported: typeof isMSESupport;
|
|
2760
2463
|
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
2761
|
-
/**
|
|
2762
|
-
* @hidden
|
|
2763
|
-
*/
|
|
2764
2464
|
static veStrategy: typeof VeStrategy;
|
|
2765
2465
|
static sdkVersion: string;
|
|
2766
|
-
/**
|
|
2767
|
-
* @hidden
|
|
2768
|
-
* @param codec
|
|
2769
|
-
* @param options
|
|
2770
|
-
*/
|
|
2771
2466
|
static isRTMSupportCodec: (codec: RTMCodec, options: {
|
|
2772
2467
|
targetProfileLevel?: string;
|
|
2773
2468
|
}) => Promise<boolean>;
|
|
@@ -2775,7 +2470,7 @@ declare class VePlayer {
|
|
|
2775
2470
|
constructor(configs: IPlayerConfig);
|
|
2776
2471
|
/**
|
|
2777
2472
|
*
|
|
2778
|
-
*
|
|
2473
|
+
*
|
|
2779
2474
|
* @private
|
|
2780
2475
|
* @param {IPlayerConfig} configs 播放器配置
|
|
2781
2476
|
* @memberof VePlayer
|
|
@@ -2799,10 +2494,6 @@ declare class VePlayer {
|
|
|
2799
2494
|
* @memberof VePlayer
|
|
2800
2495
|
*/
|
|
2801
2496
|
private initUmdLoader;
|
|
2802
|
-
/**
|
|
2803
|
-
* @hidden
|
|
2804
|
-
* @private
|
|
2805
|
-
*/
|
|
2806
2497
|
private checkVodLogOptions;
|
|
2807
2498
|
/**
|
|
2808
2499
|
* @hidden
|
|
@@ -2818,28 +2509,28 @@ declare class VePlayer {
|
|
|
2818
2509
|
onRepeat(): void;
|
|
2819
2510
|
/**
|
|
2820
2511
|
* @hidden
|
|
2821
|
-
* @
|
|
2512
|
+
* @description 触发过期事件
|
|
2822
2513
|
* @memberof VePlayer
|
|
2823
2514
|
*/
|
|
2824
2515
|
emitExpireEvent(): void;
|
|
2825
2516
|
/**
|
|
2826
2517
|
* @hidden
|
|
2827
|
-
* @
|
|
2518
|
+
* @description 地址获取时间
|
|
2828
2519
|
* @memberof VePlayer
|
|
2829
2520
|
*/
|
|
2830
2521
|
getUrlTimestamp(url: string): void;
|
|
2831
2522
|
/**
|
|
2832
|
-
* @
|
|
2523
|
+
* @description 监听sdk事件
|
|
2833
2524
|
*
|
|
2834
|
-
* @param action
|
|
2525
|
+
* @param {string} action
|
|
2835
2526
|
* @param {(...args: any[]) => void} func
|
|
2836
2527
|
* @memberof VePlayer
|
|
2837
2528
|
*/
|
|
2838
2529
|
on(action: string, func: (...args: any[]) => void): void;
|
|
2839
2530
|
/**
|
|
2840
|
-
* @
|
|
2531
|
+
* @description 触发sdk事件
|
|
2841
2532
|
*
|
|
2842
|
-
* @param {string} action
|
|
2533
|
+
* @param {string} action
|
|
2843
2534
|
* @param {*} [payload]
|
|
2844
2535
|
* @memberof VePlayer
|
|
2845
2536
|
*/
|
|
@@ -2942,10 +2633,6 @@ declare class VePlayer {
|
|
|
2942
2633
|
*/
|
|
2943
2634
|
beforePlayerCreate(): Promise<void>;
|
|
2944
2635
|
private prepareStrategies;
|
|
2945
|
-
/**
|
|
2946
|
-
* @hidden
|
|
2947
|
-
* @brief 更新播放策略
|
|
2948
|
-
*/
|
|
2949
2636
|
updateConfigByStrategy(): void;
|
|
2950
2637
|
/**
|
|
2951
2638
|
* @hidden
|
|
@@ -3027,14 +2714,14 @@ declare class VePlayer {
|
|
|
3027
2714
|
/**
|
|
3028
2715
|
* @hidden
|
|
3029
2716
|
*
|
|
3030
|
-
* @
|
|
2717
|
+
* @description 对外提供获取SDK插件实例的方法
|
|
3031
2718
|
* @param { string } name
|
|
3032
2719
|
* @return {*}
|
|
3033
2720
|
* @memberof VePlayer
|
|
3034
2721
|
*/
|
|
3035
2722
|
getSdkPlugin(name: any): any;
|
|
3036
2723
|
/**
|
|
3037
|
-
* @
|
|
2724
|
+
* @description 更换playAuthToken的方法
|
|
3038
2725
|
* @notes 这里指同一个视频切换视频源,不能用来切换不同类型的视频
|
|
3039
2726
|
* @param { IPlayAuthTokenConfig } config authToken配置
|
|
3040
2727
|
* @param { boolean } isNewVideo 是否是新视频,默认true。若未false即表示同一个视频切换token播放,会在切换前时间点继续播放
|
|
@@ -3042,18 +2729,18 @@ declare class VePlayer {
|
|
|
3042
2729
|
*/
|
|
3043
2730
|
switchAuthToken(config: IPlayAuthTokenConfig, isNewVideo?: boolean): Promise<void>;
|
|
3044
2731
|
/**
|
|
3045
|
-
* @
|
|
2732
|
+
* @description 更新playAuthToken的方法,用来更新视频地址
|
|
3046
2733
|
* @param { IPlayAuthTokenConfig } config
|
|
3047
2734
|
* @memberof VePlayer
|
|
3048
2735
|
*/
|
|
3049
2736
|
updateAuthToken(config: IPlayAuthTokenConfig): Promise<void>;
|
|
3050
2737
|
/**
|
|
3051
|
-
* @
|
|
2738
|
+
* @description 返回当前视频的地址
|
|
3052
2739
|
* @memberof VePlayer
|
|
3053
2740
|
*/
|
|
3054
2741
|
get src(): any;
|
|
3055
2742
|
/**
|
|
3056
|
-
* @
|
|
2743
|
+
* @description 设置当前视频的地址
|
|
3057
2744
|
* @notes 会重新拉取新的视频,从0开始起播
|
|
3058
2745
|
* @memberof VePlayer
|
|
3059
2746
|
*/
|
|
@@ -3079,7 +2766,7 @@ declare class VePlayer {
|
|
|
3079
2766
|
*
|
|
3080
2767
|
* @param {IPlayerConfig} config
|
|
3081
2768
|
* @param { boolean } isNewVideo 是否是新视频,默认true。若为false即表示同一个视频切换地址播放,会在切换前的时间点继续播放
|
|
3082
|
-
* @
|
|
2769
|
+
* @description 默认切换后是暂停状态,如果设置了自动播放,则会自动播放
|
|
3083
2770
|
* @return{Promise<any>}
|
|
3084
2771
|
* @memberof VePlayer
|
|
3085
2772
|
*/
|
|
@@ -3129,7 +2816,7 @@ declare class VePlayer {
|
|
|
3129
2816
|
/**
|
|
3130
2817
|
* @hidden
|
|
3131
2818
|
*
|
|
3132
|
-
* @
|
|
2819
|
+
* @description 获取h265软解播放时的播放列表
|
|
3133
2820
|
* @memberof VePlayer
|
|
3134
2821
|
*/
|
|
3135
2822
|
setH265SoftPlayList(): void;
|
|
@@ -3575,36 +3262,6 @@ export declare class Subtitle extends Plugin {
|
|
|
3575
3262
|
destroy(): void;
|
|
3576
3263
|
render(): string;
|
|
3577
3264
|
}
|
|
3578
|
-
export interface WatermarkConfig {
|
|
3579
|
-
enable: boolean;
|
|
3580
|
-
content: string;
|
|
3581
|
-
displayType: 0 | 1 | 2;
|
|
3582
|
-
fontSize: number | string;
|
|
3583
|
-
fontColor: string;
|
|
3584
|
-
opacity: number;
|
|
3585
|
-
tickerSpeed?: "SLOW" | "MODERATE" | "FAST";
|
|
3586
|
-
fontFamily?: string;
|
|
3587
|
-
top?: number;
|
|
3588
|
-
left?: number;
|
|
3589
|
-
bottom?: number;
|
|
3590
|
-
right?: number;
|
|
3591
|
-
}
|
|
3592
|
-
export declare class DynamicWatermarkPlugin extends Plugin {
|
|
3593
|
-
private wm;
|
|
3594
|
-
static get pluginName(): string;
|
|
3595
|
-
static get defaultConfig(): WatermarkConfig & {
|
|
3596
|
-
position: string;
|
|
3597
|
-
};
|
|
3598
|
-
constructor(props: any);
|
|
3599
|
-
afterCreate(): void;
|
|
3600
|
-
start(): void;
|
|
3601
|
-
pause(): void;
|
|
3602
|
-
resume(): void;
|
|
3603
|
-
resize(): void;
|
|
3604
|
-
_initWatermark(): void;
|
|
3605
|
-
destroy(): void;
|
|
3606
|
-
render(): string | HTMLElement;
|
|
3607
|
-
}
|
|
3608
3265
|
export declare class DefinitionDemotePlugin extends Plugin {
|
|
3609
3266
|
static get pluginName(): string;
|
|
3610
3267
|
waitings: number[];
|
|
@@ -4066,154 +3723,6 @@ export declare const Events: {
|
|
|
4066
3723
|
* 播放列表播放项变更
|
|
4067
3724
|
*/
|
|
4068
3725
|
PLAY_LIST_ITEM_CHANGE: string;
|
|
4069
|
-
/** {zh}
|
|
4070
|
-
* 播放器完成实例化
|
|
4071
|
-
*/
|
|
4072
|
-
/** {en}
|
|
4073
|
-
* The player is instantiated.
|
|
4074
|
-
*/
|
|
4075
|
-
READY: string;
|
|
4076
|
-
/** {zh}
|
|
4077
|
-
* 播放器创建video完成,可以开始播放
|
|
4078
|
-
*/
|
|
4079
|
-
/** {en}
|
|
4080
|
-
* The player has created the video and the playback is ready to start.
|
|
4081
|
-
*/
|
|
4082
|
-
COMPLETE: string;
|
|
4083
|
-
/** {zh}
|
|
4084
|
-
* 播放资源发生变化
|
|
4085
|
-
*/
|
|
4086
|
-
/** {en}
|
|
4087
|
-
* The playback address changes.
|
|
4088
|
-
*/
|
|
4089
|
-
URL_CHANGE: string;
|
|
4090
|
-
/** {zh}
|
|
4091
|
-
* 播放器聚焦
|
|
4092
|
-
*/
|
|
4093
|
-
/** {en}
|
|
4094
|
-
* The player has focus.
|
|
4095
|
-
*/
|
|
4096
|
-
PLAYER_FOCUS: string;
|
|
4097
|
-
/** {zh}
|
|
4098
|
-
* 播放器失焦
|
|
4099
|
-
*/
|
|
4100
|
-
/** {en}
|
|
4101
|
-
* The player loses focus.
|
|
4102
|
-
*/
|
|
4103
|
-
PLAYER_BLUR: string;
|
|
4104
|
-
/** {zh}
|
|
4105
|
-
* 系统全屏状态切换
|
|
4106
|
-
*/
|
|
4107
|
-
/** {en}
|
|
4108
|
-
* The player switches to or from full-window mode, in which the player covers the entire desktop.
|
|
4109
|
-
*/
|
|
4110
|
-
FULLSCREEN_CHANGE: string;
|
|
4111
|
-
/** {zh}
|
|
4112
|
-
* 网页样式全屏状态切换
|
|
4113
|
-
*/
|
|
4114
|
-
/** {en}
|
|
4115
|
-
* The player switches to or from full-screen mode, in which the player covers the browser window.
|
|
4116
|
-
*/
|
|
4117
|
-
CSS_FULLSCREEN_CHANGE: string;
|
|
4118
|
-
/**
|
|
4119
|
-
* @brief 画中画播放模式切换
|
|
4120
|
-
*/
|
|
4121
|
-
MINI_STATE_CHANGE: string;
|
|
4122
|
-
/** {zh}
|
|
4123
|
-
* 播放器销毁
|
|
4124
|
-
*/
|
|
4125
|
-
/** {en}
|
|
4126
|
-
* The player is destroyed.
|
|
4127
|
-
*/
|
|
4128
|
-
DESTROY: string;
|
|
4129
|
-
/** {zh}
|
|
4130
|
-
* 播放器重新播放
|
|
4131
|
-
*/
|
|
4132
|
-
/** {en}
|
|
4133
|
-
* Replay starts.
|
|
4134
|
-
*/
|
|
4135
|
-
REPLAY: string;
|
|
4136
|
-
/**
|
|
4137
|
-
* @brief 重试
|
|
4138
|
-
*/
|
|
4139
|
-
RETRY: string;
|
|
4140
|
-
/** {zh}
|
|
4141
|
-
* 清晰度发生变化
|
|
4142
|
-
*/
|
|
4143
|
-
/** {en}
|
|
4144
|
-
* The video resolution changes.
|
|
4145
|
-
*/
|
|
4146
|
-
DEFINITION_CHANGE: string;
|
|
4147
|
-
/** {zh}
|
|
4148
|
-
* @hidden
|
|
4149
|
-
*/
|
|
4150
|
-
/** {en}
|
|
4151
|
-
* @hidden
|
|
4152
|
-
*/
|
|
4153
|
-
Before_DEFINITION_CHANGE: string;
|
|
4154
|
-
/** {zh}
|
|
4155
|
-
* @hidden
|
|
4156
|
-
*/
|
|
4157
|
-
/** {en}
|
|
4158
|
-
* @hidden
|
|
4159
|
-
*/
|
|
4160
|
-
AFTER_DEFINITION_CHANGE: string;
|
|
4161
|
-
/** {zh}
|
|
4162
|
-
* 播放器容器尺寸发生变化
|
|
4163
|
-
*/
|
|
4164
|
-
/** {en}
|
|
4165
|
-
* The size of the player container changes.
|
|
4166
|
-
*/
|
|
4167
|
-
VIDEO_RESIZE: string;
|
|
4168
|
-
/** {zh}
|
|
4169
|
-
* 画中画状态切换
|
|
4170
|
-
*/
|
|
4171
|
-
/** {en}
|
|
4172
|
-
* The player switches to or from Picture-in-Picture (PIP) mode.
|
|
4173
|
-
*/
|
|
4174
|
-
PIP_CHANGE: string;
|
|
4175
|
-
/** {zh}
|
|
4176
|
-
* 播放器被旋转
|
|
4177
|
-
*/
|
|
4178
|
-
/** {en}
|
|
4179
|
-
* The player is rotated.
|
|
4180
|
-
*/
|
|
4181
|
-
ROTATE: string;
|
|
4182
|
-
/** {zh}
|
|
4183
|
-
* 播放器内置快捷键事件触发
|
|
4184
|
-
*/
|
|
4185
|
-
/** {en}
|
|
4186
|
-
* A built-in shortcut event occurs within the player.
|
|
4187
|
-
*/
|
|
4188
|
-
SHORTCUT: string;
|
|
4189
|
-
/** {zh}
|
|
4190
|
-
* SEI 信息解析
|
|
4191
|
-
*/
|
|
4192
|
-
/** {en}
|
|
4193
|
-
* The player parses the SEI information.
|
|
4194
|
-
*/
|
|
4195
|
-
SEI_PARSED: string;
|
|
4196
|
-
/** {zh}
|
|
4197
|
-
* 内置插件用户行为触发,所有内置插件用户行为交互都会下发该事件,可用于用户行为埋点
|
|
4198
|
-
*/
|
|
4199
|
-
/** {en}
|
|
4200
|
-
* A user event occurs within a built-in plug-in. This event applies to all built-in plug-ins and can be used for tracking user behaviors.
|
|
4201
|
-
*/
|
|
4202
|
-
USER_ACTION: string;
|
|
4203
|
-
/** {zh}
|
|
4204
|
-
* 自动播放成功
|
|
4205
|
-
*/
|
|
4206
|
-
/** {en}
|
|
4207
|
-
* Autoplay starts successfully.
|
|
4208
|
-
*/
|
|
4209
|
-
AUTOPLAY_STARTED: string;
|
|
4210
|
-
/** {zh}
|
|
4211
|
-
* 自动播放失败
|
|
4212
|
-
*/
|
|
4213
|
-
/** {en}
|
|
4214
|
-
* Autoplay fails to start.
|
|
4215
|
-
*/
|
|
4216
|
-
AUTOPLAY_PREVENTED: string;
|
|
4217
3726
|
/**
|
|
4218
3727
|
* 播放器完成创建
|
|
4219
3728
|
*/
|
|
@@ -4238,267 +3747,66 @@ export declare const Events: {
|
|
|
4238
3747
|
* umd 加载失败
|
|
4239
3748
|
*/
|
|
4240
3749
|
UMD_LOAD_FAIL: string;
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
PLAY: string;
|
|
4299
|
-
/** {zh}
|
|
4300
|
-
* 恢复播放(包括暂停后恢复播放或卡顿后恢复播放)
|
|
4301
|
-
*/
|
|
4302
|
-
/** {en}
|
|
4303
|
-
* Video playback resumes after a pause or freeze.
|
|
4304
|
-
*/
|
|
4305
|
-
PLAYING: string;
|
|
4306
|
-
/**
|
|
4307
|
-
* 媒体下载进度,即已缓存播放数据进度
|
|
4308
|
-
*/
|
|
4309
|
-
PROGRESS: string;
|
|
4310
|
-
/**
|
|
4311
|
-
* 播放速率变化
|
|
4312
|
-
*/
|
|
4313
|
-
RATE_CHANGE: string;
|
|
4314
|
-
/**
|
|
4315
|
-
* 在跳跃(seek)操作完成时触发
|
|
4316
|
-
*/
|
|
4317
|
-
SEEKED: string;
|
|
4318
|
-
/**
|
|
4319
|
-
* 在跳跃(seek)操作开始时触发
|
|
4320
|
-
*/
|
|
4321
|
-
SEEKING: string;
|
|
4322
|
-
/**
|
|
4323
|
-
* 在尝试获取媒体数据,但数据不可用时触发。
|
|
4324
|
-
*/
|
|
4325
|
-
STALLED: string;
|
|
4326
|
-
/**
|
|
4327
|
-
* 在媒体资源加载终止时触发,这可能是因为下载已完成或因为其他原因暂停。
|
|
4328
|
-
*/
|
|
4329
|
-
SUSPEND: string;
|
|
4330
|
-
/** {zh}
|
|
4331
|
-
* 视频播放时间更新
|
|
4332
|
-
*/
|
|
4333
|
-
/** {en}
|
|
4334
|
-
* The video playback time is updated.
|
|
4335
|
-
*/
|
|
4336
|
-
TIME_UPDATE: string;
|
|
4337
|
-
/** {zh}
|
|
4338
|
-
* 视频音量发生变化
|
|
4339
|
-
*/
|
|
4340
|
-
/** {en}
|
|
4341
|
-
* The video volume changes.
|
|
4342
|
-
*/
|
|
4343
|
-
VOLUME_CHANGE: string;
|
|
4344
|
-
/** {zh}
|
|
4345
|
-
* 等待加载数据
|
|
4346
|
-
*/
|
|
4347
|
-
/** {en}
|
|
4348
|
-
* The player is loading data.
|
|
4349
|
-
*/
|
|
4350
|
-
WAITING: string;
|
|
3750
|
+
PLAY: "play";
|
|
3751
|
+
PLAYING: "playing";
|
|
3752
|
+
ENDED: "ended";
|
|
3753
|
+
PAUSE: "pause";
|
|
3754
|
+
ERROR: "error";
|
|
3755
|
+
SEEKING: "seeking";
|
|
3756
|
+
SEEKED: "seeked";
|
|
3757
|
+
TIME_UPDATE: "timeupdate";
|
|
3758
|
+
WAITING: "waiting";
|
|
3759
|
+
CANPLAY: "canplay";
|
|
3760
|
+
CANPLAY_THROUGH: "canplaythrough";
|
|
3761
|
+
DURATION_CHANGE: "durationchange";
|
|
3762
|
+
VOLUME_CHANGE: "volumechange";
|
|
3763
|
+
LOADED_DATA: "loadeddata";
|
|
3764
|
+
LOADED_METADATA: "loadedmetadata";
|
|
3765
|
+
RATE_CHANGE: "ratechange";
|
|
3766
|
+
PROGRESS: "progress";
|
|
3767
|
+
LOAD_START: "loadstart";
|
|
3768
|
+
EMPTIED: "emptied";
|
|
3769
|
+
STALLED: "stalled";
|
|
3770
|
+
SUSPEND: "suspend";
|
|
3771
|
+
ABORT: "abort";
|
|
3772
|
+
BUFFER_CHANGE: "bufferedChange";
|
|
3773
|
+
PLAYER_FOCUS: "focus";
|
|
3774
|
+
PLAYER_BLUR: "blur";
|
|
3775
|
+
READY: "ready";
|
|
3776
|
+
URL_NULL: "urlNull";
|
|
3777
|
+
AUTOPLAY_STARTED: "autoplay_started";
|
|
3778
|
+
AUTOPLAY_PREVENTED: "autoplay_was_prevented";
|
|
3779
|
+
COMPLETE: "complete";
|
|
3780
|
+
REPLAY: "replay";
|
|
3781
|
+
DESTROY: "destroy";
|
|
3782
|
+
URL_CHANGE: "urlchange";
|
|
3783
|
+
DOWNLOAD_SPEED_CHANGE: "download_speed_change";
|
|
3784
|
+
FULLSCREEN_CHANGE: "fullscreen_change";
|
|
3785
|
+
CSS_FULLSCREEN_CHANGE: "cssFullscreen_change";
|
|
3786
|
+
MINI_STATE_CHANGE: "mini_state_change";
|
|
3787
|
+
DEFINITION_CHANGE: "definition_change";
|
|
3788
|
+
BEFORE_DEFINITION_CHANGE: "before_definition_change";
|
|
3789
|
+
AFTER_DEFINITION_CHANGE: "after_definition_change";
|
|
3790
|
+
SEI_PARSED: "SEI_PARSED";
|
|
3791
|
+
RETRY: "retry";
|
|
3792
|
+
VIDEO_RESIZE: "video_resize";
|
|
3793
|
+
PIP_CHANGE: "pip_change";
|
|
3794
|
+
ROTATE: "rotate";
|
|
3795
|
+
SCREEN_SHOT: "screenShot";
|
|
3796
|
+
PLAYNEXT: "playnext";
|
|
3797
|
+
SHORTCUT: "shortcut";
|
|
3798
|
+
XGLOG: "xglog";
|
|
3799
|
+
USER_ACTION: "user_action";
|
|
3800
|
+
RESET: "reset";
|
|
3801
|
+
SOURCE_ERROR: "source_error";
|
|
3802
|
+
SOURCE_SUCCESS: "source_success";
|
|
3803
|
+
SWITCH_SUBTITLE: "switch_subtitle";
|
|
3804
|
+
VIDEO_EVENTS: string[];
|
|
3805
|
+
STATS_EVENTS: typeof XgEvents.STATS_EVENTS;
|
|
3806
|
+
FPS_STUCK: "fps_stuck";
|
|
4351
3807
|
};
|
|
4352
3808
|
export declare const Event: {
|
|
4353
3809
|
SDKEvents: {
|
|
4354
|
-
/** {zh}
|
|
4355
|
-
* 播放器完成实例化
|
|
4356
|
-
*/
|
|
4357
|
-
/** {en}
|
|
4358
|
-
* The player is instantiated.
|
|
4359
|
-
*/
|
|
4360
|
-
READY: string;
|
|
4361
|
-
/** {zh}
|
|
4362
|
-
* 播放器创建video完成,可以开始播放
|
|
4363
|
-
*/
|
|
4364
|
-
/** {en}
|
|
4365
|
-
* The player has created the video and the playback is ready to start.
|
|
4366
|
-
*/
|
|
4367
|
-
COMPLETE: string;
|
|
4368
|
-
/** {zh}
|
|
4369
|
-
* 播放资源发生变化
|
|
4370
|
-
*/
|
|
4371
|
-
/** {en}
|
|
4372
|
-
* The playback address changes.
|
|
4373
|
-
*/
|
|
4374
|
-
URL_CHANGE: string;
|
|
4375
|
-
/** {zh}
|
|
4376
|
-
* 播放器聚焦
|
|
4377
|
-
*/
|
|
4378
|
-
/** {en}
|
|
4379
|
-
* The player has focus.
|
|
4380
|
-
*/
|
|
4381
|
-
PLAYER_FOCUS: string;
|
|
4382
|
-
/** {zh}
|
|
4383
|
-
* 播放器失焦
|
|
4384
|
-
*/
|
|
4385
|
-
/** {en}
|
|
4386
|
-
* The player loses focus.
|
|
4387
|
-
*/
|
|
4388
|
-
PLAYER_BLUR: string;
|
|
4389
|
-
/** {zh}
|
|
4390
|
-
* 系统全屏状态切换
|
|
4391
|
-
*/
|
|
4392
|
-
/** {en}
|
|
4393
|
-
* The player switches to or from full-window mode, in which the player covers the entire desktop.
|
|
4394
|
-
*/
|
|
4395
|
-
FULLSCREEN_CHANGE: string;
|
|
4396
|
-
/** {zh}
|
|
4397
|
-
* 网页样式全屏状态切换
|
|
4398
|
-
*/
|
|
4399
|
-
/** {en}
|
|
4400
|
-
* The player switches to or from full-screen mode, in which the player covers the browser window.
|
|
4401
|
-
*/
|
|
4402
|
-
CSS_FULLSCREEN_CHANGE: string;
|
|
4403
|
-
/**
|
|
4404
|
-
* @brief 画中画播放模式切换
|
|
4405
|
-
*/
|
|
4406
|
-
MINI_STATE_CHANGE: string;
|
|
4407
|
-
/** {zh}
|
|
4408
|
-
* 播放器销毁
|
|
4409
|
-
*/
|
|
4410
|
-
/** {en}
|
|
4411
|
-
* The player is destroyed.
|
|
4412
|
-
*/
|
|
4413
|
-
DESTROY: string;
|
|
4414
|
-
/** {zh}
|
|
4415
|
-
* 播放器重新播放
|
|
4416
|
-
*/
|
|
4417
|
-
/** {en}
|
|
4418
|
-
* Replay starts.
|
|
4419
|
-
*/
|
|
4420
|
-
REPLAY: string;
|
|
4421
|
-
/**
|
|
4422
|
-
* @brief 重试
|
|
4423
|
-
*/
|
|
4424
|
-
RETRY: string;
|
|
4425
|
-
/** {zh}
|
|
4426
|
-
* 清晰度发生变化
|
|
4427
|
-
*/
|
|
4428
|
-
/** {en}
|
|
4429
|
-
* The video resolution changes.
|
|
4430
|
-
*/
|
|
4431
|
-
DEFINITION_CHANGE: string;
|
|
4432
|
-
/** {zh}
|
|
4433
|
-
* @hidden
|
|
4434
|
-
*/
|
|
4435
|
-
/** {en}
|
|
4436
|
-
* @hidden
|
|
4437
|
-
*/
|
|
4438
|
-
Before_DEFINITION_CHANGE: string;
|
|
4439
|
-
/** {zh}
|
|
4440
|
-
* @hidden
|
|
4441
|
-
*/
|
|
4442
|
-
/** {en}
|
|
4443
|
-
* @hidden
|
|
4444
|
-
*/
|
|
4445
|
-
AFTER_DEFINITION_CHANGE: string;
|
|
4446
|
-
/** {zh}
|
|
4447
|
-
* 播放器容器尺寸发生变化
|
|
4448
|
-
*/
|
|
4449
|
-
/** {en}
|
|
4450
|
-
* The size of the player container changes.
|
|
4451
|
-
*/
|
|
4452
|
-
VIDEO_RESIZE: string;
|
|
4453
|
-
/** {zh}
|
|
4454
|
-
* 画中画状态切换
|
|
4455
|
-
*/
|
|
4456
|
-
/** {en}
|
|
4457
|
-
* The player switches to or from Picture-in-Picture (PIP) mode.
|
|
4458
|
-
*/
|
|
4459
|
-
PIP_CHANGE: string;
|
|
4460
|
-
/** {zh}
|
|
4461
|
-
* 播放器被旋转
|
|
4462
|
-
*/
|
|
4463
|
-
/** {en}
|
|
4464
|
-
* The player is rotated.
|
|
4465
|
-
*/
|
|
4466
|
-
ROTATE: string;
|
|
4467
|
-
/** {zh}
|
|
4468
|
-
* 播放器内置快捷键事件触发
|
|
4469
|
-
*/
|
|
4470
|
-
/** {en}
|
|
4471
|
-
* A built-in shortcut event occurs within the player.
|
|
4472
|
-
*/
|
|
4473
|
-
SHORTCUT: string;
|
|
4474
|
-
/** {zh}
|
|
4475
|
-
* SEI 信息解析
|
|
4476
|
-
*/
|
|
4477
|
-
/** {en}
|
|
4478
|
-
* The player parses the SEI information.
|
|
4479
|
-
*/
|
|
4480
|
-
SEI_PARSED: string;
|
|
4481
|
-
/** {zh}
|
|
4482
|
-
* 内置插件用户行为触发,所有内置插件用户行为交互都会下发该事件,可用于用户行为埋点
|
|
4483
|
-
*/
|
|
4484
|
-
/** {en}
|
|
4485
|
-
* A user event occurs within a built-in plug-in. This event applies to all built-in plug-ins and can be used for tracking user behaviors.
|
|
4486
|
-
*/
|
|
4487
|
-
USER_ACTION: string;
|
|
4488
|
-
/** {zh}
|
|
4489
|
-
* 自动播放成功
|
|
4490
|
-
*/
|
|
4491
|
-
/** {en}
|
|
4492
|
-
* Autoplay starts successfully.
|
|
4493
|
-
*/
|
|
4494
|
-
AUTOPLAY_STARTED: string;
|
|
4495
|
-
/** {zh}
|
|
4496
|
-
* 自动播放失败
|
|
4497
|
-
*/
|
|
4498
|
-
/** {en}
|
|
4499
|
-
* Autoplay fails to start.
|
|
4500
|
-
*/
|
|
4501
|
-
AUTOPLAY_PREVENTED: string;
|
|
4502
3810
|
/**
|
|
4503
3811
|
* 播放器完成创建
|
|
4504
3812
|
*/
|