@volcengine/veplayer 2.6.1 → 2.7.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.d.ts +41 -119
- package/esm/veplayer.biz.live.development.js +957 -328
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +336 -200
- package/esm/veplayer.development.js +918 -317
- package/esm/veplayer.live.d.ts +336 -200
- package/esm/veplayer.live.development.js +917 -316
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +41 -119
- package/esm/veplayer.vod.development.js +37 -21
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +41 -119
- package/umd/veplayer.biz.live.development.js +957 -328
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +336 -200
- package/umd/veplayer.development.js +918 -317
- package/umd/veplayer.live.d.ts +336 -200
- package/umd/veplayer.live.development.js +917 -316
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +41 -119
- package/umd/veplayer.vod.development.js +37 -21
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +336 -200
- package/veplayer.live.d.ts +336 -200
- package/veplayer.vod.d.ts +41 -119
package/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Player from "xgplayer";
|
|
2
2
|
import { IXGI18nText, Plugin, IPluginOptions } from "xgplayer";
|
|
3
3
|
import { IPlayerOptions as PlayerOptions } from "xgplayer";
|
|
4
|
-
import { IDefinition as XGDefinition } from "xgplayer";
|
|
5
4
|
import { default as Player$0 } from "xgplayer";
|
|
6
5
|
import { IError as XGError } from "xgplayer";
|
|
7
6
|
import { IBasePluginOptions as XGPluginOptions } from "xgplayer";
|
|
@@ -92,8 +91,8 @@ interface DefinitionUrl {
|
|
|
92
91
|
url: string;
|
|
93
92
|
next: DefinitionUrl | null;
|
|
94
93
|
}
|
|
95
|
-
declare class Definition
|
|
96
|
-
readonly definition
|
|
94
|
+
declare class Definition {
|
|
95
|
+
readonly definition?: string;
|
|
97
96
|
readonly source: Source;
|
|
98
97
|
readonly text?: Record<Lang, string> | string;
|
|
99
98
|
readonly fallbackUrl: DefinitionUrl;
|
|
@@ -101,7 +100,7 @@ declare class Definition implements XGDefinition {
|
|
|
101
100
|
private _currentUrlRef;
|
|
102
101
|
constructor(definitionSetting: {
|
|
103
102
|
url: string;
|
|
104
|
-
definition
|
|
103
|
+
definition?: string;
|
|
105
104
|
source: Source;
|
|
106
105
|
text?: Record<Lang, string> | string;
|
|
107
106
|
fallbackUrls?: string[];
|
|
@@ -127,7 +126,6 @@ declare class Definition implements XGDefinition {
|
|
|
127
126
|
interface ExposedDefinition {
|
|
128
127
|
/** {zh}
|
|
129
128
|
* @brief 播放地址。
|
|
130
|
-
* @default 无
|
|
131
129
|
*/
|
|
132
130
|
/** {en}
|
|
133
131
|
* @brief The playback address.
|
|
@@ -135,17 +133,14 @@ interface ExposedDefinition {
|
|
|
135
133
|
url: string;
|
|
136
134
|
/** {zh}
|
|
137
135
|
* @brief 清晰度标识(唯一值)。
|
|
138
|
-
* @default 无
|
|
139
|
-
*
|
|
140
136
|
*/
|
|
141
137
|
/** {en}
|
|
142
138
|
* @brief The resolution ID. This value must be unique.
|
|
143
139
|
*
|
|
144
140
|
*/
|
|
145
|
-
definition
|
|
141
|
+
definition?: string;
|
|
146
142
|
/** {zh}
|
|
147
143
|
* @brief 清晰度展示名称。可设置多语言 `{text: {'zh-cn': '高清', 'en': 'HD'}}`。
|
|
148
|
-
* @default 无
|
|
149
144
|
*/
|
|
150
145
|
/** {en}
|
|
151
146
|
* @brief The display name of the resolution. Multiple languages are supported, such as `{text: {'zh-cn': '高清', 'en': 'HD'}}`.
|
|
@@ -153,14 +148,13 @@ interface ExposedDefinition {
|
|
|
153
148
|
text?: Record<Lang, string> | string;
|
|
154
149
|
/** {zh}
|
|
155
150
|
* @brief 为当前清晰度地址设置备路拉流地址,支持设置多个备路拉流地址。当前清晰度地址拉流失败时,会在当前清晰度地址和备路直播地址之间循环拉流,直到拉流成功。
|
|
156
|
-
* @default 无
|
|
157
|
-
*
|
|
158
151
|
*/
|
|
159
152
|
/** {en}
|
|
160
153
|
* @brief The backup pull stream address for the current resolution. You can set multiple backup addresses. When the player fails to pull a stream from the current address, it will loop between the current and the backup addresses until it successfully pulls a stream.
|
|
161
154
|
*
|
|
162
155
|
*/
|
|
163
156
|
fallbackUrls?: string[];
|
|
157
|
+
type?: string;
|
|
164
158
|
}
|
|
165
159
|
/** {zh}
|
|
166
160
|
* @list option
|
|
@@ -177,7 +171,6 @@ interface ExposedDefinition {
|
|
|
177
171
|
interface ExposedSource {
|
|
178
172
|
/** {zh}
|
|
179
173
|
* @brief 线路标识(唯一值)。
|
|
180
|
-
* @default 无
|
|
181
174
|
*/
|
|
182
175
|
/** {en}
|
|
183
176
|
* @brief The playback source ID. This value must be unique.
|
|
@@ -185,8 +178,6 @@ interface ExposedSource {
|
|
|
185
178
|
name?: string;
|
|
186
179
|
/** {zh}
|
|
187
180
|
* @brief 线路展示名称。可设置多语言 `{text: {'zh-cn': '线路一', 'en': 'LineOne'}}`。
|
|
188
|
-
* @default 无
|
|
189
|
-
*
|
|
190
181
|
*/
|
|
191
182
|
/** {en}
|
|
192
183
|
* @brief The display name of the live stream source. Multiple languages are supported. For example, you set it to `{text: {'zh-cn': '线路一', 'en': 'LineOne'}}`.
|
|
@@ -195,8 +186,6 @@ interface ExposedSource {
|
|
|
195
186
|
text?: Record<Lang, string> | string;
|
|
196
187
|
/** {zh}
|
|
197
188
|
* @brief 该线路下清晰度列表。
|
|
198
|
-
* @default 无
|
|
199
|
-
*
|
|
200
189
|
*/
|
|
201
190
|
/** {en}
|
|
202
191
|
* @brief A list of resolutions of the current source.
|
|
@@ -406,25 +395,24 @@ declare class OptionsIcon extends Plugin {
|
|
|
406
395
|
*/
|
|
407
396
|
declare enum Level {
|
|
408
397
|
/** {zh}
|
|
409
|
-
* @brief
|
|
398
|
+
* @brief 发生严重错误,可能由于 CDN 拉取失败或 DRM 权限验证未通过,导致无法播放。
|
|
410
399
|
*/
|
|
411
400
|
/** {en}
|
|
412
|
-
* @brief
|
|
413
|
-
*
|
|
401
|
+
* @brief A critical error occurs, typically due to CDN fetching failure or DRM permission verification failure, resulting in playback inability.
|
|
414
402
|
*/
|
|
415
403
|
Fatal = "Fatal",
|
|
416
404
|
/** {zh}
|
|
417
|
-
* @brief
|
|
405
|
+
* @brief 流异常或处于离线状态,致使播放失败。
|
|
418
406
|
*/
|
|
419
407
|
/** {en}
|
|
420
|
-
* @brief
|
|
408
|
+
* @brief A stream anomaly or offline state causes playback to fail.
|
|
421
409
|
*/
|
|
422
410
|
Error = "Error",
|
|
423
411
|
/** {zh}
|
|
424
|
-
* @brief
|
|
412
|
+
* @brief 出现警告信息,通常由日志配置错误或缺少 RTM 降级地址引起。
|
|
425
413
|
*/
|
|
426
414
|
/** {en}
|
|
427
|
-
* @brief
|
|
415
|
+
* @brief A warning is issued, usually due to incorrect log configuration or a missing RTM fallback address.
|
|
428
416
|
*/
|
|
429
417
|
Warn = "Warn"
|
|
430
418
|
}
|
|
@@ -877,7 +865,6 @@ type ErrorConfig = {
|
|
|
877
865
|
showRefresh?: boolean;
|
|
878
866
|
/** {zh}
|
|
879
867
|
* @brief 自定义报错显示。
|
|
880
|
-
* @default 无
|
|
881
868
|
*/
|
|
882
869
|
/** {en}
|
|
883
870
|
* @brief Custom error message.
|
|
@@ -886,7 +873,6 @@ type ErrorConfig = {
|
|
|
886
873
|
errorTipsText?: string | Record<Lang, string>;
|
|
887
874
|
/** {zh}
|
|
888
875
|
* @brief 更多提示信息。
|
|
889
|
-
* @default 无
|
|
890
876
|
*/
|
|
891
877
|
/** {en}
|
|
892
878
|
* @brief More tips.
|
|
@@ -987,7 +973,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
987
973
|
id?: string;
|
|
988
974
|
/** {zh}
|
|
989
975
|
* @brief 指定播放器容器元素,VePlayer 将被插入在该容器中。id 和 el 需至少传入 1 个。如果同时传入,则优先将播放器插入 id 容器中。
|
|
990
|
-
* @default 无
|
|
991
976
|
*/
|
|
992
977
|
/** {en}
|
|
993
978
|
* @brief The container element of the player. You should specify either `id` or `el`, or both. If both are specified, the `VePlayer` object will be inserted in the container specified by `id`.
|
|
@@ -1013,7 +998,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1013
998
|
height?: number | string;
|
|
1014
999
|
/** {zh}
|
|
1015
1000
|
* @brief 为播放器配置直播拉流地址。您可手动拼接或使用地址生成器生成拉流地址,生成方法请参见[生成直播地址](https://www.volcengine.com/docs/6469/107759)。url 和 playList 需至少传入 1 个。
|
|
1016
|
-
* @default 无
|
|
1017
1001
|
*/
|
|
1018
1002
|
/** {en}
|
|
1019
1003
|
* @brief The pull stream address. You can manually construct the address or use the address generator to generate one. To see how to generate an address, refer to [Generate live-stream addresses](https://docs.byteplus.com/en/byteplus-media-live/docs/generating-live-stream-addresses). You should specify either `url` or `playList`, or both.
|
|
@@ -1021,7 +1005,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1021
1005
|
url?: string;
|
|
1022
1006
|
/** {zh}
|
|
1023
1007
|
* @brief 为播放器配置直播拉流地址列表。url 和 playlist 需至少传入 1 个。
|
|
1024
|
-
* @default 无
|
|
1025
1008
|
*/
|
|
1026
1009
|
/** {en}
|
|
1027
1010
|
* @brief A list of live stream sources for the player. You should specify either `url` or `playList`, or both.
|
|
@@ -1029,7 +1012,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1029
1012
|
playlist?: ExposedSource[];
|
|
1030
1013
|
/** {zh}
|
|
1031
1014
|
* @brief 当存在多个直播线路时,为播放器设置默认直播线路,不传则默认列表第一个。
|
|
1032
|
-
* @default 无
|
|
1033
1015
|
*/
|
|
1034
1016
|
/** {en}
|
|
1035
1017
|
* @brief The default pull stream address for the player when there are multiple addresses available. If this parameter is not specified, the first address in the playlist will become the default address.
|
|
@@ -1037,7 +1019,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1037
1019
|
defaultSource?: string;
|
|
1038
1020
|
/** {zh}
|
|
1039
1021
|
* @brief 为播放器设置默认直播清晰度,不传则默认列表第一个。
|
|
1040
|
-
* @default 无
|
|
1041
1022
|
*/
|
|
1042
1023
|
/** {en}
|
|
1043
1024
|
* @brief The default resolution for the player when there are multiple resolutions available. If this parameter is not specified, the first resolution in the list will become the default resolution.
|
|
@@ -1045,7 +1026,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1045
1026
|
defaultDefinition?: string;
|
|
1046
1027
|
/** {zh}
|
|
1047
1028
|
* @brief 为播放器设置备路拉流地址,支持设置多个备路拉流地址,在 `maxFallbackRound` 大于 `0` 时有效。当您使用配置的直播拉流地址拉流失败时,会在直播地址和备路直播地址之间循环拉流,直到拉流成功。
|
|
1048
|
-
* @default 无
|
|
1049
1029
|
*/
|
|
1050
1030
|
/** {en}
|
|
1051
1031
|
* @brief The backup pull stream address(es) for the player. You can enter multiple backup addresses. If `maxFallbackRound` is greater than `0`, when an error occurs in the main address, the player automatically switches to the backup address.
|
|
@@ -1099,7 +1079,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1099
1079
|
degradation?: Degradation | boolean;
|
|
1100
1080
|
/** {zh}
|
|
1101
1081
|
* @brief 为播放器设置封面图 URL。
|
|
1102
|
-
* @default 无
|
|
1103
1082
|
*/
|
|
1104
1083
|
/** {en}
|
|
1105
1084
|
* @brief The URL of the player's cover image.
|
|
@@ -1115,7 +1094,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1115
1094
|
/** {zh}
|
|
1116
1095
|
* @brief 为播放器设置自定义的多语言词典,可设置每个语种的词典,格式为 { texts: { [key: string]: Object; } }。
|
|
1117
1096
|
* 例如,{ texts: { 'zh-cn': { PIP: '画中画' }, en: { PIP: 'pip' } }} ,格式请参考[默认词典](https://www.volcengine.com/docs/6469/127529)。
|
|
1118
|
-
* @default 无
|
|
1119
1097
|
*/
|
|
1120
1098
|
/** {en}
|
|
1121
1099
|
* @brief Configures a custom multilingual dictionary for the player. You can set the dictionary for each language in the format { texts: { [key: string]: Object; } }. For example, { texts: { 'zh-cn': { PIP: '画中画' }, en: { PIP: 'pip' } }}.
|
|
@@ -1125,7 +1103,7 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1125
1103
|
texts: Record<Lang, Record<string, string>>;
|
|
1126
1104
|
};
|
|
1127
1105
|
/** {zh}
|
|
1128
|
-
* @brief
|
|
1106
|
+
* @brief 为播放器设置是否自动播放,`muted` 设置为 `true` 为静音自动播放。
|
|
1129
1107
|
* @default { muted: true }
|
|
1130
1108
|
* @type {{ muted: boolean } | boolean}
|
|
1131
1109
|
*/
|
|
@@ -1231,7 +1209,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1231
1209
|
playsinline?: boolean;
|
|
1232
1210
|
/** {zh}
|
|
1233
1211
|
* @brief 为播放器设置 video 标签扩展属性,初始化时会设置在 videoElement 或 audioElement 对象上,请参考 [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#properties) 查看其支持的属性配置。
|
|
1234
|
-
* @default 无
|
|
1235
1212
|
*/
|
|
1236
1213
|
/** {en}
|
|
1237
1214
|
* @brief Additional properties for the `video` element that will be applied when the `videoElement` or `audioElement` objects are initialized. Refer to [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#properties) for supported properties.
|
|
@@ -1309,7 +1286,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1309
1286
|
marginControls?: boolean;
|
|
1310
1287
|
/** {zh}
|
|
1311
1288
|
* @brief 启用微信同层播放。
|
|
1312
|
-
* @default 无
|
|
1313
1289
|
*/
|
|
1314
1290
|
/** {en}
|
|
1315
1291
|
* @brief Enable playing the video on the same player as WeChat.
|
|
@@ -1319,7 +1295,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1319
1295
|
* @brief 是否启用微信全屏播放模式。
|
|
1320
1296
|
* - `true`:启用
|
|
1321
1297
|
* - `false`:停用
|
|
1322
|
-
* @default 无
|
|
1323
1298
|
*/
|
|
1324
1299
|
/** {en}
|
|
1325
1300
|
* @brief Whether to enable full-screen playback in WeChat.
|
|
@@ -1332,7 +1307,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1332
1307
|
* - `landscape`:横屏
|
|
1333
1308
|
* - `portrait`:竖屏
|
|
1334
1309
|
* - `landscape|portrait`:跟随手机自动旋转
|
|
1335
|
-
* @default 无
|
|
1336
1310
|
*/
|
|
1337
1311
|
/** {en}
|
|
1338
1312
|
* @brief The orientation of the video when played on WeChat. The following values are supported:
|
|
@@ -1343,7 +1317,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1343
1317
|
"x5-video-orientation"?: "landscape" | "portrait" | "landscape|portrait";
|
|
1344
1318
|
/** {zh}
|
|
1345
1319
|
* @brief 为播放器配置关键点样式。
|
|
1346
|
-
* @default 无
|
|
1347
1320
|
* @hidden 直播目前没用到
|
|
1348
1321
|
*/
|
|
1349
1322
|
/** {en}
|
|
@@ -1353,7 +1326,6 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1353
1326
|
commonStyle?: CommonStyle;
|
|
1354
1327
|
/** {zh}
|
|
1355
1328
|
* @brief 自定义插件列表。
|
|
1356
|
-
* @default 无
|
|
1357
1329
|
*/
|
|
1358
1330
|
/** {en}
|
|
1359
1331
|
* @brief A list of custom plugins.
|
|
@@ -1396,10 +1368,10 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1396
1368
|
*/
|
|
1397
1369
|
closeVideoDblclick?: boolean;
|
|
1398
1370
|
/** {zh}
|
|
1399
|
-
* @brief 支持传入 video
|
|
1371
|
+
* @brief 支持传入 `video` DOM 元素,适用于多个播放器共享同一视频场景。
|
|
1400
1372
|
*/
|
|
1401
1373
|
/** {en}
|
|
1402
|
-
* @brief Supports passing in video DOM,
|
|
1374
|
+
* @brief Supports passing in a `video` DOM element, suitable for scenarios where multiple players share the same video.
|
|
1403
1375
|
*/
|
|
1404
1376
|
mediaElement?: HTMLVideoElement | null;
|
|
1405
1377
|
}
|
|
@@ -1468,7 +1440,6 @@ interface Fullscreen {
|
|
|
1468
1440
|
interface CommonStyle {
|
|
1469
1441
|
/** {zh}
|
|
1470
1442
|
* @brief 进度条底色。
|
|
1471
|
-
* @default 无
|
|
1472
1443
|
*/
|
|
1473
1444
|
/** {en}
|
|
1474
1445
|
* @brief The background color of the progress bar.
|
|
@@ -1476,7 +1447,6 @@ interface CommonStyle {
|
|
|
1476
1447
|
progressColor?: string;
|
|
1477
1448
|
/** {zh}
|
|
1478
1449
|
* @brief 播放完成部分进度条底色。
|
|
1479
|
-
* @default 无
|
|
1480
1450
|
*/
|
|
1481
1451
|
/** {en}
|
|
1482
1452
|
* @brief The background color of the progress bar for the completed portion of video playback.
|
|
@@ -1484,7 +1454,6 @@ interface CommonStyle {
|
|
|
1484
1454
|
playedColor?: string;
|
|
1485
1455
|
/** {zh}
|
|
1486
1456
|
* @brief 缓存部分进度条底色。
|
|
1487
|
-
* @default 无
|
|
1488
1457
|
*/
|
|
1489
1458
|
/** {en}
|
|
1490
1459
|
* @brief
|
|
@@ -1493,7 +1462,6 @@ interface CommonStyle {
|
|
|
1493
1462
|
cachedColor?: string;
|
|
1494
1463
|
/** {zh}
|
|
1495
1464
|
* @brief 进度条滑块样式。
|
|
1496
|
-
* @default 无
|
|
1497
1465
|
*/
|
|
1498
1466
|
/** {en}
|
|
1499
1467
|
* @brief The style of the progress bar slider.
|
|
@@ -1504,7 +1472,6 @@ interface CommonStyle {
|
|
|
1504
1472
|
};
|
|
1505
1473
|
/** {zh}
|
|
1506
1474
|
* @brief 音量颜色。
|
|
1507
|
-
* @default 无
|
|
1508
1475
|
*/
|
|
1509
1476
|
/** {en}
|
|
1510
1477
|
* @brief The color of the volume slider.
|
|
@@ -1515,9 +1482,10 @@ type PrepareResult = {
|
|
|
1515
1482
|
options?: Partial<VePlayerBaseOptions>;
|
|
1516
1483
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1517
1484
|
plugins?: any[];
|
|
1485
|
+
protocol?: string;
|
|
1518
1486
|
useSrc?: boolean;
|
|
1519
1487
|
};
|
|
1520
|
-
type PreparePlugins = (url
|
|
1488
|
+
type PreparePlugins = (url?: string) => Promise<PrepareResult | undefined> | undefined;
|
|
1521
1489
|
/** {zh}
|
|
1522
1490
|
* @detail option
|
|
1523
1491
|
* @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
@@ -1604,6 +1572,7 @@ declare class VePlayerBase {
|
|
|
1604
1572
|
private _events;
|
|
1605
1573
|
private _customMedia?;
|
|
1606
1574
|
private _errorCallback;
|
|
1575
|
+
private _beforeFallbackError;
|
|
1607
1576
|
/** {zh}
|
|
1608
1577
|
* @hidden
|
|
1609
1578
|
*/
|
|
@@ -1643,7 +1612,7 @@ declare class VePlayerBase {
|
|
|
1643
1612
|
*/
|
|
1644
1613
|
get played(): TimeRanges;
|
|
1645
1614
|
/** {zh}
|
|
1646
|
-
* @brief
|
|
1615
|
+
* @brief 设置/获取视频当前的播放时间,单位为 s。
|
|
1647
1616
|
*/
|
|
1648
1617
|
/** {en}
|
|
1649
1618
|
* @brief Sets or gets the current playback position of the video, in seconds.
|
|
@@ -1754,7 +1723,7 @@ declare class VePlayerBase {
|
|
|
1754
1723
|
/** {en}
|
|
1755
1724
|
* @brief Gets the current resolution ID.
|
|
1756
1725
|
*/
|
|
1757
|
-
get definition(): string;
|
|
1726
|
+
get definition(): string | undefined;
|
|
1758
1727
|
/** {zh}
|
|
1759
1728
|
* @brief 获取和设置播放器的跨域配置信息,更多信息参考 [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) 属性介绍。
|
|
1760
1729
|
*/
|
|
@@ -1844,7 +1813,6 @@ declare class VePlayerBase {
|
|
|
1844
1813
|
switch(target: string | {
|
|
1845
1814
|
/** {zh}
|
|
1846
1815
|
* @brief 清晰度的唯一标识。
|
|
1847
|
-
* @default 无
|
|
1848
1816
|
*/
|
|
1849
1817
|
/** {en}
|
|
1850
1818
|
* @brief The resolution ID.
|
|
@@ -1852,7 +1820,6 @@ declare class VePlayerBase {
|
|
|
1852
1820
|
definition?: string;
|
|
1853
1821
|
/** {zh}
|
|
1854
1822
|
* @brief 线路的唯一标识。
|
|
1855
|
-
* @default 无
|
|
1856
1823
|
*/
|
|
1857
1824
|
/** {en}
|
|
1858
1825
|
* @brief The playback source ID.
|
|
@@ -1892,8 +1859,6 @@ declare class VePlayerBase {
|
|
|
1892
1859
|
updatePlaylist(playlist: ExposedSource[] | string, target?: string | {
|
|
1893
1860
|
/** {zh}
|
|
1894
1861
|
* @brief 清晰度唯一标识。
|
|
1895
|
-
* @default 无
|
|
1896
|
-
*
|
|
1897
1862
|
*/
|
|
1898
1863
|
/** {en}
|
|
1899
1864
|
* @brief The resolution ID.
|
|
@@ -1902,8 +1867,6 @@ declare class VePlayerBase {
|
|
|
1902
1867
|
definition?: string;
|
|
1903
1868
|
/** {zh}
|
|
1904
1869
|
* @brief 线路的唯一标识。
|
|
1905
|
-
* @default 无
|
|
1906
|
-
*
|
|
1907
1870
|
*/
|
|
1908
1871
|
/** {en}
|
|
1909
1872
|
* @brief The playback resource ID.
|
|
@@ -2104,7 +2067,6 @@ declare class VePlayerBase {
|
|
|
2104
2067
|
Function | {
|
|
2105
2068
|
/** {zh}
|
|
2106
2069
|
* @brief 插件构造函数。
|
|
2107
|
-
* @default 无
|
|
2108
2070
|
*/
|
|
2109
2071
|
/** {en}
|
|
2110
2072
|
* @brief The plugin constructor.
|
|
@@ -2113,7 +2075,6 @@ declare class VePlayerBase {
|
|
|
2113
2075
|
plugin: Function;
|
|
2114
2076
|
/** {zh}
|
|
2115
2077
|
* @brief 插件配置参数。
|
|
2116
|
-
* @default 无
|
|
2117
2078
|
*/
|
|
2118
2079
|
/** {en}
|
|
2119
2080
|
* @brief The plugin configurations.
|
|
@@ -2374,8 +2335,8 @@ declare namespace strategy {
|
|
|
2374
2335
|
next: DefinitionUrl | null;
|
|
2375
2336
|
}
|
|
2376
2337
|
function arrayToList(urls?: string[]): DefinitionUrl;
|
|
2377
|
-
class Definition
|
|
2378
|
-
readonly definition
|
|
2338
|
+
class Definition {
|
|
2339
|
+
readonly definition?: string;
|
|
2379
2340
|
readonly source: Source;
|
|
2380
2341
|
readonly text?: Record<Lang, string> | string;
|
|
2381
2342
|
readonly fallbackUrl: DefinitionUrl;
|
|
@@ -2383,7 +2344,7 @@ declare namespace strategy {
|
|
|
2383
2344
|
private _currentUrlRef;
|
|
2384
2345
|
constructor(definitionSetting: {
|
|
2385
2346
|
url: string;
|
|
2386
|
-
definition
|
|
2347
|
+
definition?: string;
|
|
2387
2348
|
source: Source;
|
|
2388
2349
|
text?: Record<Lang, string> | string;
|
|
2389
2350
|
fallbackUrls?: string[];
|
|
@@ -2409,7 +2370,6 @@ declare namespace strategy {
|
|
|
2409
2370
|
interface ExposedDefinition {
|
|
2410
2371
|
/** {zh}
|
|
2411
2372
|
* @brief 播放地址。
|
|
2412
|
-
* @default 无
|
|
2413
2373
|
*/
|
|
2414
2374
|
/** {en}
|
|
2415
2375
|
* @brief The playback address.
|
|
@@ -2417,17 +2377,14 @@ declare namespace strategy {
|
|
|
2417
2377
|
url: string;
|
|
2418
2378
|
/** {zh}
|
|
2419
2379
|
* @brief 清晰度标识(唯一值)。
|
|
2420
|
-
* @default 无
|
|
2421
|
-
*
|
|
2422
2380
|
*/
|
|
2423
2381
|
/** {en}
|
|
2424
2382
|
* @brief The resolution ID. This value must be unique.
|
|
2425
2383
|
*
|
|
2426
2384
|
*/
|
|
2427
|
-
definition
|
|
2385
|
+
definition?: string;
|
|
2428
2386
|
/** {zh}
|
|
2429
2387
|
* @brief 清晰度展示名称。可设置多语言 `{text: {'zh-cn': '高清', 'en': 'HD'}}`。
|
|
2430
|
-
* @default 无
|
|
2431
2388
|
*/
|
|
2432
2389
|
/** {en}
|
|
2433
2390
|
* @brief The display name of the resolution. Multiple languages are supported, such as `{text: {'zh-cn': '高清', 'en': 'HD'}}`.
|
|
@@ -2435,14 +2392,13 @@ declare namespace strategy {
|
|
|
2435
2392
|
text?: Record<Lang, string> | string;
|
|
2436
2393
|
/** {zh}
|
|
2437
2394
|
* @brief 为当前清晰度地址设置备路拉流地址,支持设置多个备路拉流地址。当前清晰度地址拉流失败时,会在当前清晰度地址和备路直播地址之间循环拉流,直到拉流成功。
|
|
2438
|
-
* @default 无
|
|
2439
|
-
*
|
|
2440
2395
|
*/
|
|
2441
2396
|
/** {en}
|
|
2442
2397
|
* @brief The backup pull stream address for the current resolution. You can set multiple backup addresses. When the player fails to pull a stream from the current address, it will loop between the current and the backup addresses until it successfully pulls a stream.
|
|
2443
2398
|
*
|
|
2444
2399
|
*/
|
|
2445
2400
|
fallbackUrls?: string[];
|
|
2401
|
+
type?: string;
|
|
2446
2402
|
}
|
|
2447
2403
|
/** {zh}
|
|
2448
2404
|
* @list option
|
|
@@ -2459,7 +2415,6 @@ declare namespace strategy {
|
|
|
2459
2415
|
interface ExposedSource {
|
|
2460
2416
|
/** {zh}
|
|
2461
2417
|
* @brief 线路标识(唯一值)。
|
|
2462
|
-
* @default 无
|
|
2463
2418
|
*/
|
|
2464
2419
|
/** {en}
|
|
2465
2420
|
* @brief The playback source ID. This value must be unique.
|
|
@@ -2467,8 +2422,6 @@ declare namespace strategy {
|
|
|
2467
2422
|
name?: string;
|
|
2468
2423
|
/** {zh}
|
|
2469
2424
|
* @brief 线路展示名称。可设置多语言 `{text: {'zh-cn': '线路一', 'en': 'LineOne'}}`。
|
|
2470
|
-
* @default 无
|
|
2471
|
-
*
|
|
2472
2425
|
*/
|
|
2473
2426
|
/** {en}
|
|
2474
2427
|
* @brief The display name of the live stream source. Multiple languages are supported. For example, you set it to `{text: {'zh-cn': '线路一', 'en': 'LineOne'}}`.
|
|
@@ -2477,8 +2430,6 @@ declare namespace strategy {
|
|
|
2477
2430
|
text?: Record<Lang, string> | string;
|
|
2478
2431
|
/** {zh}
|
|
2479
2432
|
* @brief 该线路下清晰度列表。
|
|
2480
|
-
* @default 无
|
|
2481
|
-
*
|
|
2482
2433
|
*/
|
|
2483
2434
|
/** {en}
|
|
2484
2435
|
* @brief A list of resolutions of the current source.
|
|
@@ -2685,25 +2636,24 @@ declare namespace strategy {
|
|
|
2685
2636
|
*/
|
|
2686
2637
|
enum Level {
|
|
2687
2638
|
/** {zh}
|
|
2688
|
-
* @brief
|
|
2639
|
+
* @brief 发生严重错误,可能由于 CDN 拉取失败或 DRM 权限验证未通过,导致无法播放。
|
|
2689
2640
|
*/
|
|
2690
2641
|
/** {en}
|
|
2691
|
-
* @brief
|
|
2692
|
-
*
|
|
2642
|
+
* @brief A critical error occurs, typically due to CDN fetching failure or DRM permission verification failure, resulting in playback inability.
|
|
2693
2643
|
*/
|
|
2694
2644
|
Fatal = "Fatal",
|
|
2695
2645
|
/** {zh}
|
|
2696
|
-
* @brief
|
|
2646
|
+
* @brief 流异常或处于离线状态,致使播放失败。
|
|
2697
2647
|
*/
|
|
2698
2648
|
/** {en}
|
|
2699
|
-
* @brief
|
|
2649
|
+
* @brief A stream anomaly or offline state causes playback to fail.
|
|
2700
2650
|
*/
|
|
2701
2651
|
Error = "Error",
|
|
2702
2652
|
/** {zh}
|
|
2703
|
-
* @brief
|
|
2653
|
+
* @brief 出现警告信息,通常由日志配置错误或缺少 RTM 降级地址引起。
|
|
2704
2654
|
*/
|
|
2705
2655
|
/** {en}
|
|
2706
|
-
* @brief
|
|
2656
|
+
* @brief A warning is issued, usually due to incorrect log configuration or a missing RTM fallback address.
|
|
2707
2657
|
*/
|
|
2708
2658
|
Warn = "Warn"
|
|
2709
2659
|
}
|
|
@@ -3160,7 +3110,6 @@ declare namespace strategy {
|
|
|
3160
3110
|
showRefresh?: boolean;
|
|
3161
3111
|
/** {zh}
|
|
3162
3112
|
* @brief 自定义报错显示。
|
|
3163
|
-
* @default 无
|
|
3164
3113
|
*/
|
|
3165
3114
|
/** {en}
|
|
3166
3115
|
* @brief Custom error message.
|
|
@@ -3169,7 +3118,6 @@ declare namespace strategy {
|
|
|
3169
3118
|
errorTipsText?: string | Record<Lang, string>;
|
|
3170
3119
|
/** {zh}
|
|
3171
3120
|
* @brief 更多提示信息。
|
|
3172
|
-
* @default 无
|
|
3173
3121
|
*/
|
|
3174
3122
|
/** {en}
|
|
3175
3123
|
* @brief More tips.
|
|
@@ -3329,7 +3277,6 @@ declare namespace strategy {
|
|
|
3329
3277
|
id?: string;
|
|
3330
3278
|
/** {zh}
|
|
3331
3279
|
* @brief 指定播放器容器元素,VePlayer 将被插入在该容器中。id 和 el 需至少传入 1 个。如果同时传入,则优先将播放器插入 id 容器中。
|
|
3332
|
-
* @default 无
|
|
3333
3280
|
*/
|
|
3334
3281
|
/** {en}
|
|
3335
3282
|
* @brief The container element of the player. You should specify either `id` or `el`, or both. If both are specified, the `VePlayer` object will be inserted in the container specified by `id`.
|
|
@@ -3355,7 +3302,6 @@ declare namespace strategy {
|
|
|
3355
3302
|
height?: number | string;
|
|
3356
3303
|
/** {zh}
|
|
3357
3304
|
* @brief 为播放器配置直播拉流地址。您可手动拼接或使用地址生成器生成拉流地址,生成方法请参见[生成直播地址](https://www.volcengine.com/docs/6469/107759)。url 和 playList 需至少传入 1 个。
|
|
3358
|
-
* @default 无
|
|
3359
3305
|
*/
|
|
3360
3306
|
/** {en}
|
|
3361
3307
|
* @brief The pull stream address. You can manually construct the address or use the address generator to generate one. To see how to generate an address, refer to [Generate live-stream addresses](https://docs.byteplus.com/en/byteplus-media-live/docs/generating-live-stream-addresses). You should specify either `url` or `playList`, or both.
|
|
@@ -3363,7 +3309,6 @@ declare namespace strategy {
|
|
|
3363
3309
|
url?: string;
|
|
3364
3310
|
/** {zh}
|
|
3365
3311
|
* @brief 为播放器配置直播拉流地址列表。url 和 playlist 需至少传入 1 个。
|
|
3366
|
-
* @default 无
|
|
3367
3312
|
*/
|
|
3368
3313
|
/** {en}
|
|
3369
3314
|
* @brief A list of live stream sources for the player. You should specify either `url` or `playList`, or both.
|
|
@@ -3371,7 +3316,6 @@ declare namespace strategy {
|
|
|
3371
3316
|
playlist?: ExposedSource[];
|
|
3372
3317
|
/** {zh}
|
|
3373
3318
|
* @brief 当存在多个直播线路时,为播放器设置默认直播线路,不传则默认列表第一个。
|
|
3374
|
-
* @default 无
|
|
3375
3319
|
*/
|
|
3376
3320
|
/** {en}
|
|
3377
3321
|
* @brief The default pull stream address for the player when there are multiple addresses available. If this parameter is not specified, the first address in the playlist will become the default address.
|
|
@@ -3379,7 +3323,6 @@ declare namespace strategy {
|
|
|
3379
3323
|
defaultSource?: string;
|
|
3380
3324
|
/** {zh}
|
|
3381
3325
|
* @brief 为播放器设置默认直播清晰度,不传则默认列表第一个。
|
|
3382
|
-
* @default 无
|
|
3383
3326
|
*/
|
|
3384
3327
|
/** {en}
|
|
3385
3328
|
* @brief The default resolution for the player when there are multiple resolutions available. If this parameter is not specified, the first resolution in the list will become the default resolution.
|
|
@@ -3387,7 +3330,6 @@ declare namespace strategy {
|
|
|
3387
3330
|
defaultDefinition?: string;
|
|
3388
3331
|
/** {zh}
|
|
3389
3332
|
* @brief 为播放器设置备路拉流地址,支持设置多个备路拉流地址,在 `maxFallbackRound` 大于 `0` 时有效。当您使用配置的直播拉流地址拉流失败时,会在直播地址和备路直播地址之间循环拉流,直到拉流成功。
|
|
3390
|
-
* @default 无
|
|
3391
3333
|
*/
|
|
3392
3334
|
/** {en}
|
|
3393
3335
|
* @brief The backup pull stream address(es) for the player. You can enter multiple backup addresses. If `maxFallbackRound` is greater than `0`, when an error occurs in the main address, the player automatically switches to the backup address.
|
|
@@ -3441,7 +3383,6 @@ declare namespace strategy {
|
|
|
3441
3383
|
degradation?: Degradation | boolean;
|
|
3442
3384
|
/** {zh}
|
|
3443
3385
|
* @brief 为播放器设置封面图 URL。
|
|
3444
|
-
* @default 无
|
|
3445
3386
|
*/
|
|
3446
3387
|
/** {en}
|
|
3447
3388
|
* @brief The URL of the player's cover image.
|
|
@@ -3457,7 +3398,6 @@ declare namespace strategy {
|
|
|
3457
3398
|
/** {zh}
|
|
3458
3399
|
* @brief 为播放器设置自定义的多语言词典,可设置每个语种的词典,格式为 { texts: { [key: string]: Object; } }。
|
|
3459
3400
|
* 例如,{ texts: { 'zh-cn': { PIP: '画中画' }, en: { PIP: 'pip' } }} ,格式请参考[默认词典](https://www.volcengine.com/docs/6469/127529)。
|
|
3460
|
-
* @default 无
|
|
3461
3401
|
*/
|
|
3462
3402
|
/** {en}
|
|
3463
3403
|
* @brief Configures a custom multilingual dictionary for the player. You can set the dictionary for each language in the format { texts: { [key: string]: Object; } }. For example, { texts: { 'zh-cn': { PIP: '画中画' }, en: { PIP: 'pip' } }}.
|
|
@@ -3467,7 +3407,7 @@ declare namespace strategy {
|
|
|
3467
3407
|
texts: Record<Lang, Record<string, string>>;
|
|
3468
3408
|
};
|
|
3469
3409
|
/** {zh}
|
|
3470
|
-
* @brief
|
|
3410
|
+
* @brief 为播放器设置是否自动播放,`muted` 设置为 `true` 为静音自动播放。
|
|
3471
3411
|
* @default { muted: true }
|
|
3472
3412
|
* @type {{ muted: boolean } | boolean}
|
|
3473
3413
|
*/
|
|
@@ -3573,7 +3513,6 @@ declare namespace strategy {
|
|
|
3573
3513
|
playsinline?: boolean;
|
|
3574
3514
|
/** {zh}
|
|
3575
3515
|
* @brief 为播放器设置 video 标签扩展属性,初始化时会设置在 videoElement 或 audioElement 对象上,请参考 [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#properties) 查看其支持的属性配置。
|
|
3576
|
-
* @default 无
|
|
3577
3516
|
*/
|
|
3578
3517
|
/** {en}
|
|
3579
3518
|
* @brief Additional properties for the `video` element that will be applied when the `videoElement` or `audioElement` objects are initialized. Refer to [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#properties) for supported properties.
|
|
@@ -3651,7 +3590,6 @@ declare namespace strategy {
|
|
|
3651
3590
|
marginControls?: boolean;
|
|
3652
3591
|
/** {zh}
|
|
3653
3592
|
* @brief 启用微信同层播放。
|
|
3654
|
-
* @default 无
|
|
3655
3593
|
*/
|
|
3656
3594
|
/** {en}
|
|
3657
3595
|
* @brief Enable playing the video on the same player as WeChat.
|
|
@@ -3661,7 +3599,6 @@ declare namespace strategy {
|
|
|
3661
3599
|
* @brief 是否启用微信全屏播放模式。
|
|
3662
3600
|
* - `true`:启用
|
|
3663
3601
|
* - `false`:停用
|
|
3664
|
-
* @default 无
|
|
3665
3602
|
*/
|
|
3666
3603
|
/** {en}
|
|
3667
3604
|
* @brief Whether to enable full-screen playback in WeChat.
|
|
@@ -3674,7 +3611,6 @@ declare namespace strategy {
|
|
|
3674
3611
|
* - `landscape`:横屏
|
|
3675
3612
|
* - `portrait`:竖屏
|
|
3676
3613
|
* - `landscape|portrait`:跟随手机自动旋转
|
|
3677
|
-
* @default 无
|
|
3678
3614
|
*/
|
|
3679
3615
|
/** {en}
|
|
3680
3616
|
* @brief The orientation of the video when played on WeChat. The following values are supported:
|
|
@@ -3685,7 +3621,6 @@ declare namespace strategy {
|
|
|
3685
3621
|
"x5-video-orientation"?: "landscape" | "portrait" | "landscape|portrait";
|
|
3686
3622
|
/** {zh}
|
|
3687
3623
|
* @brief 为播放器配置关键点样式。
|
|
3688
|
-
* @default 无
|
|
3689
3624
|
* @hidden 直播目前没用到
|
|
3690
3625
|
*/
|
|
3691
3626
|
/** {en}
|
|
@@ -3695,7 +3630,6 @@ declare namespace strategy {
|
|
|
3695
3630
|
commonStyle?: CommonStyle;
|
|
3696
3631
|
/** {zh}
|
|
3697
3632
|
* @brief 自定义插件列表。
|
|
3698
|
-
* @default 无
|
|
3699
3633
|
*/
|
|
3700
3634
|
/** {en}
|
|
3701
3635
|
* @brief A list of custom plugins.
|
|
@@ -3738,10 +3672,10 @@ declare namespace strategy {
|
|
|
3738
3672
|
*/
|
|
3739
3673
|
closeVideoDblclick?: boolean;
|
|
3740
3674
|
/** {zh}
|
|
3741
|
-
* @brief 支持传入 video
|
|
3675
|
+
* @brief 支持传入 `video` DOM 元素,适用于多个播放器共享同一视频场景。
|
|
3742
3676
|
*/
|
|
3743
3677
|
/** {en}
|
|
3744
|
-
* @brief Supports passing in video DOM,
|
|
3678
|
+
* @brief Supports passing in a `video` DOM element, suitable for scenarios where multiple players share the same video.
|
|
3745
3679
|
*/
|
|
3746
3680
|
mediaElement?: HTMLVideoElement | null;
|
|
3747
3681
|
}
|
|
@@ -3810,7 +3744,6 @@ declare namespace strategy {
|
|
|
3810
3744
|
interface CommonStyle {
|
|
3811
3745
|
/** {zh}
|
|
3812
3746
|
* @brief 进度条底色。
|
|
3813
|
-
* @default 无
|
|
3814
3747
|
*/
|
|
3815
3748
|
/** {en}
|
|
3816
3749
|
* @brief The background color of the progress bar.
|
|
@@ -3818,7 +3751,6 @@ declare namespace strategy {
|
|
|
3818
3751
|
progressColor?: string;
|
|
3819
3752
|
/** {zh}
|
|
3820
3753
|
* @brief 播放完成部分进度条底色。
|
|
3821
|
-
* @default 无
|
|
3822
3754
|
*/
|
|
3823
3755
|
/** {en}
|
|
3824
3756
|
* @brief The background color of the progress bar for the completed portion of video playback.
|
|
@@ -3826,7 +3758,6 @@ declare namespace strategy {
|
|
|
3826
3758
|
playedColor?: string;
|
|
3827
3759
|
/** {zh}
|
|
3828
3760
|
* @brief 缓存部分进度条底色。
|
|
3829
|
-
* @default 无
|
|
3830
3761
|
*/
|
|
3831
3762
|
/** {en}
|
|
3832
3763
|
* @brief
|
|
@@ -3835,7 +3766,6 @@ declare namespace strategy {
|
|
|
3835
3766
|
cachedColor?: string;
|
|
3836
3767
|
/** {zh}
|
|
3837
3768
|
* @brief 进度条滑块样式。
|
|
3838
|
-
* @default 无
|
|
3839
3769
|
*/
|
|
3840
3770
|
/** {en}
|
|
3841
3771
|
* @brief The style of the progress bar slider.
|
|
@@ -3846,7 +3776,6 @@ declare namespace strategy {
|
|
|
3846
3776
|
};
|
|
3847
3777
|
/** {zh}
|
|
3848
3778
|
* @brief 音量颜色。
|
|
3849
|
-
* @default 无
|
|
3850
3779
|
*/
|
|
3851
3780
|
/** {en}
|
|
3852
3781
|
* @brief The color of the volume slider.
|
|
@@ -3857,9 +3786,10 @@ declare namespace strategy {
|
|
|
3857
3786
|
options?: Partial<VePlayerBaseOptions>;
|
|
3858
3787
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3859
3788
|
plugins?: any[];
|
|
3789
|
+
protocol?: string;
|
|
3860
3790
|
useSrc?: boolean;
|
|
3861
3791
|
};
|
|
3862
|
-
type PreparePlugins = (url
|
|
3792
|
+
type PreparePlugins = (url?: string) => Promise<PrepareResult | undefined> | undefined;
|
|
3863
3793
|
/** {zh}
|
|
3864
3794
|
* @detail option
|
|
3865
3795
|
* @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
|
|
@@ -4039,13 +3969,6 @@ declare namespace strategy {
|
|
|
4039
3969
|
function detectCodec(url: string): Promise<"unknown" | Codec>;
|
|
4040
3970
|
function isSoftDecode(options: VePlayerBaseOptions, currentCodec?: Codec | "unknown"): Promise<boolean>;
|
|
4041
3971
|
function combineOptions<T = VePlayerBaseOptions>(strategyList: (Strategy<T> | undefined)[]): Partial<T>;
|
|
4042
|
-
const getHlsStrategy: (options: VePlayerBaseOptions) => Promise<{
|
|
4043
|
-
options?: undefined;
|
|
4044
|
-
plugins?: undefined;
|
|
4045
|
-
} | {
|
|
4046
|
-
options: Partial<VePlayerBaseOptions>;
|
|
4047
|
-
plugins: any[];
|
|
4048
|
-
}>;
|
|
4049
3972
|
}
|
|
4050
3973
|
declare namespace error {
|
|
4051
3974
|
const EN: {
|
|
@@ -4196,25 +4119,24 @@ declare namespace error {
|
|
|
4196
4119
|
*/
|
|
4197
4120
|
enum Level {
|
|
4198
4121
|
/** {zh}
|
|
4199
|
-
* @brief
|
|
4122
|
+
* @brief 发生严重错误,可能由于 CDN 拉取失败或 DRM 权限验证未通过,导致无法播放。
|
|
4200
4123
|
*/
|
|
4201
4124
|
/** {en}
|
|
4202
|
-
* @brief
|
|
4203
|
-
*
|
|
4125
|
+
* @brief A critical error occurs, typically due to CDN fetching failure or DRM permission verification failure, resulting in playback inability.
|
|
4204
4126
|
*/
|
|
4205
4127
|
Fatal = "Fatal",
|
|
4206
4128
|
/** {zh}
|
|
4207
|
-
* @brief
|
|
4129
|
+
* @brief 流异常或处于离线状态,致使播放失败。
|
|
4208
4130
|
*/
|
|
4209
4131
|
/** {en}
|
|
4210
|
-
* @brief
|
|
4132
|
+
* @brief A stream anomaly or offline state causes playback to fail.
|
|
4211
4133
|
*/
|
|
4212
4134
|
Error = "Error",
|
|
4213
4135
|
/** {zh}
|
|
4214
|
-
* @brief
|
|
4136
|
+
* @brief 出现警告信息,通常由日志配置错误或缺少 RTM 降级地址引起。
|
|
4215
4137
|
*/
|
|
4216
4138
|
/** {en}
|
|
4217
|
-
* @brief
|
|
4139
|
+
* @brief A warning is issued, usually due to incorrect log configuration or a missing RTM fallback address.
|
|
4218
4140
|
*/
|
|
4219
4141
|
Warn = "Warn"
|
|
4220
4142
|
}
|