@volcengine/veplayer 1.18.0-rc.2 → 1.18.0-rc.4

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.
Files changed (3) hide show
  1. package/index.d.ts +789 -160
  2. package/index.min.js +2 -2
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -882,8 +882,13 @@ export interface IListItem {
882
882
  */
883
883
  [propName: string]: any;
884
884
  }
885
- /**
886
- * @brief 字幕文案配置
885
+ /** {zh}
886
+ * @brief 字幕文案配置。
887
+ * @list Options
888
+ * @kind property
889
+ */
890
+ /** {en}
891
+ * @brief Subtitle text item configuration.
887
892
  * @list Options
888
893
  * @kind property
889
894
  */
@@ -930,7 +935,7 @@ export interface ITextItem {
930
935
  */
931
936
  index?: number;
932
937
  }
933
- /**
938
+ /** {zh}
934
939
  * @brief 清晰度降级配置。
935
940
  * @list Options
936
941
  * @kind property
@@ -941,7 +946,7 @@ export interface ITextItem {
941
946
  * @kind property
942
947
  */
943
948
  export interface IDefinitionDemotePlugin {
944
- /**
949
+ /** {zh}
945
950
  * @brief 是否开启自动降级,取值如下:
946
951
  * - `false`:关闭自动降级。
947
952
  * - `true`:开启自动降级。
@@ -954,7 +959,7 @@ export interface IDefinitionDemotePlugin {
954
959
  * - `true`: automatic downgrade is enabled.
955
960
  */
956
961
  isNeedAutoDemote?: boolean;
957
- /**
962
+ /** {zh}
958
963
  * @brief 清晰度降级顺序。数组中的元素需与 `playList` 中的 `definition` 相对应。
959
964
  * @default []
960
965
  *
@@ -962,49 +967,59 @@ export interface IDefinitionDemotePlugin {
962
967
  * @memberof IDefinitionDemotePlugin
963
968
  */
964
969
  /** {en}
970
+ * @brief The order of definition downgrade. The elements in the array should correspond to the `definition` in the `playList`.
971
+ * @default []
972
+ *
973
+ * @type {string[]}
974
+ * @memberof IDefinitionDemotePlugin
965
975
  */
966
976
  demotePriority: string[];
967
- /**
977
+ /** {zh}
968
978
  * @brief 长时间卡顿的时间阈值,单位为毫秒。卡顿时长超过该值,即视为长时间卡顿。发生长时间卡顿时,SDK 会触发 `LONG_WAITING` 事件。
969
979
  * @default 5000
970
980
  *
971
981
  */
972
982
  /** {en}
983
+ * @brief The threshold for long waiting time, in milliseconds. If the waiting time exceeds this value, it is considered as long waiting. The `LONG_WAITING` event will be triggered when long waiting occurs.
973
984
  * @default 5000
974
985
  *
975
986
  */
976
987
  longWaitingTime?: number;
977
- /**
988
+ /** {zh}
978
989
  * @brief 频繁卡顿的次数阈值。`oftenWaitingTime` 内卡顿次数大于或等于阈值时,SDK 会触发 `OFTEN_WAITING` 事件,提示发生了频繁卡顿。
979
990
  * @default 3
980
991
  *
981
992
  */
982
993
  /** {en}
994
+ * @brief The threshold for frequent stuttering, in milliseconds. If the stuttering count exceeds this value, the `OFTEN_WAITING` event will be triggered, indicating frequent stuttering.
983
995
  * @default 3
984
996
  *
985
997
  */
986
998
  oftenWaitingCount?: number;
987
- /**
999
+ /** {zh}
988
1000
  * @brief 频繁卡顿监测的时间范围。`oftenWaitingTime` 内卡顿次数大于或等于 `oftenWaitingCount` 时,SDK 会触发 `OFTEN_WAITING` 事件,提示发生了频繁卡顿。
989
1001
  * @default 5000
990
1002
  */
991
1003
  /** {en}
1004
+ * @brief The time range for frequent stuttering monitoring. If the stuttering count exceeds `oftenWaitingCount` within `oftenWaitingTime`, the `OFTEN_WAITING` event will be triggered, indicating frequent stuttering.
992
1005
  * @default 5000
993
1006
  */
994
1007
  oftenWaitingTime?: number;
995
- /**
1008
+ /** {zh}
996
1009
  * @brief 卡顿时是否显示清晰度降级提示 toast。
997
1010
  * @default true
998
1011
  */
999
1012
  /** {en}
1013
+ * @brief Whether to display the definition downgrade toast.
1000
1014
  * @default true
1001
1015
  */
1002
1016
  isNeedShowTips?: boolean;
1003
- /**
1017
+ /** {zh}
1004
1018
  * @brief 清晰度降级提示 toast 的显示时长,单位为毫秒。
1005
1019
  * @default 3000
1006
1020
  */
1007
1021
  /** {en}
1022
+ * @brief The duration of the definition downgrade toast, in milliseconds.
1008
1023
  * @default 3000
1009
1024
  */
1010
1025
  toastShowTime?: number;
@@ -1040,79 +1055,253 @@ export declare class DefinitionDemotePlugin extends Plugin {
1040
1055
  showToast(definition: Stream): void;
1041
1056
  destroy(): void;
1042
1057
  }
1043
- /**
1044
- * 音轨选择选项。
1058
+ /** {zh}
1059
+ * @brief 音轨选择选项。
1045
1060
  * 对应 hls.js `AudioSelectionOption` 的所有字段,所有字段均可选。
1046
- * 用于 `switchAudioTrack()` 参数(配合 `id` 使用)以及 `audioPreference` 配置。
1061
+ * 用于 `switchAudioTrack()` 参数以及 `audioPreference` 配置。
1062
+ * @list Options
1063
+ * @kind property
1064
+ */
1065
+ /** {en}
1066
+ * @brief Audio track selection options.
1067
+ * Corresponding to all fields of hls.js `AudioSelectionOption`, all fields are optional.
1068
+ * Used for `switchAudioTrack()` and `audioPreference` configuration.
1069
+ * @list Options
1070
+ * @kind property
1047
1071
  */
1048
1072
  export interface AudioTrackOption {
1073
+ /** {zh}
1074
+ * @brief 音轨主要语言,BCP-47 格式(如 `zh`、`en`)。对应 `#EXT-X-MEDIA` 的 `LANGUAGE`。
1075
+ */
1076
+ /** {en}
1077
+ * @brief Primary track language in BCP-47 format (e.g. `zh`, `en`). Maps to `#EXT-X-MEDIA` `LANGUAGE`.
1078
+ */
1049
1079
  lang?: string;
1080
+ /** {zh}
1081
+ * @brief 关联语言代码。对应 `#EXT-X-MEDIA` 的 `ASSOC-LANGUAGE`。
1082
+ */
1083
+ /** {en}
1084
+ * @brief Associated language code. Maps to `#EXT-X-MEDIA` `ASSOC-LANGUAGE`.
1085
+ */
1050
1086
  assocLang?: string;
1087
+ /** {zh}
1088
+ * @brief 轨道特征描述字符串。对应 `#EXT-X-MEDIA` 的 `CHARACTERISTICS`(如 `public.accessibility.describes-video`)。
1089
+ */
1090
+ /** {en}
1091
+ * @brief Track characteristics string. Maps to `#EXT-X-MEDIA` `CHARACTERISTICS`.
1092
+ */
1051
1093
  characteristics?: string;
1094
+ /** {zh}
1095
+ * @brief 声道数。对应 `#EXT-X-MEDIA` 的 `CHANNELS`(如 `"2"`)。
1096
+ */
1097
+ /** {en}
1098
+ * @brief Number of audio channels. Maps to `#EXT-X-MEDIA` `CHANNELS` (e.g. `"2"`).
1099
+ */
1052
1100
  channels?: string;
1101
+ /** {zh}
1102
+ * @brief 音轨名称,用于展示或精确匹配(如 `Stereo`)。hls.js 路径下与 `lang` 组合可唯一定位轨道。
1103
+ */
1104
+ /** {en}
1105
+ * @brief Track name for display or precise matching (e.g. `Stereo`). With `lang`, uniquely identifies a track on the hls.js path.
1106
+ */
1053
1107
  name?: string;
1108
+ /** {zh}
1109
+ * @brief 音频编解码器标识(如 `mp4a.40.2`)。
1110
+ */
1111
+ /** {en}
1112
+ * @brief Audio codec identifier (e.g. `mp4a.40.2`).
1113
+ */
1054
1114
  audioCodec?: string;
1115
+ /** {zh}
1116
+ * @brief 音频组 ID。对应 `#EXT-X-MEDIA` 的 `GROUP-ID`。
1117
+ */
1118
+ /** {en}
1119
+ * @brief Audio group ID. Maps to `#EXT-X-MEDIA` `GROUP-ID`.
1120
+ */
1055
1121
  groupId?: string;
1122
+ /** {zh}
1123
+ * @brief 是否为 manifest 中的默认音轨。
1124
+ */
1125
+ /** {en}
1126
+ * @brief Whether this is the default track declared in the manifest.
1127
+ */
1056
1128
  default?: boolean;
1129
+ /** {zh}
1130
+ * @hidden
1131
+ */
1132
+ /** {en}
1133
+ * @hidden
1134
+ */
1057
1135
  [key: string]: unknown;
1058
1136
  }
1137
+ /** {zh}
1138
+ * @detail Api
1139
+ * @brief HLS 音轨对象。在 `AudioTrackOption` 基础上包含列表索引与展示名称。
1140
+ */
1141
+ /** {en}
1142
+ * @detail Api
1143
+ * @brief HLS audio track object. Extends `AudioTrackOption` with list index and display name.
1144
+ */
1059
1145
  export interface AudioTrack extends AudioTrackOption {
1146
+ /** {zh}
1147
+ * @brief 轨道在 `audioTracks` 列表中的索引(hls.js 与原生路径均为 number)。
1148
+ */
1149
+ /** {en}
1150
+ * @brief Track index in the `audioTracks` list (number on both hls.js and native paths).
1151
+ */
1060
1152
  id: number;
1153
+ /** {zh}
1154
+ * @brief 展示名称(由 `lang` / `name` 等字段生成或来自 manifest)。
1155
+ */
1156
+ /** {en}
1157
+ * @brief Display name (derived from `lang` / `name` or from the manifest).
1158
+ */
1061
1159
  name: string;
1160
+ /** {zh}
1161
+ * @brief 是否为 manifest 默认音轨。
1162
+ */
1163
+ /** {en}
1164
+ * @brief Whether this is the default track in the manifest.
1165
+ */
1062
1166
  default: boolean;
1063
1167
  }
1064
- /**
1065
- * `getAudioTracks()` / `getCurrentAudioTrack()` 的返回项类型。
1066
- * `switchAudioTrack()` 参数类型的子类型,可直接传入。
1168
+ /** {zh}
1169
+ * @detail Api
1170
+ * @brief `getAudioTracks()` / `getCurrentAudioTrack()` 的返回项类型,可直接传入 `switchAudioTrack()`。
1171
+ */
1172
+ /** {en}
1173
+ * @detail Api
1174
+ * @brief Return type of `getAudioTracks()` / `getCurrentAudioTrack()`; can be passed directly to `switchAudioTrack()`.
1067
1175
  */
1068
1176
  export interface AudioTrackInfo extends AudioTrack {
1069
- /** 是否为当前激活轨道。`getCurrentAudioTrack()` 返回时始终为 `true`。 */
1177
+ /** {zh}
1178
+ * @brief 是否为当前激活轨道。`getCurrentAudioTrack()` 返回时始终为 `true`。
1179
+ */
1180
+ /** {en}
1181
+ * @brief Whether this is the currently active track. Always `true` when returned by `getCurrentAudioTrack()`.
1182
+ */
1070
1183
  selected: boolean;
1071
1184
  }
1185
+ /** {zh}
1186
+ * @brief PC 端音轨切换插件配置。
1187
+ * @list Options
1188
+ * @kind property
1189
+ */
1190
+ /** {en}
1191
+ * @brief PC audio track selector plugin configuration.
1192
+ * @list Options
1193
+ * @kind property
1194
+ */
1072
1195
  export interface IAudioTrackConfig {
1073
- /** 控件在控制栏中的排列顺序,数值越小越靠左。@default 5 */
1196
+ /** {zh}
1197
+ * @brief 控件在控制栏中的排列顺序,数值越小越靠左。
1198
+ * @default 70
1199
+ */
1200
+ /** {en}
1201
+ * @brief Sort weight in the control bar; smaller values appear further left.
1202
+ * @default 70
1203
+ */
1074
1204
  index?: number;
1075
- /** 是否显示图标按钮。@default true */
1205
+ /** {zh}
1206
+ * @brief 是否显示音轨切换图标按钮。
1207
+ * @default true
1208
+ */
1209
+ /** {en}
1210
+ * @brief Whether to show the audio track switcher icon.
1211
+ * @default true
1212
+ */
1076
1213
  isShowIcon?: boolean;
1077
- /** 竖屏时是否隐藏控件。@default false */
1214
+ /** {zh}
1215
+ * @brief 竖屏时是否隐藏音轨控件。
1216
+ * @default false
1217
+ */
1218
+ /** {en}
1219
+ * @brief Whether to hide the audio track control in portrait orientation.
1220
+ * @default false
1221
+ */
1078
1222
  hidePortrait?: boolean;
1079
- /** 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。@default true */
1223
+ /** {zh}
1224
+ * @brief 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。
1225
+ * @default true
1226
+ */
1227
+ /** {en}
1228
+ * @brief Whether to append the raw track name in parentheses after the language label, e.g. `Japanese (Stereo AudioTrack1)`.
1229
+ * @default true
1230
+ */
1080
1231
  showNameSuffix?: boolean;
1081
1232
  }
1233
+ /** {zh}
1234
+ * @brief 移动端音轨切换插件配置。
1235
+ * @list Options
1236
+ * @kind property
1237
+ */
1238
+ /** {en}
1239
+ * @brief Mobile audio track selector plugin configuration.
1240
+ * @list Options
1241
+ * @kind property
1242
+ */
1082
1243
  export interface IAudioTrackMobileConfig {
1083
- /** 控件在控制栏中的排列顺序,数值越小越靠左。@default 2.6 */
1244
+ /** {zh}
1245
+ * @brief 控件在控制栏中的排列顺序,数值越小越靠左。
1246
+ * @default 2.6
1247
+ */
1248
+ /** {en}
1249
+ * @brief Sort weight in the control bar; smaller values appear further left.
1250
+ * @default 2.6
1251
+ */
1084
1252
  index?: number;
1085
- /** 是否显示图标按钮。@default true */
1253
+ /** {zh}
1254
+ * @brief 是否显示音轨切换图标按钮。
1255
+ * @default true
1256
+ */
1257
+ /** {en}
1258
+ * @brief Whether to show the audio track switcher icon.
1259
+ * @default true
1260
+ */
1086
1261
  isShowIcon?: boolean;
1087
- /** 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。@default true */
1262
+ /** {zh}
1263
+ * @brief 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。
1264
+ * @default true
1265
+ */
1266
+ /** {en}
1267
+ * @brief Whether to append the raw track name in parentheses after the language label, e.g. `Japanese (Stereo AudioTrack1)`.
1268
+ * @default true
1269
+ */
1088
1270
  showNameSuffix?: boolean;
1089
1271
  }
1090
- /**
1272
+ /** {zh}
1091
1273
  * @brief DASH 播放配置。
1092
1274
  * @list Options
1093
1275
  * @kind property
1094
1276
  */
1095
1277
  /** {en}
1278
+ * @brief DASH playback configuration.
1096
1279
  * @list Options
1097
1280
  * @kind property
1098
1281
  */
1099
1282
  export interface IDashPluginConfig {
1100
- /**
1283
+ /** {zh}
1101
1284
  * @brief 视频 ID。
1102
1285
  * @default -
1103
1286
  * @notes 播放加密视频时必选
1104
1287
  */
1105
1288
  /** {en}
1289
+ * @brief Video ID.
1106
1290
  * @default -
1291
+ * @notes When playing encrypted videos, it is required.
1107
1292
  */
1108
1293
  vid?: string;
1109
- /**
1294
+ /** {zh}
1110
1295
  * @hidden
1111
1296
  * @brief 播放类型
1112
1297
  * @default TOP
1113
1298
  */
1299
+ /** {en}
1300
+ * @brief Playback type.
1301
+ * @default TOP
1302
+ */
1114
1303
  playInfoType: "TOP";
1115
- /**
1304
+ /** {zh}
1116
1305
  * @brief 清晰度映射文案。
1117
1306
  * @default -
1118
1307
  * @example
@@ -1127,6 +1316,16 @@ export interface IDashPluginConfig {
1127
1316
  */
1128
1317
  /** {en}
1129
1318
  * @brief Definition label mapping.
1319
+ * @default -
1320
+ * @example
1321
+ * ``` javascript
1322
+ * {
1323
+ * 360p: "SD 360p",
1324
+ * 480p: "HD 480p",
1325
+ * 720p: "FHD 720p",
1326
+ * 1080p: "UHD 1080p"
1327
+ * }
1328
+ * ```
1130
1329
  */
1131
1330
  definitionText: Record<string, string>;
1132
1331
  /**
@@ -1135,91 +1334,142 @@ export interface IDashPluginConfig {
1135
1334
  */
1136
1335
  /** {en}
1137
1336
  * @brief Default definition.
1337
+ * @default The first definition in the list
1138
1338
  */
1139
1339
  defaultDefinition?: string;
1140
- /**
1340
+ /** {zh}
1141
1341
  * @hidden
1142
1342
  * 获取证书地址
1143
1343
  * 默认:`//i.snssdk.com/video/drm/v1/play_licenses`
1144
1344
  * 播放加密视频时必选
1145
1345
  */
1346
+ /** {en}
1347
+ * @brief Get the certificate address.
1348
+ * @default `//i.snssdk.com/video/drm/v1/play_licenses`
1349
+ * @notes When playing encrypted videos, it is required.
1350
+ */
1146
1351
  getLicenseUrl?: string;
1147
- /**
1352
+ /** {zh}
1148
1353
  * @hidden
1149
1354
  * dash播放信息,由`Service.url`服务接口获取
1150
1355
  * 默认:无
1151
1356
  * 必选
1152
1357
  */
1358
+ /** {en}
1359
+ * @hidden
1360
+ * @brief Dash playback information, obtained from the `Service.url` service interface.
1361
+ * @default -
1362
+ * @notes Required.
1363
+ */
1153
1364
  dashOpts?: {
1154
1365
  Data: any;
1155
1366
  };
1156
- /**
1367
+ /** {zh}
1157
1368
  * @brief 兜底的mp4播放列表,由`Service.url`服务接口获取
1158
1369
  * @default -
1159
1370
  * @hidden
1160
1371
  */
1372
+ /** {en}
1373
+ * @brief Fallback mp4 playback list, obtained from the `Service.url` service interface.
1374
+ * @default -
1375
+ * @hidden
1376
+ */
1161
1377
  mp4Opts: {
1162
1378
  mp4List: mp4OptsItem[];
1163
1379
  };
1164
- /**
1165
- * 预加载时间,单位ms
1380
+ /** {zh}
1381
+ * @brief 预加载时间,单位ms
1166
1382
  * @default 50
1167
- * @brief 预加载时间,单位为毫秒。
1168
1383
  */
1169
1384
  /** {en}
1170
1385
  * @brief Preload time in milliseconds.
1386
+ * @default 50
1171
1387
  */
1172
1388
  preloadTime?: number;
1173
- /**
1389
+ /** {zh}
1174
1390
  * @hidden
1175
1391
  * 自适应配置项
1176
1392
  * 默认:undefined
1177
1393
  * 非必选
1178
1394
  */
1395
+ /** {en}
1396
+ * @brief Adaptive configuration item.
1397
+ * @default undefined
1398
+ * @hidden
1399
+ */
1179
1400
  autoBitrateOpts?: any;
1180
- /**
1401
+ /** {zh}
1181
1402
  * @hidden
1182
1403
  * 备用地址降级,默认情况下,当dash播放出问题后,会降级为mp4播放;
1183
1404
  * 设置改参数后,会优先使用备用地址进行dash的降级播放,再次出错时,会降级为mp4播放
1184
1405
  * 默认:false
1185
1406
  * 非必选
1186
1407
  */
1408
+ /** {en}
1409
+ * @brief Fallback address degradation. By default, when dash playback fails, it will be downgraded to mp4 playback.
1410
+ * @default false
1411
+ * @hidden
1412
+ */
1187
1413
  useBackUrl?: boolean;
1188
- /**
1414
+ /** {zh}
1189
1415
  * @hidden
1190
1416
  * 优化首帧
1191
1417
  * 是针对域名,将range参数放在url后面,避免OPTIONS请求,从而优化首帧
1192
1418
  * 默认:无
1193
1419
  * 非必选
1194
1420
  */
1421
+ /** {en}
1422
+ * @brief Optimize the first frame.
1423
+ * @default undefined
1424
+ * @hidden
1425
+ */
1195
1426
  url_range_domains?: string[];
1196
1427
  }
1197
- /**
1428
+ /** {zh}
1198
1429
  * @brief dash播放的mp4兜底播放列表配置
1199
1430
  * @list Options
1431
+ * @kind property
1432
+ * @hidden
1433
+ */
1434
+ /** {en}
1435
+ * @brief Fallback mp4 playback list configuration for dash playback.
1436
+ * @list Options
1437
+ * @kind property
1200
1438
  * @hidden
1201
1439
  */
1202
1440
  export interface mp4OptsItem {
1203
- /**
1441
+ /** {zh}
1204
1442
  * 清晰度
1205
1443
  * 默认: 无
1206
1444
  * 必传
1207
1445
  */
1446
+ /** {en}
1447
+ * @brief Definition for fallback mp4 playback.
1448
+ * @default -
1449
+ * @notes Required.
1450
+ */
1208
1451
  definition: string;
1209
- /**
1210
- * mp4地址
1211
- * 默认:
1212
- * 必传
1452
+ /** {zh}
1453
+ * @briefmp4地址
1454
+ * @default -
1455
+ * @notes Required.
1456
+ */
1457
+ /** {en}
1458
+ * @brief URL for fallback mp4 playback.
1459
+ * @default -
1460
+ * @notes Required.
1213
1461
  */
1214
1462
  url: string;
1215
1463
  }
1216
- /**
1464
+ /** {zh}
1217
1465
  * @brief HLS 加密播放配置。
1218
1466
  * @list Options
1219
1467
  * @kind property
1220
1468
  */
1221
1469
  /** {en}
1222
1470
  * @brief HLS encrypted playback configuration.
1471
+ * @list Options
1472
+ * @kind property
1223
1473
  */
1224
1474
  export interface IEncryptHlsPluginConfig {
1225
1475
  /** {zh}
@@ -1231,49 +1481,77 @@ export interface IEncryptHlsPluginConfig {
1231
1481
  * @default https://vod.byteplusapi.com
1232
1482
  */
1233
1483
  playDomain?: string;
1234
- /**
1484
+ /** {zh}
1235
1485
  * @hidden
1236
1486
  * @brief 请求类型,固定值 'TOP'
1237
1487
  * @default TOP
1238
1488
  */
1489
+ /** {en}
1490
+ * @brief Request type, fixed value 'TOP'
1491
+ * @default TOP
1492
+ * @hidden
1493
+ */
1239
1494
  getKeyType?: string;
1240
- /**
1495
+ /** {zh}
1241
1496
  * @hidden
1242
1497
  * @brief 密钥请求域名
1243
1498
  * @default https://vod.volcengineapi.com
1244
1499
  */
1500
+ /** {en}
1501
+ * @brief Request domain name for key request
1502
+ * @default https://vod.byteplusapi.com
1503
+ */
1245
1504
  keyDomain?: string;
1246
- /**
1505
+ /** {zh}
1247
1506
  * @brief 播放地址获取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)}
1248
1507
  * @default -
1249
1508
  */
1509
+ /** {en}
1510
+ * @brief Playback address acquisition token, generated by the server and distributed by the server, see {@link https://docs.byteplus.com/en/docs/byteplus-vod/reference-getplayinfo PlayAuthToken}
1511
+ * @default -
1512
+ */
1250
1513
  playAuthToken?: string;
1251
- /**
1514
+ /** {zh}
1252
1515
  * @brief 密钥获取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}
1253
1516
  * @default -
1254
1517
  */
1518
+ /** {en}
1519
+ * @brief Key acquisition token, generated by the server and distributed by the server, see {@link https://docs.byteplus.com/en/docs/byteplus-vod/docs-go-sdk#generating-hls-decryption-token keyToken}
1520
+ */
1255
1521
  keyToken: string;
1256
1522
  }
1257
- /**
1523
+ /** {zh}
1258
1524
  * @brief 质量日志上报配置。
1259
1525
  * @list Options
1260
1526
  * @kind property
1261
1527
  */
1262
1528
  /** {en}
1263
1529
  * @brief Quality log configuration.
1530
+ * @list Options
1531
+ * @kind property
1264
1532
  */
1265
1533
  export interface IVodLogOptsConfig {
1266
- /**
1534
+ /** {zh}
1267
1535
  * @brief 视频点播应用 ID。您可在视频{@link https://console.volcengine.com/vod/region:vod+cn-north-1/sdk/app/ 点播控制台 > 点播SDK > 应用管理}页面获取应用 ID(App ID)。
1268
1536
  * @default -
1269
1537
  */
1538
+ /** {en}
1539
+ * @brief VOD application ID. You can get the application ID (App ID) on the video {@link https://console.byteplus.com/vodpaas/region:vodpaas+ap-singapore-1/sdk/app/?projectName=default VOD Console > VOD SDK > application management} page.
1540
+ * @default -
1541
+ */
1270
1542
  line_app_id: number;
1271
- /**
1543
+ /** {zh}
1272
1544
  * @brief 用于识别单一用户的 ID,可在{@link https://www.volcengine.com/docs/4/75736#qoe-%E6%8C%87%E6%A0%87%E8%AF%B4%E6%98%8E QoE指标}中用于用户维度的筛选,也可以用于{@link https://www.volcengine.com/docs/4/106093 单点追查} 查找单用户的播放日志
1273
1545
  * 用户 ID 对应于单点追查功能的查询条件中的设备 ID 维度。如不设置用户 ID,VePlayer 将根据用户浏览器随机生成一个值,该值会在浏览器端缓存。
1274
1546
  * @notes 强烈建议您使用与业务相关的用户 ID,以便在发生播放错误时通过{@link https://console.volcengine.com/vod/region:vod+cn-north-1/quality_control/SingleTracing/?Tab=play 点播控制台 > 质量平台 > 单点追查}功能排查故障。
1275
1547
  * @default -
1276
1548
  */
1549
+ /** {en}
1550
+ * @brief The ID used to identify a single user. It can be used for user-level filtering in {@link https://docs.byteplus.com/en/docs/byteplus-vod/docs-quality-insight-overview QoE indicators}, and also for {@link https://www.volcengine.com/docs/4/106093 single-point tracing} to find the playback logs of a single user.
1551
+ * The user ID corresponds to the device ID dimension in the query conditions of the single-point tracing function. If no user ID is set, VePlayer will generate a random value according to the user's browser, which will be cached in the browser.
1552
+ * @notes It is strongly recommended to use a user ID related to your business to troubleshoot problems through the {@link https://docs.byteplus.com/en/docs/byteplus-vod/docs-end-point-tracker VOD Console > Quality Platform > Single Tracing} function.
1553
+ * @default -
1554
+ */
1277
1555
  line_user_id: string | number;
1278
1556
  /**
1279
1557
  * @hidden
@@ -1281,154 +1559,273 @@ export interface IVodLogOptsConfig {
1281
1559
  * @default MP4
1282
1560
  */
1283
1561
  vtype?: "MP4" | "HLS" | "DASH" | "FLV";
1284
- /**
1562
+ /** {zh}
1285
1563
  * @brief 业务标签。对应于质量平台上的业务类型维度,其作用是区分业务中的不同场景,以便进行多维度分析。举例来说,假设您的应用中包含短视频和长视频两个场景,则可分别将 `tag` 设为 `short` 和 `long`。这样一来,您就能够在{@link https://www.volcengine.com/docs/4/120175 质量平台}上通过业务标签维度查询或过滤不同场景的数据。
1286
1564
  * @notes 如需自定义配置 tag 值在点播控制台上的展示文案,请联系{@link https://www.volcengine.com/docs/4/108992#%E5%94%AE%E5%90%8E%E6%94%AF%E6%8C%81 技术支持}
1287
1565
  * @default 普通视频
1288
1566
  */
1567
+ /** {en}
1568
+ * @brief Business tag. Corresponds to the business type dimension on the quality platform, which is used to distinguish different scenarios in the business and facilitate multi-dimensional analysis. For example, if your application contains short video and long video scenarios, you can set `tag` to `short` and `long` respectively. This way, you can query or filter data for different scenarios through the business tag dimension on the {@link https://docs.byteplus.com/en/docs/byteplus-vod/docs-end-point-tracker quality platform}.
1569
+ * @notes If you need to customize the display text of `tag` in the VOD Console, please contact {@link https://docs.byteplus.com/en/docs/byteplus-vod/docs-quality-insight-overview technical support}.
1570
+ * @default Normal
1571
+ */
1289
1572
  tag?: string;
1290
- /**
1573
+ /** {zh}
1291
1574
  * @brief 自定义子标签。对应于质量平台上的自定义标签维度,与 `tag` 配合使用,可用于区分同一业务类型下更为细分的音视频类型,比如加密视频、非加密视频、音频等。
1292
1575
  * @default -
1293
1576
  */
1294
1577
  /** {en}
1295
1578
  * @brief Custom sub-tag for quality platform analytics; use with `tag` to distinguish sub-types such as encrypted/non-encrypted video or audio.
1579
+ * @default -
1296
1580
  */
1297
1581
  subtag?: string;
1298
- /**
1582
+ /** {zh}
1299
1583
  * @brief 视频编码类型,取值如下
1300
1584
  * - `h264`:H.264
1301
1585
  * - `h265`:H.265
1302
1586
  * @default unknown
1303
1587
  */
1588
+ /** {en}
1589
+ * @brief Video codec type, values:
1590
+ * - `h264`: H.264
1591
+ * - `h265`: H.265
1592
+ * @default unknown
1593
+ */
1304
1594
  codec_type?: "h264" | "h265";
1305
- /**
1595
+ /** {zh}
1306
1596
  * @brief 是否加密,0:非drm视频,1:drm视频
1307
1597
  * @hidden
1308
1598
  * @default 0
1309
1599
  */
1600
+ /** {en}
1601
+ * @brief Whether the video is encrypted, 0: non-drm video, 1: drm video
1602
+ * @hidden
1603
+ * @default 0
1604
+ */
1310
1605
  drm_type?: 0 | 1;
1311
- /**
1606
+ /** {zh}
1312
1607
  * @hidden
1313
1608
  * @brief 播放内核版本号
1314
1609
  */
1610
+ /** {en}
1611
+ * @brief Player core version number
1612
+ * @hidden
1613
+ * @default -
1614
+ */
1315
1615
  playerCoreVersion?: string;
1316
- /**
1616
+ /** {zh}
1317
1617
  * @hidden
1318
1618
  * @brief 播放器版本号
1319
1619
  */
1620
+ /** {en}
1621
+ * @brief Player version number
1622
+ * @hidden
1623
+ * @default -
1624
+ */
1320
1625
  playerVersion?: string;
1321
- /**
1626
+ /** {zh}
1322
1627
  * @hidden
1323
1628
  * @brief DASH播放的封装类型
1324
1629
  */
1630
+ /** {en}
1631
+ * @brief DASH playback packaging type
1632
+ * @hidden
1633
+ * @default -
1634
+ */
1325
1635
  dynamic_type?: "segment_base" | "segment_template";
1326
- /**
1636
+ /** {zh}
1327
1637
  * @hidden
1328
1638
  * @brief 是否使用bash,0:不使用,1:使用
1329
1639
  * @default 0
1330
1640
  */
1641
+ /** {en}
1642
+ * @brief Whether to use bash, 0: not use, 1: use
1643
+ * @hidden
1644
+ * @default 0
1645
+ */
1331
1646
  enable_bash?: 0 | 1;
1332
- /**
1647
+ /** {zh}
1333
1648
  * @hidden
1334
1649
  * @brief 发送的埋点日志是本地缓存的时候回调
1335
1650
  * @default -
1336
1651
  */
1652
+ /** {en}
1653
+ * @brief Callback when the local cache of the sent log is sent
1654
+ * @hidden
1655
+ * @default -
1656
+ */
1337
1657
  sendLocalCallback?: (event: any, data: any) => void;
1338
- /**
1658
+ /** {zh}
1339
1659
  * @hidden
1340
1660
  * @brief 是否禁用localStorage暂时缓存onPlay逻辑
1341
1661
  * @default false
1342
1662
  */
1663
+ /** {en}
1664
+ * @brief Whether to disable localStorage temporarily cache onPlay logic
1665
+ * @hidden
1666
+ * @default false
1667
+ */
1343
1668
  disableLocalCache?: boolean;
1344
- /**
1669
+ /** {zh}
1345
1670
  * @brief 日志上报渠道,可选值:cn(国内) 、sg(新加坡)
1346
1671
  * @default cn
1672
+ * @hidden
1673
+ */
1674
+ /** {en}
1675
+ * @brief Log reporting channel, optional values: cn(domestic) 、va(overseas) 、sg(Singapore)
1676
+ * @default sg
1677
+ * @hidden
1347
1678
  */
1348
1679
  channel?: "cn" | "va" | "sg";
1349
- /**
1680
+ /** {zh}
1350
1681
  * @brief 日志上报额外配置
1351
1682
  * @note 火山海外区域的用户播放需要配置为`{log_from_region: 'volc-overseas'}`
1683
+ * @hidden
1684
+ */
1685
+ /** {en}
1686
+ * @brief Log reporting additional configuration
1687
+ * @note BytePlus need to configure `{log_from_region: 'byteplus'}`
1688
+ * @hidden
1352
1689
  */
1353
1690
  trackerConfig?: Record<string, string>;
1354
- /**
1691
+ /** {zh}
1355
1692
  * @hidden
1356
1693
  * @brief 是否关闭清晰度切换埋点
1357
1694
  * @default false
1358
1695
  */
1696
+ /** {en}
1697
+ * @brief Whether to close the resolution switching log
1698
+ * @hidden
1699
+ * @default false
1700
+ */
1359
1701
  closeResolutionLog?: boolean;
1360
- /**
1702
+ /** {zh}
1361
1703
  * @hidden
1362
1704
  * @brief 关闭seek相关埋点
1363
1705
  * @default false
1364
1706
  */
1707
+ /** {en}
1708
+ * @brief Whether to close the seek related log
1709
+ * @hidden
1710
+ * @default false
1711
+ */
1365
1712
  closeSeekLog?: boolean;
1366
- /**
1713
+ /** {zh}
1367
1714
  * @hidden
1368
1715
  * @brief 队列超过多少条日志的时候发送
1369
1716
  * @default 5
1370
1717
  */
1718
+ /** {en}
1719
+ * @brief The number of logs when the queue exceeds the threshold
1720
+ * @hidden
1721
+ * @default 5
1722
+ */
1371
1723
  maxQueueCount?: number;
1372
1724
  }
1373
- /**
1725
+ /** {zh}
1374
1726
  * @brief mp4加密日志配置项
1375
1727
  * @list Options
1376
1728
  * @hidden
1377
1729
  */
1378
1730
  export interface IMp4EncryptPlayerConfig {
1379
- /**
1731
+ /** {zh}
1380
1732
  * @hidden
1381
1733
  * @brief 是否加密
1382
1734
  * @default false
1383
1735
  */
1736
+ /** {en}
1737
+ * @brief Whether to encrypt
1738
+ * @hidden
1739
+ * @default false
1740
+ */
1384
1741
  isEncrypt?: boolean;
1385
- /**
1742
+ /** {zh}
1386
1743
  * @hidden
1387
1744
  * @brief 视频vid
1388
1745
  * @default -
1389
1746
  */
1747
+ /** {en}
1748
+ * @brief Video vid
1749
+ * @hidden
1750
+ * @default -
1751
+ */
1390
1752
  vid?: string;
1391
- /**
1753
+ /** {zh}
1392
1754
  * @hidden
1393
1755
  * @brief 视频密钥 id
1394
1756
  * @default -
1395
1757
  */
1758
+ /** {en}
1759
+ * @brief Video kid
1760
+ * @hidden
1761
+ * @default -
1762
+ */
1396
1763
  kid?: string;
1397
- /**
1764
+ /** {zh}
1398
1765
  * @hidden
1399
1766
  * @brief 获取密钥凭证地址
1400
1767
  * @default -
1401
1768
  */
1769
+ /** {en}
1770
+ * @brief Get the certificate address
1771
+ * @hidden
1772
+ * @default -
1773
+ */
1402
1774
  getLicenseUrl?: string;
1403
- /**
1775
+ /** {zh}
1404
1776
  * @hidden
1405
1777
  * @brief 是否使用EME
1406
1778
  * @default false
1407
1779
  */
1780
+ /** {en}
1781
+ * @brief Whether to use EME
1782
+ * @hidden
1783
+ * @default false
1784
+ */
1408
1785
  useEME?: boolean;
1409
- /**
1786
+ /** {zh}
1410
1787
  * @hidden
1411
1788
  * @brief 视频密钥值
1412
1789
  * @default -
1413
1790
  */
1791
+ /** {en}
1792
+ * @brief Video key value
1793
+ * @hidden
1794
+ * @default -
1795
+ */
1414
1796
  keyValue?: string;
1415
- /**
1797
+ /** {zh}
1416
1798
  * @hidden
1417
1799
  * @brief 加密后的视频密钥值
1418
1800
  * @default -
1419
1801
  */
1802
+ /** {en}
1803
+ * @brief Encrypted video key value
1804
+ * @hidden
1805
+ * @default -
1806
+ */
1420
1807
  secretKey?: string;
1421
- /**
1808
+ /** {zh}
1422
1809
  * @hidden
1423
1810
  * @brief 是否携带cookie
1424
1811
  * @default false
1425
1812
  */
1813
+ /** {en}
1814
+ * @brief Whether to carry cookie
1815
+ * @hidden
1816
+ * @default false
1817
+ */
1426
1818
  withCredentials?: boolean;
1427
- /**
1819
+ /** {zh}
1428
1820
  * @hidden
1429
1821
  * @brief drm内容
1430
1822
  * @default -
1431
1823
  */
1824
+ /** {en}
1825
+ * @brief Drm content
1826
+ * @hidden
1827
+ * @default -
1828
+ */
1432
1829
  drm?: {
1433
1830
  clearKeys: {
1434
1831
  [propName: string]: string;
@@ -1451,73 +1848,127 @@ export declare type IDefinition = {
1451
1848
  [propName: string]: any;
1452
1849
  };
1453
1850
  };
1454
- /**
1851
+ /** {zh}
1455
1852
  * @brief 音量配置。
1456
1853
  * @list Options
1457
1854
  * @kind property
1458
1855
  */
1856
+ /** {en}
1857
+ * @brief Volume configuration.
1858
+ * @list Options
1859
+ * @kind property
1860
+ */
1459
1861
  export declare type IVolume = number | {
1460
- /**
1862
+ /** {zh}
1461
1863
  * @brief 插件Dom挂载的位置,默认播放器底部控制栏右侧
1462
1864
  * @default POSITIONS.CONTROLS_RIGHT
1463
1865
  */
1866
+ /** {en}
1867
+ * @brief The position of the plugin dom. The default value is `POSITIONS.CONTROLS_RIGHT`.
1868
+ * @default POSITIONS.CONTROLS_RIGHT
1869
+ */
1464
1870
  position?: POSITIONS;
1465
- /**
1871
+ /** {zh}
1466
1872
  * @brief 插件在挂载的位置的排序权重
1467
1873
  * @default 1
1468
1874
  */
1875
+ /** {en}
1876
+ * @brief The index of the plugin in the position. The default value is `1`.
1877
+ * @default 1
1878
+ */
1469
1879
  index?: number;
1470
- /**
1880
+ /** {zh}
1471
1881
  * @brief 是否禁用插件交互行为,即是否隐藏音量调节按钮
1472
1882
  * @default false
1473
1883
  */
1884
+ /** {en}
1885
+ * @brief Whether to disable the plugin interaction behavior, i.e., whether to hide the volume adjustment button.
1886
+ * @default false
1887
+ */
1474
1888
  disable?: boolean;
1475
- /**
1889
+ /** {zh}
1476
1890
  * @brief 是否在音量调节slider上方显示当前音量数值
1477
1891
  * @default false
1478
1892
  */
1893
+ /** {en}
1894
+ * @brief Whether to show the current volume value on the volume adjustment slider.
1895
+ * @default false
1896
+ */
1479
1897
  showValueLabel?: boolean;
1480
- /**
1898
+ /** {zh}
1481
1899
  * @brief 默认音量大小,取值范围0-1
1482
1900
  * @default 0.6
1483
1901
  */
1902
+ /** {en}
1903
+ * @brief The default volume value. The value range is `[0, 1]`.
1904
+ * @default 0.6
1905
+ */
1484
1906
  default?: number;
1485
- /**
1907
+ /** {zh}
1486
1908
  * @brief 静音恢复的时候最小音量
1487
1909
  * @default 0.2
1488
1910
  */
1911
+ /** {en}
1912
+ * @brief The minimum volume value when unmuting. The value range is `[0, 1]`.
1913
+ * @default 0.2
1914
+ */
1489
1915
  miniVolume?: number;
1490
1916
  };
1491
- /**
1917
+ /** {zh}
1492
1918
  * @brief 进度条标记点配置。
1493
1919
  * @list Options
1494
1920
  * @kind property
1495
1921
  */
1922
+ /** {en}
1923
+ * @brief Progress bar marker point configuration.
1924
+ * @list Options
1925
+ * @kind property
1926
+ */
1496
1927
  export interface IDot {
1497
- /**
1928
+ /** {zh}
1498
1929
  * @brief 进度条标记点
1499
1930
  * @default 1
1500
1931
  */
1932
+ /** {en}
1933
+ * @brief The id of the progress bar marker point.
1934
+ * @default 1
1935
+ */
1501
1936
  id: string | number;
1502
- /**
1937
+ /** {zh}
1503
1938
  * @brief 标记点所在的播放时间
1504
1939
  * @default 0
1505
1940
  */
1941
+ /** {en}
1942
+ * @brief The time of the progress bar marker point.
1943
+ * @default 0
1944
+ */
1506
1945
  time: number;
1507
- /**
1946
+ /** {zh}
1508
1947
  * @brief 进度条自定义文案
1509
1948
  * @default -
1510
1949
  */
1950
+ /** {en}
1951
+ * @brief The text of the progress bar marker point.
1952
+ * @default -
1953
+ */
1511
1954
  text?: string;
1512
- /**
1955
+ /** {zh}
1513
1956
  * @brief 标记点持续的时间,单位秒
1514
1957
  * @default 1
1515
1958
  */
1959
+ /** {en}
1960
+ * @brief The duration of the progress bar marker point.
1961
+ * @default 1
1962
+ */
1516
1963
  duration?: number;
1517
- /**
1964
+ /** {zh}
1518
1965
  * @brief 进度条自定义的CSS Style样式
1519
1966
  * @default -
1520
1967
  */
1968
+ /** {en}
1969
+ * @brief The custom CSS style of the progress bar marker point.
1970
+ * @default -
1971
+ */
1521
1972
  style?: CSSStyleDeclaration;
1522
1973
  }
1523
1974
  /**
@@ -1636,49 +2087,83 @@ export declare type IPlayerOptions = {
1636
2087
  volumeColor?: string;
1637
2088
  };
1638
2089
  };
1639
- /**
2090
+ /** {zh}
1640
2091
  * @brief mobile端交互配置。
1641
2092
  */
2093
+ /** {en}
2094
+ * @brief Mobile interaction configuration.
2095
+ */
1642
2096
  export interface IMobileConfig {
1643
- /**
2097
+ /** {zh}
1644
2098
  * @brief 是否禁用手势,手势包括:
1645
2099
  * - 水平手势滑动快进/快退
1646
2100
  * - 左侧手势滑动调节亮度
1647
2101
  * - 右侧手势滑动调节音量(iOS不可用)
1648
2102
  * @default false
1649
2103
  */
2104
+ /** {en}
2105
+ * @brief Whether to disable gestures. Gesture includes:
2106
+ * - Horizontal gesture to fast forward/rewind
2107
+ * - Left gesture to adjust brightness
2108
+ * - Right gesture to adjust volume (iOS not available)
2109
+ * @default false
2110
+ */
1650
2111
  disableGesture?: boolean;
1651
- /**
2112
+ /** {zh}
1652
2113
  * @brief 是否启用水平手势处理,水平手势快进/快退
1653
2114
  * @default false
1654
2115
  */
2116
+ /** {en}
2117
+ * @brief Whether to enable horizontal gesture processing. Horizontal gesture includes fast forward/rewind.
2118
+ * @default false
2119
+ */
1655
2120
  gestureX?: boolean;
1656
- /**
2121
+ /** {zh}
1657
2122
  * @brief 是否启用垂直手势处理,默认不启用, 垂直手势包括屏幕右侧和屏幕左侧,默认左侧调节亮度,右侧调节音量,左右范围比例通过scopeL和scopeR设置
1658
2123
  * @default false
1659
2124
  */
2125
+ /** {en}
2126
+ * @brief Whether to enable vertical gesture processing. Vertical gesture includes screen right and screen left. Default left to adjust brightness, right to adjust volume. The left and right range ratio is set through scopeL and scopeR.
2127
+ * @default false
2128
+ */
1660
2129
  gestureY?: boolean;
1661
- /**
2130
+ /** {zh}
1662
2131
  * @brief 左侧手势范围比例,取值0-1
1663
2132
  * @default 0.25
1664
2133
  */
2134
+ /** {en}
2135
+ * @brief The left gesture range ratio, the value is 0-1.
2136
+ * @default 0.25
2137
+ */
1665
2138
  scopeL?: number;
1666
- /**
2139
+ /** {zh}
1667
2140
  * @brief 右侧手势范围,取值0-1
1668
2141
  * @default 0.25
1669
2142
  */
2143
+ /** {en}
2144
+ * @brief The right gesture range ratio, the value is 0-1.
2145
+ * @default 0.25
2146
+ */
1670
2147
  scopeR?: number;
1671
- /**
2148
+ /** {zh}
1672
2149
  * @brief 是否启用左侧调暗功能,因为web端无法调用系统的亮度,这个功能实际使用透明蒙层实
1673
2150
  * @default true
1674
2151
  */
2152
+ /** {en}
2153
+ * @brief Whether to enable left dimming function. Because the web cannot call the system brightness, this function is actually implemented using a transparent overlay.
2154
+ * @default true
2155
+ */
1675
2156
  darkness?: boolean;
1676
- /**
1677
- * @brief 播放器可调节的最大暗度,即蒙层最大透明度
2157
+ /** {zh}
2158
+ * @brief 播放器可调节的最大暗度,即蒙层最大透明度。
2159
+ * @default 0.6
2160
+ */
2161
+ /** {en}
2162
+ * @brief The maximum darkness of the player, i.e., the maximum transparency of the transparent layer.
1678
2163
  * @default 0.6
1679
2164
  */
1680
2165
  maxDarkness?: number;
1681
- /**
2166
+ /** {zh}
1682
2167
  * @brief 是否启用上下渐变阴影,即在播放器在激活时上下范围内有阴影
1683
2168
  * - normal 上下阴影
1684
2169
  * - none 无阴影
@@ -1686,90 +2171,165 @@ export interface IMobileConfig {
1686
2171
  * - bottom 仅下阴影
1687
2172
  * @default normal
1688
2173
  */
2174
+ /** {en}
2175
+ * @brief Whether to enable vertical gradient shadow, i.e., there is a shadow in the upper and lower range when the player is activated.
2176
+ * - normal: normal shadow
2177
+ * - none: no shadow
2178
+ * - top: only upper shadow
2179
+ * - bottom: only lower shadow
2180
+ * @default normal
2181
+ */
1689
2182
  gradient?: "normal" | "none" | "top" | "bottom";
1690
- /**
2183
+ /** {zh}
1691
2184
  * @brief 是否在touchMove事件触发时(即手势滑动时)同时更新播放器的currentTime, 在手势移动过程中,不会直接调用播放器的快进快退,在toucheEnd的时候再设置
1692
2185
  * @default false
1693
2186
  */
2187
+ /** {en}
2188
+ * @brief Whether to update the player's currentTime when the touchMove event is triggered (i.e., when the gesture is slid). During the gesture movement, the player's fast forward/rewind is not directly called, and the currentTime is set when the toucheEnd event is triggered.
2189
+ * @default false
2190
+ */
1694
2191
  isTouchingSeek?: boolean;
1695
- /**
1696
- * @brief 手势滑动的最小步伐,单位px,即滑动距离超过多少算作滑动,以减少不必要的滑动手势事件触发
2192
+ /** {zh}
2193
+ * @brief 手势滑动的最小步伐,单位px,即滑动距离超过多少算作滑动,以减少不必要的滑动手势事件触发。
2194
+ * @default 5
2195
+ */
2196
+ /** {en}
2197
+ * @brief The minimum step of the gesture movement, the unit is px, i.e., the sliding distance exceeding which is considered as sliding, to reduce unnecessary sliding gesture event triggers.
1697
2198
  * @default 5
1698
2199
  */
1699
2200
  miniMoveStep?: number;
1700
- /**
2201
+ /** {zh}
1701
2202
  * @brief 长按快进倍速
1702
2203
  * @default 2
1703
2204
  */
2205
+ /** {en}
2206
+ * @brief The long press fast forward speed.
2207
+ * @default 2
2208
+ */
1704
2209
  pressRate?: number;
1705
- /**
1706
- * @brief 是否禁用时间预览雪碧图面板
2210
+ /** {zh}
2211
+ * @brief 是否禁用时间预览雪碧图面板。
1707
2212
  * @notice 前提需要配置进度条预览雪碧图 thumbnail
1708
2213
  * @default true
1709
2214
  */
2215
+ /** {en}
2216
+ * @brief Whether to disable the time preview sprite panel.
2217
+ * @notice The prerequisite is to configure the progress bar preview sprite thumbnail.
2218
+ * @default true
2219
+ */
1710
2220
  disableActive?: boolean;
1711
- /**
2221
+ /** {zh}
1712
2222
  * @brief 是否禁用时间进度条,即拖动时不展示mini进度条
1713
2223
  * @default false
1714
2224
  */
2225
+ /** {en}
2226
+ * @brief Whether to disable the time progress bar, i.e., not to show the mini progress bar when dragging.
2227
+ * @default false
2228
+ */
1715
2229
  disableTimeProgress?: boolean;
1716
- /**
2230
+ /** {zh}
1717
2231
  * @brief 手势拖动的时候是否隐藏控制栏
1718
2232
  * @default true
1719
2233
  */
2234
+ /** {en}
2235
+ * @brief Whether to hide the control bar when dragging.
2236
+ * @default true
2237
+ */
1720
2238
  hideControlsActive?: boolean;
1721
- /**
2239
+ /** {zh}
1722
2240
  * @brief 手势结束时隐藏控制栏
1723
2241
  * @default false
1724
2242
  */
2243
+ /** {en}
2244
+ * @brief Whether to hide the control bar when the gesture ends.
2245
+ * @default false
2246
+ */
1725
2247
  hideControlsEnd?: boolean;
1726
- /**
2248
+ /** {zh}
1727
2249
  * @brief 滑动播放器区域快进/快退时,播放器区域对应的时长,即完整滑过播放器所对应的时长,单位ms
1728
2250
  * @default 360000
1729
2251
  */
2252
+ /** {en}
2253
+ * @brief The duration of the player area when fast forward/rewind is performed, i.e., the duration corresponding to the full passage of the player area, the unit is ms.
2254
+ * @default 360000
2255
+ */
1730
2256
  moveDuration?: number;
1731
- /**
2257
+ /** {zh}
1732
2258
  * @brief 是否关闭双击切换暂停/播放的能力,同closeVideoDblclick
1733
2259
  * @default false
1734
2260
  */
2261
+ /** {en}
2262
+ * @brief Whether to disable the double-click to switch pause/play ability, same as closeVideoDblclick.
2263
+ * @default false
2264
+ */
1735
2265
  closedbClick?: boolean;
1736
- /**
2266
+ /** {zh}
1737
2267
  * @brief 禁用长按倍速调整
1738
2268
  * @default true
1739
2269
  */
2270
+ /** {en}
2271
+ * @brief Whether to disable the long press to adjust the speed.
2272
+ * @default true
2273
+ */
1740
2274
  disablePress?: boolean;
1741
- /**
2275
+ /** {zh}
1742
2276
  * @brief 是否禁用快进/快退的时候按钮提示
1743
2277
  * @default false
1744
2278
  */
2279
+ /** {en}
2280
+ * @brief Whether to disable the fast forward/rewind button prompt.
2281
+ * @default false
2282
+ */
1745
2283
  disableSeekIcon?: boolean;
1746
2284
  }
1747
- /**
2285
+ /** {zh}
1748
2286
  * @brief 播放器中间切换暂停/播放的按钮。
1749
2287
  */
2288
+ /** {en}
2289
+ * @brief The center play/pause button.
2290
+ */
1750
2291
  export interface IStartConfig {
1751
- /**
2292
+ /** {zh}
1752
2293
  * @brief 暂停是否常驻
1753
2294
  * @default true
1754
2295
  */
2296
+ /** {en}
2297
+ * @brief Whether to keep the pause button visible.
2298
+ * @default true
2299
+ */
1755
2300
  isShowPause?: boolean;
1756
- /**
2301
+ /** {zh}
1757
2302
  * @brief 是否播放结束常驻
1758
2303
  * @default false
1759
2304
  */
2305
+ /** {en}
2306
+ * @brief Whether to keep the end button visible.
2307
+ * @default false
2308
+ */
1760
2309
  isShowEnd?: boolean;
1761
- /**
2310
+ /** {zh}
1762
2311
  * @brief 是否禁用点击动画
1763
2312
  * @default pc:true,mobile:false
1764
2313
  */
2314
+ /** {en}
2315
+ * @brief Whether to disable the click animation.
2316
+ * @default pc: true, mobile: false
2317
+ */
1765
2318
  disableAnimate?: boolean;
1766
- /**
2319
+ /** {zh}
1767
2320
  * @brief 按钮的跟随模式
1768
2321
  * - hide:起播之后隐藏
1769
2322
  * - show:常驻一直存在
1770
2323
  * - auto:自动跟随,播放器激活时即player.isActive=true的时候显示,否则隐藏
1771
2324
  * @default hide
1772
2325
  */
2326
+ /** {en}
2327
+ * @brief The following modes are supported:
2328
+ * - hide: hidden after playback starts
2329
+ * - show: always visible
2330
+ * - auto: automatically follows, visible when player.isActive=true
2331
+ * @default hide
2332
+ */
1773
2333
  mode?: "hide" | "show" | "auto";
1774
2334
  }
1775
2335
  /**
@@ -1777,7 +2337,7 @@ export interface IStartConfig {
1777
2337
  * @brief 西瓜插件
1778
2338
  */
1779
2339
  export declare type XGPlugin = typeof Plugin | typeof BasePlugin;
1780
- /**
2340
+ /** {zh}
1781
2341
  * @brief 自动播放配置。
1782
2342
  * @list Options
1783
2343
  * @kind property
@@ -1792,7 +2352,7 @@ export interface IAutoplayPluginConfig {
1792
2352
  * @hidden
1793
2353
  */
1794
2354
  position?: string;
1795
- /**
2355
+ /** {zh}
1796
2356
  * @brief 是否开启降级静音自动播放。开启后,如果当前浏览器环境不支持有声音自动播放,则降级为静音自动播放。
1797
2357
  * @default false
1798
2358
  */
@@ -1801,7 +2361,7 @@ export interface IAutoplayPluginConfig {
1801
2361
  * @default false
1802
2362
  */
1803
2363
  enableDegradeMuteAutoplay?: boolean;
1804
- /**
2364
+ /** {zh}
1805
2365
  * @brief 启用微信jsBridge方式的自动播放
1806
2366
  * @default false
1807
2367
  * @hidden
@@ -1813,7 +2373,7 @@ export interface IAutoplayPluginConfig {
1813
2373
  * @hidden
1814
2374
  */
1815
2375
  enableWxJsBridgeAutoplay?: boolean;
1816
- /**
2376
+ /** {zh}
1817
2377
  * @brief 用户触发自动播放的目标 dom。
1818
2378
  * @default window.document.body
1819
2379
  */
@@ -1863,21 +2423,21 @@ declare class PlayList {
1863
2423
  setStyle(style: any): void;
1864
2424
  destroy(): void;
1865
2425
  }
1866
- /**
2426
+ /** {zh}
1867
2427
  * @brief 播放列表展示面板触发动作类型。
1868
2428
  */
1869
2429
  /** {en}
1870
2430
  * @brief Playlist panel trigger action type.
1871
2431
  */
1872
2432
  export declare const enum TOGGLE_MODES {
1873
- /**
2433
+ /** {zh}
1874
2434
  * @brief 鼠标点击。
1875
2435
  */
1876
2436
  /** {en}
1877
2437
  * @brief Mouse click.
1878
2438
  */
1879
2439
  CLICK = "click",
1880
- /**
2440
+ /** {zh}
1881
2441
  * @brief 鼠标悬浮。
1882
2442
  */
1883
2443
  /** {en}
@@ -1885,20 +2445,26 @@ export declare const enum TOGGLE_MODES {
1885
2445
  */
1886
2446
  HOVER = "hover"
1887
2447
  }
1888
- /**
2448
+ /** {zh}
1889
2449
  * @list Options
1890
2450
  * @brief 播放列表项配置,支持 DirectUrl 和 Vid + playAuthToken 两种播放模式。
1891
2451
  * @notes 列表数据由外部提供,播放器内部不直接获取播放列表数据。
1892
2452
  * @kind property
1893
2453
  */
2454
+ /** {en}
2455
+ * @list Options
2456
+ * @brief Playlist item configuration, supporting DirectUrl and Vid + playAuthToken two playback modes.
2457
+ * @notes The list data is provided by external, and the player does not directly obtain the list data.
2458
+ * @kind property
2459
+ */
1894
2460
  export interface IPlayListItem {
1895
- /**
2461
+ /** {zh}
1896
2462
  * @notes 临时播放 Token 为空时,此参数必传。
1897
2463
  * @default -
1898
2464
  * @listtip `playAuthToken` 为空时,此参数必传。
1899
2465
  * @brief 视频地址。
1900
2466
  */
1901
- /**
2467
+ /** {en}
1902
2468
  * @notes Required when temporary play token is empty.
1903
2469
  * @default -
1904
2470
  * @listtip when `playAuthToken` is empty, this parameter is required.
@@ -1936,7 +2502,7 @@ export interface IPlayListItem {
1936
2502
  * @brief Video cover image URL.
1937
2503
  */
1938
2504
  poster?: string;
1939
- /**
2505
+ /** {zh}
1940
2506
  * @default -
1941
2507
  * @brief 视频标题。
1942
2508
  */
@@ -1945,7 +2511,7 @@ export interface IPlayListItem {
1945
2511
  * @brief Video title.
1946
2512
  */
1947
2513
  title?: string;
1948
- /**
2514
+ /** {zh}
1949
2515
  * @brief 视频时长,单位为秒。
1950
2516
  * @default -
1951
2517
  */
@@ -1978,10 +2544,11 @@ declare enum EPlayMode {
1978
2544
  */
1979
2545
  /** {en}
1980
2546
  * @list Options
2547
+ * @brief Playlist plugin configuration.
1981
2548
  * @kind property
1982
2549
  */
1983
2550
  export interface IPlayListConfig {
1984
- /**
2551
+ /** {zh}
1985
2552
  * @brief 按钮位置。取值如下:
1986
2553
  *
1987
2554
  * - `controlsLeft`: 播控栏左侧
@@ -2007,7 +2574,7 @@ export interface IPlayListConfig {
2007
2574
  * @default controlsLeft
2008
2575
  */
2009
2576
  position?: string;
2010
- /**
2577
+ /** {zh}
2011
2578
  * @brief 按钮在所在区域的次序。默认值为 `2`,表示在播放按钮后。
2012
2579
  * @default 20
2013
2580
  */
@@ -2016,7 +2583,7 @@ export interface IPlayListConfig {
2016
2583
  * @default 20
2017
2584
  */
2018
2585
  index?: number;
2019
- /**
2586
+ /** {zh}
2020
2587
  * @brief 播放列表数据。
2021
2588
  * @default []
2022
2589
  */
@@ -2025,7 +2592,7 @@ export interface IPlayListConfig {
2025
2592
  * @default []
2026
2593
  */
2027
2594
  list: IPlayListItem[];
2028
- /**
2595
+ /** {zh}
2029
2596
  * @brief 循环模式,取值如下:
2030
2597
  *
2031
2598
  * - `order`: 不循环播放,即列表中最后一个视频播放完成后就停止播放。
@@ -2040,7 +2607,7 @@ export interface IPlayListConfig {
2040
2607
  * @default order
2041
2608
  */
2042
2609
  mode?: EPlayMode;
2043
- /**
2610
+ /** {zh}
2044
2611
  * @brief 默认起始的播放次序。
2045
2612
  * @default order
2046
2613
  */
@@ -2049,7 +2616,7 @@ export interface IPlayListConfig {
2049
2616
  * @default order
2050
2617
  */
2051
2618
  defaultIndex?: number;
2052
- /**
2619
+ /** {zh}
2053
2620
  * @brief 列表点击之后是否隐藏。
2054
2621
  * @default true
2055
2622
  */
@@ -2058,7 +2625,7 @@ export interface IPlayListConfig {
2058
2625
  * @default true
2059
2626
  */
2060
2627
  isItemClickHide?: boolean;
2061
- /**
2628
+ /** {zh}
2062
2629
  * @brief 列表行为触发模式。
2063
2630
  * @default click
2064
2631
  */
@@ -2067,7 +2634,7 @@ export interface IPlayListConfig {
2067
2634
  * @default click
2068
2635
  */
2069
2636
  toggleMode?: TOGGLE_MODES;
2070
- /**
2637
+ /** {zh}
2071
2638
  * @brief 是否显示播放列表按钮。
2072
2639
  * @default true
2073
2640
  */
@@ -2156,16 +2723,18 @@ export declare class PlayListPlugin extends Plugin {
2156
2723
  get disable(): boolean;
2157
2724
  render(): string;
2158
2725
  }
2159
- /**
2726
+ /** {zh}
2160
2727
  * @brief 动态水印配置。
2161
2728
  * @list Options
2162
2729
  * @kind property
2163
2730
  */
2164
2731
  /** {en}
2165
2732
  * @brief watermark config
2733
+ * @list Options
2734
+ * @kind property
2166
2735
  */
2167
2736
  export interface IWatermarkConfig {
2168
- /**
2737
+ /** {zh}
2169
2738
  * @brief 是否开启动态水印,取值如下:<br/>
2170
2739
  * - `true`:开启动态水印
2171
2740
  * - `false`:关闭动态水印
@@ -2175,17 +2744,19 @@ export interface IWatermarkConfig {
2175
2744
  * @brief Is dynamic watermark enabled? The value is as follows:<br/>
2176
2745
  * - `true`: Enable dynamic watermark
2177
2746
  * - `false`: Disable dynamic watermark
2747
+ * @default false
2178
2748
  */
2179
2749
  enable: boolean;
2180
- /**
2750
+ /** {zh}
2181
2751
  * @brief 水印文案。
2182
2752
  * @default -
2183
2753
  */
2184
2754
  /** {en}
2755
+ * @brief Watermark content.
2185
2756
  * @default -
2186
2757
  */
2187
2758
  content: string;
2188
- /**
2759
+ /** {zh}
2189
2760
  * @brief 水印展示形式,取值如下:<br/>
2190
2761
  * - `0`:固定位置
2191
2762
  * - `1`:全屏滚动
@@ -2193,18 +2764,23 @@ export interface IWatermarkConfig {
2193
2764
  * @default 1
2194
2765
  */
2195
2766
  /** {en}
2767
+ * @brief Watermark display type. The value is as follows:<br/>
2768
+ * - `0`: Fixed position
2769
+ * - `1`: Full screen scrolling
2770
+ * - `2`: Random flickering
2196
2771
  * @default 1
2197
2772
  */
2198
2773
  displayType?: 0 | 1 | 2;
2199
- /**
2774
+ /** {zh}
2200
2775
  * @brief 水印字体大小。`number`类型时单位为 px,`string` 类型时需要携带单位。
2201
2776
  * @default 12
2202
2777
  */
2203
2778
  /** {en}
2779
+ * @brief Watermark font size. When the type is `number`, the unit is px. When the type is `string`, the unit needs to be included.
2204
2780
  * @default 12
2205
2781
  */
2206
2782
  fontSize?: number | string;
2207
- /**
2783
+ /** {zh}
2208
2784
  * @brief 水印字体颜色。
2209
2785
  * @brief 水印字体颜色。
2210
2786
  */
@@ -2213,15 +2789,16 @@ export interface IWatermarkConfig {
2213
2789
  * @brief Watermark font color.
2214
2790
  */
2215
2791
  fontColor?: string;
2216
- /**
2792
+ /** {zh}
2217
2793
  * @brief 水印不透明度。取值范围:\[0~1\]。
2218
2794
  * @default 0.3
2219
2795
  */
2220
2796
  /** {en}
2797
+ * @brief Watermark opacity. The value is in the range of [0~1].
2221
2798
  * @default 0.3
2222
2799
  */
2223
2800
  opacity?: number;
2224
- /**
2801
+ /** {zh}
2225
2802
  * @brief 水印闪烁速度,取值如下:<br/>
2226
2803
  * - `MODERATE`:适中
2227
2804
  * - `FAST`:较快
@@ -2229,33 +2806,57 @@ export interface IWatermarkConfig {
2229
2806
  * @default MODERATE
2230
2807
  */
2231
2808
  /** {en}
2809
+ * @brief Watermark ticker speed. The value is as follows:<br/>
2810
+ * - `MODERATE`: Moderate
2811
+ * - `FAST`: Fast
2812
+ * - `SLOW`: Slow
2232
2813
  * @default MODERATE
2233
2814
  */
2234
2815
  tickerSpeed?: "SLOW" | "MODERATE" | "FAST";
2235
- /**
2816
+ /** {zh}
2236
2817
  * @brief 水印字体类型
2237
2818
  * @default -
2238
2819
  */
2820
+ /** {en}
2821
+ * @brief Watermark font family.
2822
+ * @default -
2823
+ */
2239
2824
  fontFamily?: string;
2240
- /**
2825
+ /** {zh}
2241
2826
  * @brief 水印相对于播放容器顶部的距离,单位为 px
2242
2827
  * @default 0
2243
2828
  */
2829
+ /** {en}
2830
+ * @brief Watermark top distance. The unit is px.
2831
+ * @default 0
2832
+ */
2244
2833
  top?: number;
2245
- /**
2834
+ /** {zh}
2246
2835
  * @brief 水印相对于播放容器左侧的距离,单位为 px。
2247
2836
  * @default 0
2248
2837
  */
2838
+ /** {en}
2839
+ * @brief Watermark left distance. The unit is px.
2840
+ * @default 0
2841
+ */
2249
2842
  left?: number;
2250
- /**
2843
+ /** {zh}
2251
2844
  * @brief 水印相对于播放容器底部的距离,单位为 px。
2252
2845
  * @default -
2253
2846
  */
2847
+ /** {en}
2848
+ * @brief Watermark bottom distance. The unit is px.
2849
+ * @default -
2850
+ */
2254
2851
  bottom?: number;
2255
- /**
2852
+ /** {zh}
2256
2853
  * @brief 水印相对于播放容器右侧的距离,单位为 px。
2257
2854
  * @default -
2258
2855
  */
2856
+ /** {en}
2857
+ * @brief Watermark right distance. The unit is px.
2858
+ * @default -
2859
+ */
2259
2860
  right?: number;
2260
2861
  }
2261
2862
  export declare class DynamicWatermarkPlugin extends Plugin {
@@ -2828,6 +3429,7 @@ export interface IABCycle {
2828
3429
  */
2829
3430
  /** {en}
2830
3431
  * @list Options
3432
+ * @brief Music playback mode configuration.
2831
3433
  * @kind property
2832
3434
  */
2833
3435
  export interface IMusicConfig {
@@ -5462,7 +6064,7 @@ declare class AuthToken extends SdkPlugin {
5462
6064
  getDrmConfig(videoInfo: IVideoInfo): void;
5463
6065
  init(): void;
5464
6066
  initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
5465
- /**
6067
+ /** {zh}
5466
6068
  * @description 更新playAuthToken
5467
6069
  * @param {IPlayAuthTokenConfig} getVideoByToken token信息
5468
6070
  * @param {boolean} isNewVideo 是否新视频,即是否为切换视频
@@ -6229,21 +6831,35 @@ export declare type PlayerCore = Player & {
6229
6831
  licenseType: LicenseEdition;
6230
6832
  };
6231
6833
  };
6232
- /**
6834
+ /** {zh}
6233
6835
  * @brief 加密混淆信息
6836
+ * @hidden
6837
+ */
6838
+ /** {en}
6839
+ * @brief Encrypted obfuscation information
6840
+ * @hidden
6234
6841
  */
6235
6842
  export interface EncryptInfo {
6236
- /**
6843
+ /** {zh}
6237
6844
  * @breif 会话ID
6238
6845
  */
6846
+ /** {en}
6847
+ * @brief Session ID
6848
+ */
6239
6849
  sessionId: string;
6240
- /**
6850
+ /** {zh}
6241
6851
  * @brief 混淆后的公钥
6242
6852
  */
6853
+ /** {en}
6854
+ * @brief Encrypted public key
6855
+ */
6243
6856
  drmKeK: string;
6244
- /**
6857
+ /** {zh}
6245
6858
  * @breif 唯一身份信息
6246
6859
  */
6860
+ /** {en}
6861
+ * @brief Unique identity information
6862
+ */
6247
6863
  unionInfo: string;
6248
6864
  }
6249
6865
  declare class VePlayer {
@@ -6392,11 +7008,16 @@ declare class VePlayer {
6392
7008
  * @hidden
6393
7009
  */
6394
7010
  static veStrategy: typeof VeStrategy;
6395
- /**
7011
+ /** {zh}
6396
7012
  * @brief SDK 版本
6397
7013
  * @type {*}
6398
7014
  * @memberof VePlayer
6399
7015
  */
7016
+ /** {en}
7017
+ * @brief SDK version
7018
+ * @type {*}
7019
+ * @memberof VePlayer
7020
+ */
6400
7021
  static sdkVersion: string;
6401
7022
  /**
6402
7023
  * @hidden
@@ -6778,10 +7399,14 @@ declare class VePlayer {
6778
7399
  * @private
6779
7400
  */
6780
7401
  private _onMediaExpiredAction;
6781
- /**
7402
+ /** {zh}
6782
7403
  * @brief 更新播放源。您可在视频播放地址过期前调用此方法更新地址及过期时间戳。
6783
7404
  * @param source 播放源配置。详见 [SourceConfig](1248901#sourceconfig)。支持传入视频播放地址 `url`、播放列表 `playList` 或者 `vid` 和 `playAuthToken`,还需包含新地址的过期时间戳 `urlExpireTimestamp`。
6784
7405
  */
7406
+ /** {en}
7407
+ * @brief Update the media source. You can call this method to update the address and expiration timestamp before the video playback address expires.
7408
+ * @param source The media source configuration. See SourceConfig. Supports passing video playback address `url`, playback list `playList`, or `vid` and `playAuthToken`, and also includes the expiration timestamp `urlExpireTimestamp` of the new address.
7409
+ */
6785
7410
  updateMediaSource(source: SourceConfig): Promise<void>;
6786
7411
  /** {zh}
6787
7412
  * @hidden
@@ -7032,6 +7657,8 @@ declare class VePlayer {
7032
7657
  * @notes 每项包含 `id`、`name`、`lang`、`channels`、`default`、`selected` 字段;轨道数量 ≤ 1 时返回空数组。
7033
7658
  */
7034
7659
  /** {en}
7660
+ * @brief Get the audio track list. For HLS, tracks come from hls.js; on iOS native playback, from `HTMLMediaElement.audioTracks`.
7661
+ * @notes Each item includes `id`, `name`, `lang`, `channels`, `default`, and `selected`. Returns an empty array when there is at most one track.
7035
7662
  */
7036
7663
  getAudioTracks(): AudioTrackInfo[];
7037
7664
  /** {zh}
@@ -7039,18 +7666,20 @@ declare class VePlayer {
7039
7666
  * @notes HLS 流通过 hls.js 获取,iOS 原生播放通过 HTMLMediaElement.audioTracks 获取;无激活轨道时返回 null。
7040
7667
  */
7041
7668
  /** {en}
7669
+ * @brief Get the currently active audio track.
7670
+ * @notes For HLS, from hls.js; on iOS native playback, from `HTMLMediaElement.audioTracks`. Returns `null` when no track is active.
7042
7671
  */
7043
7672
  getCurrentAudioTrack(): AudioTrackInfo | null;
7044
7673
  /** {zh}
7045
7674
  * @brief 切换音频轨道。
7046
- * @param id 目标轨道的 id,可通过 `getAudioTracks()` 获取。
7047
- * @param lang 目标轨道的语言代码(BCP-47)。若提供,则 id 与 lang 同时匹配时才执行切换,
7048
- * 可用于 iOS 原生 audioTracks 中存在重复 id 的场景。
7675
+ * @param track 目标音轨对象,可通过 `getAudioTracks()` 获取。
7049
7676
  * @notes 切换完成后会触发 `Events.AUDIO_TRACK_CHANGE` 事件;
7050
7677
  * 同时 PC 端和移动端音频轨道插件的选中状态会自动更新。
7051
7678
  */
7052
7679
  /** {en}
7053
7680
  * @brief Switch audio track.
7681
+ * @param track Target audio track object from `getAudioTracks()`.
7682
+ * @notes Emits `Events.AUDIO_TRACK_CHANGE` when done. PC and mobile audio track plugins update selection automatically.
7054
7683
  */
7055
7684
  switchAudioTrack(track: AudioTrackInfo): void;
7056
7685
  /** {zh}