@byteplus/veplayer 1.18.0-rc.1 → 1.18.0-rc.10

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 (48) hide show
  1. package/index.d.ts +2104 -571
  2. package/index.min.css +1 -1
  3. package/index.min.js +2 -2
  4. package/lite.cjs +2 -0
  5. package/lite.cjs.css +1 -0
  6. package/lite.d.ts +696 -0
  7. package/lite.esm.css +1 -0
  8. package/lite.esm.mjs +2 -0
  9. package/lite.min.css +1 -0
  10. package/lite.min.js +2 -0
  11. package/package.json +25 -1
  12. package/plugin/hlsjs.js +1 -0
  13. package/plugin/modules/DashAbralgo.d.ts +2 -0
  14. package/plugin/modules/DashAbralgo.mjs +2 -0
  15. package/plugin/modules/XGVideo.d.ts +2 -0
  16. package/plugin/modules/XGVideo.mjs +2 -0
  17. package/plugin/modules/danmuMask.d.ts +2 -0
  18. package/plugin/modules/danmuMask.mjs +2 -0
  19. package/plugin/modules/danmujs.d.ts +2 -0
  20. package/plugin/modules/danmujs.mjs +3 -0
  21. package/plugin/modules/dash.d.ts +2 -0
  22. package/plugin/modules/dash.mjs +2 -0
  23. package/plugin/modules/flv.d.ts +2 -0
  24. package/plugin/modules/flv.mjs +2 -0
  25. package/plugin/modules/hls.d.ts +2 -0
  26. package/plugin/modules/hls.mjs +2 -0
  27. package/plugin/modules/hlsEncrypt.d.ts +2 -0
  28. package/plugin/modules/hlsEncrypt.mjs +2 -0
  29. package/plugin/modules/hlsjs.d.ts +2 -0
  30. package/plugin/modules/hlsjs.mjs +2 -0
  31. package/plugin/modules/hlsjsPro.d.ts +2 -0
  32. package/plugin/modules/hlsjsPro.mjs +2 -0
  33. package/plugin/modules/mp4Encrypt.d.ts +2 -0
  34. package/plugin/modules/mp4Encrypt.mjs +2 -0
  35. package/plugin/modules/preloader.d.ts +2 -0
  36. package/plugin/modules/preloader.mjs +2 -0
  37. package/plugin/modules/streamprobe.d.ts +2 -0
  38. package/plugin/modules/streamprobe.mjs +2 -0
  39. package/plugin/modules/vestrategy.d.ts +2 -0
  40. package/plugin/modules/vestrategy.mjs +2 -0
  41. package/plugin/modules/vestrategy_adapt_range.d.ts +2 -0
  42. package/plugin/modules/vestrategy_adapt_range.mjs +2 -0
  43. package/plugin/modules/vestrategy_h265.d.ts +2 -0
  44. package/plugin/modules/vestrategy_h265.mjs +2 -0
  45. package/plugin/modules/vestrategy_preload.d.ts +2 -0
  46. package/plugin/modules/vestrategy_preload.mjs +2 -0
  47. package/plugin/vestrategy.js +1 -1
  48. package/plugin/vestrategy_preload.js +1 -1
package/index.d.ts CHANGED
@@ -805,6 +805,15 @@ export interface ISubTitleItem {
805
805
  * @default -
806
806
  */
807
807
  text?: string;
808
+ /** {zh}
809
+ * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
810
+ * @default -
811
+ */
812
+ /** {en}
813
+ * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
814
+ * @default -
815
+ */
816
+ label?: string | number;
808
817
  /** {zh}
809
818
  * @brief 外挂字幕 URL 地址。
810
819
  * @default -
@@ -834,6 +843,20 @@ export interface ISubTitleItem {
834
843
  */
835
844
  list?: IListItem[];
836
845
  }
846
+ export declare type IAutoSubtitleSourceItem = Record<string, any> | string;
847
+ export declare type IAutoSubtitleFormatterResult = string | number | boolean | null | undefined | {
848
+ label?: string | number;
849
+ text?: string | number;
850
+ show?: boolean;
851
+ visible?: boolean;
852
+ /** 排序权重,值越小越靠前。未指定时保持原始顺序。 */
853
+ order?: number;
854
+ /** 是否为默认选中的字幕。 */
855
+ isDefault?: boolean;
856
+ /** 是否为默认选中的字幕,与 `isDefault` 等价。 */
857
+ default?: boolean;
858
+ };
859
+ export declare type IAutoSubtitleItemFormatter = (item: IAutoSubtitleSourceItem, index: number) => IAutoSubtitleFormatterResult;
837
860
  /** {zh}
838
861
  * @brief 字幕内容项。
839
862
  * @list Options
@@ -882,8 +905,13 @@ export interface IListItem {
882
905
  */
883
906
  [propName: string]: any;
884
907
  }
885
- /**
886
- * @brief 字幕文案配置
908
+ /** {zh}
909
+ * @brief 字幕文案配置。
910
+ * @list Options
911
+ * @kind property
912
+ */
913
+ /** {en}
914
+ * @brief Subtitle text item configuration.
887
915
  * @list Options
888
916
  * @kind property
889
917
  */
@@ -930,7 +958,7 @@ export interface ITextItem {
930
958
  */
931
959
  index?: number;
932
960
  }
933
- /**
961
+ /** {zh}
934
962
  * @brief 清晰度降级配置。
935
963
  * @list Options
936
964
  * @kind property
@@ -941,7 +969,7 @@ export interface ITextItem {
941
969
  * @kind property
942
970
  */
943
971
  export interface IDefinitionDemotePlugin {
944
- /**
972
+ /** {zh}
945
973
  * @brief 是否开启自动降级,取值如下:
946
974
  * - `false`:关闭自动降级。
947
975
  * - `true`:开启自动降级。
@@ -954,7 +982,7 @@ export interface IDefinitionDemotePlugin {
954
982
  * - `true`: automatic downgrade is enabled.
955
983
  */
956
984
  isNeedAutoDemote?: boolean;
957
- /**
985
+ /** {zh}
958
986
  * @brief 清晰度降级顺序。数组中的元素需与 `playList` 中的 `definition` 相对应。
959
987
  * @default []
960
988
  *
@@ -962,49 +990,59 @@ export interface IDefinitionDemotePlugin {
962
990
  * @memberof IDefinitionDemotePlugin
963
991
  */
964
992
  /** {en}
993
+ * @brief The order of definition downgrade. The elements in the array should correspond to the `definition` in the `playList`.
994
+ * @default []
995
+ *
996
+ * @type {string[]}
997
+ * @memberof IDefinitionDemotePlugin
965
998
  */
966
999
  demotePriority: string[];
967
- /**
1000
+ /** {zh}
968
1001
  * @brief 长时间卡顿的时间阈值,单位为毫秒。卡顿时长超过该值,即视为长时间卡顿。发生长时间卡顿时,SDK 会触发 `LONG_WAITING` 事件。
969
1002
  * @default 5000
970
1003
  *
971
1004
  */
972
1005
  /** {en}
1006
+ * @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
1007
  * @default 5000
974
1008
  *
975
1009
  */
976
1010
  longWaitingTime?: number;
977
- /**
1011
+ /** {zh}
978
1012
  * @brief 频繁卡顿的次数阈值。`oftenWaitingTime` 内卡顿次数大于或等于阈值时,SDK 会触发 `OFTEN_WAITING` 事件,提示发生了频繁卡顿。
979
1013
  * @default 3
980
1014
  *
981
1015
  */
982
1016
  /** {en}
1017
+ * @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
1018
  * @default 3
984
1019
  *
985
1020
  */
986
1021
  oftenWaitingCount?: number;
987
- /**
1022
+ /** {zh}
988
1023
  * @brief 频繁卡顿监测的时间范围。`oftenWaitingTime` 内卡顿次数大于或等于 `oftenWaitingCount` 时,SDK 会触发 `OFTEN_WAITING` 事件,提示发生了频繁卡顿。
989
1024
  * @default 5000
990
1025
  */
991
1026
  /** {en}
1027
+ * @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
1028
  * @default 5000
993
1029
  */
994
1030
  oftenWaitingTime?: number;
995
- /**
1031
+ /** {zh}
996
1032
  * @brief 卡顿时是否显示清晰度降级提示 toast。
997
1033
  * @default true
998
1034
  */
999
1035
  /** {en}
1036
+ * @brief Whether to display the definition downgrade toast.
1000
1037
  * @default true
1001
1038
  */
1002
1039
  isNeedShowTips?: boolean;
1003
- /**
1040
+ /** {zh}
1004
1041
  * @brief 清晰度降级提示 toast 的显示时长,单位为毫秒。
1005
1042
  * @default 3000
1006
1043
  */
1007
1044
  /** {en}
1045
+ * @brief The duration of the definition downgrade toast, in milliseconds.
1008
1046
  * @default 3000
1009
1047
  */
1010
1048
  toastShowTime?: number;
@@ -1040,79 +1078,253 @@ export declare class DefinitionDemotePlugin extends Plugin {
1040
1078
  showToast(definition: Stream): void;
1041
1079
  destroy(): void;
1042
1080
  }
1043
- /**
1044
- * 音轨选择选项。
1081
+ /** {zh}
1082
+ * @brief 音轨选择选项。
1045
1083
  * 对应 hls.js `AudioSelectionOption` 的所有字段,所有字段均可选。
1046
- * 用于 `switchAudioTrack()` 参数(配合 `id` 使用)以及 `audioPreference` 配置。
1084
+ * 用于 `switchAudioTrack()` 参数以及 `audioPreference` 配置。
1085
+ * @list Options
1086
+ * @kind property
1087
+ */
1088
+ /** {en}
1089
+ * @brief Audio track selection options.
1090
+ * Corresponding to all fields of hls.js `AudioSelectionOption`, all fields are optional.
1091
+ * Used for `switchAudioTrack()` and `audioPreference` configuration.
1092
+ * @list Options
1093
+ * @kind property
1047
1094
  */
1048
1095
  export interface AudioTrackOption {
1096
+ /** {zh}
1097
+ * @brief 音轨主要语言,BCP-47 格式(如 `zh`、`en`)。对应 `#EXT-X-MEDIA` 的 `LANGUAGE`。
1098
+ */
1099
+ /** {en}
1100
+ * @brief Primary track language in BCP-47 format (e.g. `zh`, `en`). Maps to `#EXT-X-MEDIA` `LANGUAGE`.
1101
+ */
1049
1102
  lang?: string;
1103
+ /** {zh}
1104
+ * @brief 关联语言代码。对应 `#EXT-X-MEDIA` 的 `ASSOC-LANGUAGE`。
1105
+ */
1106
+ /** {en}
1107
+ * @brief Associated language code. Maps to `#EXT-X-MEDIA` `ASSOC-LANGUAGE`.
1108
+ */
1050
1109
  assocLang?: string;
1110
+ /** {zh}
1111
+ * @brief 轨道特征描述字符串。对应 `#EXT-X-MEDIA` 的 `CHARACTERISTICS`(如 `public.accessibility.describes-video`)。
1112
+ */
1113
+ /** {en}
1114
+ * @brief Track characteristics string. Maps to `#EXT-X-MEDIA` `CHARACTERISTICS`.
1115
+ */
1051
1116
  characteristics?: string;
1117
+ /** {zh}
1118
+ * @brief 声道数。对应 `#EXT-X-MEDIA` 的 `CHANNELS`(如 `"2"`)。
1119
+ */
1120
+ /** {en}
1121
+ * @brief Number of audio channels. Maps to `#EXT-X-MEDIA` `CHANNELS` (e.g. `"2"`).
1122
+ */
1052
1123
  channels?: string;
1124
+ /** {zh}
1125
+ * @brief 音轨名称,用于展示或精确匹配(如 `Stereo`)。hls.js 路径下与 `lang` 组合可唯一定位轨道。
1126
+ */
1127
+ /** {en}
1128
+ * @brief Track name for display or precise matching (e.g. `Stereo`). With `lang`, uniquely identifies a track on the hls.js path.
1129
+ */
1053
1130
  name?: string;
1131
+ /** {zh}
1132
+ * @brief 音频编解码器标识(如 `mp4a.40.2`)。
1133
+ */
1134
+ /** {en}
1135
+ * @brief Audio codec identifier (e.g. `mp4a.40.2`).
1136
+ */
1054
1137
  audioCodec?: string;
1138
+ /** {zh}
1139
+ * @brief 音频组 ID。对应 `#EXT-X-MEDIA` 的 `GROUP-ID`。
1140
+ */
1141
+ /** {en}
1142
+ * @brief Audio group ID. Maps to `#EXT-X-MEDIA` `GROUP-ID`.
1143
+ */
1055
1144
  groupId?: string;
1145
+ /** {zh}
1146
+ * @brief 是否为 manifest 中的默认音轨。
1147
+ */
1148
+ /** {en}
1149
+ * @brief Whether this is the default track declared in the manifest.
1150
+ */
1056
1151
  default?: boolean;
1152
+ /** {zh}
1153
+ * @hidden
1154
+ */
1155
+ /** {en}
1156
+ * @hidden
1157
+ */
1057
1158
  [key: string]: unknown;
1058
1159
  }
1160
+ /** {zh}
1161
+ * @detail Api
1162
+ * @brief HLS 音轨对象。在 `AudioTrackOption` 基础上包含列表索引与展示名称。
1163
+ */
1164
+ /** {en}
1165
+ * @detail Api
1166
+ * @brief HLS audio track object. Extends `AudioTrackOption` with list index and display name.
1167
+ */
1059
1168
  export interface AudioTrack extends AudioTrackOption {
1169
+ /** {zh}
1170
+ * @brief 轨道在 `audioTracks` 列表中的索引(hls.js 与原生路径均为 number)。
1171
+ */
1172
+ /** {en}
1173
+ * @brief Track index in the `audioTracks` list (number on both hls.js and native paths).
1174
+ */
1060
1175
  id: number;
1176
+ /** {zh}
1177
+ * @brief 展示名称(由 `lang` / `name` 等字段生成或来自 manifest)。
1178
+ */
1179
+ /** {en}
1180
+ * @brief Display name (derived from `lang` / `name` or from the manifest).
1181
+ */
1061
1182
  name: string;
1183
+ /** {zh}
1184
+ * @brief 是否为 manifest 默认音轨。
1185
+ */
1186
+ /** {en}
1187
+ * @brief Whether this is the default track in the manifest.
1188
+ */
1062
1189
  default: boolean;
1063
1190
  }
1064
- /**
1065
- * `getAudioTracks()` / `getCurrentAudioTrack()` 的返回项类型。
1066
- * `switchAudioTrack()` 参数类型的子类型,可直接传入。
1191
+ /** {zh}
1192
+ * @detail Api
1193
+ * @brief `getAudioTracks()` / `getCurrentAudioTrack()` 的返回项类型,可直接传入 `switchAudioTrack()`。
1194
+ */
1195
+ /** {en}
1196
+ * @detail Api
1197
+ * @brief Return type of `getAudioTracks()` / `getCurrentAudioTrack()`; can be passed directly to `switchAudioTrack()`.
1067
1198
  */
1068
1199
  export interface AudioTrackInfo extends AudioTrack {
1069
- /** 是否为当前激活轨道。`getCurrentAudioTrack()` 返回时始终为 `true`。 */
1200
+ /** {zh}
1201
+ * @brief 是否为当前激活轨道。`getCurrentAudioTrack()` 返回时始终为 `true`。
1202
+ */
1203
+ /** {en}
1204
+ * @brief Whether this is the currently active track. Always `true` when returned by `getCurrentAudioTrack()`.
1205
+ */
1070
1206
  selected: boolean;
1071
1207
  }
1208
+ /** {zh}
1209
+ * @brief PC 端音轨切换插件配置。
1210
+ * @list Options
1211
+ * @kind property
1212
+ */
1213
+ /** {en}
1214
+ * @brief PC audio track selector plugin configuration.
1215
+ * @list Options
1216
+ * @kind property
1217
+ */
1072
1218
  export interface IAudioTrackConfig {
1073
- /** 控件在控制栏中的排列顺序,数值越小越靠左。@default 5 */
1219
+ /** {zh}
1220
+ * @brief 控件在控制栏中的排列顺序,数值越小越靠左。
1221
+ * @default 70
1222
+ */
1223
+ /** {en}
1224
+ * @brief Sort weight in the control bar; smaller values appear further left.
1225
+ * @default 70
1226
+ */
1074
1227
  index?: number;
1075
- /** 是否显示图标按钮。@default true */
1228
+ /** {zh}
1229
+ * @brief 是否显示音轨切换图标按钮。
1230
+ * @default true
1231
+ */
1232
+ /** {en}
1233
+ * @brief Whether to show the audio track switcher icon.
1234
+ * @default true
1235
+ */
1076
1236
  isShowIcon?: boolean;
1077
- /** 竖屏时是否隐藏控件。@default false */
1237
+ /** {zh}
1238
+ * @brief 竖屏时是否隐藏音轨控件。
1239
+ * @default false
1240
+ */
1241
+ /** {en}
1242
+ * @brief Whether to hide the audio track control in portrait orientation.
1243
+ * @default false
1244
+ */
1078
1245
  hidePortrait?: boolean;
1079
- /** 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。@default true */
1246
+ /** {zh}
1247
+ * @brief 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。
1248
+ * @default true
1249
+ */
1250
+ /** {en}
1251
+ * @brief Whether to append the raw track name in parentheses after the language label, e.g. `Japanese (Stereo AudioTrack1)`.
1252
+ * @default true
1253
+ */
1080
1254
  showNameSuffix?: boolean;
1081
1255
  }
1256
+ /** {zh}
1257
+ * @brief 移动端音轨切换插件配置。
1258
+ * @list Options
1259
+ * @kind property
1260
+ */
1261
+ /** {en}
1262
+ * @brief Mobile audio track selector plugin configuration.
1263
+ * @list Options
1264
+ * @kind property
1265
+ */
1082
1266
  export interface IAudioTrackMobileConfig {
1083
- /** 控件在控制栏中的排列顺序,数值越小越靠左。@default 2.6 */
1267
+ /** {zh}
1268
+ * @brief 控件在控制栏中的排列顺序,数值越小越靠左。
1269
+ * @default 2.6
1270
+ */
1271
+ /** {en}
1272
+ * @brief Sort weight in the control bar; smaller values appear further left.
1273
+ * @default 2.6
1274
+ */
1084
1275
  index?: number;
1085
- /** 是否显示图标按钮。@default true */
1276
+ /** {zh}
1277
+ * @brief 是否显示音轨切换图标按钮。
1278
+ * @default true
1279
+ */
1280
+ /** {en}
1281
+ * @brief Whether to show the audio track switcher icon.
1282
+ * @default true
1283
+ */
1086
1284
  isShowIcon?: boolean;
1087
- /** 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。@default true */
1285
+ /** {zh}
1286
+ * @brief 音轨列表中是否在语言名称后显示括号内的原始轨道名,如 `日本語 (Stereo AudioTrack1)`。
1287
+ * @default true
1288
+ */
1289
+ /** {en}
1290
+ * @brief Whether to append the raw track name in parentheses after the language label, e.g. `Japanese (Stereo AudioTrack1)`.
1291
+ * @default true
1292
+ */
1088
1293
  showNameSuffix?: boolean;
1089
1294
  }
1090
- /**
1295
+ /** {zh}
1091
1296
  * @brief DASH 播放配置。
1092
1297
  * @list Options
1093
1298
  * @kind property
1094
1299
  */
1095
1300
  /** {en}
1301
+ * @brief DASH playback configuration.
1096
1302
  * @list Options
1097
1303
  * @kind property
1098
1304
  */
1099
1305
  export interface IDashPluginConfig {
1100
- /**
1306
+ /** {zh}
1101
1307
  * @brief 视频 ID。
1102
1308
  * @default -
1103
1309
  * @notes 播放加密视频时必选
1104
1310
  */
1105
1311
  /** {en}
1312
+ * @brief Video ID.
1106
1313
  * @default -
1314
+ * @notes When playing encrypted videos, it is required.
1107
1315
  */
1108
1316
  vid?: string;
1109
- /**
1317
+ /** {zh}
1110
1318
  * @hidden
1111
1319
  * @brief 播放类型
1112
1320
  * @default TOP
1113
1321
  */
1322
+ /** {en}
1323
+ * @brief Playback type.
1324
+ * @default TOP
1325
+ */
1114
1326
  playInfoType: "TOP";
1115
- /**
1327
+ /** {zh}
1116
1328
  * @brief 清晰度映射文案。
1117
1329
  * @default -
1118
1330
  * @example
@@ -1127,6 +1339,16 @@ export interface IDashPluginConfig {
1127
1339
  */
1128
1340
  /** {en}
1129
1341
  * @brief Definition label mapping.
1342
+ * @default -
1343
+ * @example
1344
+ * ``` javascript
1345
+ * {
1346
+ * 360p: "SD 360p",
1347
+ * 480p: "HD 480p",
1348
+ * 720p: "FHD 720p",
1349
+ * 1080p: "UHD 1080p"
1350
+ * }
1351
+ * ```
1130
1352
  */
1131
1353
  definitionText: Record<string, string>;
1132
1354
  /**
@@ -1135,91 +1357,142 @@ export interface IDashPluginConfig {
1135
1357
  */
1136
1358
  /** {en}
1137
1359
  * @brief Default definition.
1360
+ * @default The first definition in the list
1138
1361
  */
1139
1362
  defaultDefinition?: string;
1140
- /**
1363
+ /** {zh}
1141
1364
  * @hidden
1142
1365
  * 获取证书地址
1143
1366
  * 默认:`//i.snssdk.com/video/drm/v1/play_licenses`
1144
1367
  * 播放加密视频时必选
1145
1368
  */
1369
+ /** {en}
1370
+ * @brief Get the certificate address.
1371
+ * @default `//i.snssdk.com/video/drm/v1/play_licenses`
1372
+ * @notes When playing encrypted videos, it is required.
1373
+ */
1146
1374
  getLicenseUrl?: string;
1147
- /**
1375
+ /** {zh}
1148
1376
  * @hidden
1149
1377
  * dash播放信息,由`Service.url`服务接口获取
1150
1378
  * 默认:无
1151
1379
  * 必选
1152
1380
  */
1381
+ /** {en}
1382
+ * @hidden
1383
+ * @brief Dash playback information, obtained from the `Service.url` service interface.
1384
+ * @default -
1385
+ * @notes Required.
1386
+ */
1153
1387
  dashOpts?: {
1154
1388
  Data: any;
1155
1389
  };
1156
- /**
1390
+ /** {zh}
1157
1391
  * @brief 兜底的mp4播放列表,由`Service.url`服务接口获取
1158
1392
  * @default -
1159
1393
  * @hidden
1160
1394
  */
1395
+ /** {en}
1396
+ * @brief Fallback mp4 playback list, obtained from the `Service.url` service interface.
1397
+ * @default -
1398
+ * @hidden
1399
+ */
1161
1400
  mp4Opts: {
1162
1401
  mp4List: mp4OptsItem[];
1163
1402
  };
1164
- /**
1165
- * 预加载时间,单位ms
1403
+ /** {zh}
1404
+ * @brief 预加载时间,单位ms
1166
1405
  * @default 50
1167
- * @brief 预加载时间,单位为毫秒。
1168
1406
  */
1169
1407
  /** {en}
1170
1408
  * @brief Preload time in milliseconds.
1409
+ * @default 50
1171
1410
  */
1172
1411
  preloadTime?: number;
1173
- /**
1412
+ /** {zh}
1174
1413
  * @hidden
1175
1414
  * 自适应配置项
1176
1415
  * 默认:undefined
1177
1416
  * 非必选
1178
1417
  */
1418
+ /** {en}
1419
+ * @brief Adaptive configuration item.
1420
+ * @default undefined
1421
+ * @hidden
1422
+ */
1179
1423
  autoBitrateOpts?: any;
1180
- /**
1424
+ /** {zh}
1181
1425
  * @hidden
1182
1426
  * 备用地址降级,默认情况下,当dash播放出问题后,会降级为mp4播放;
1183
1427
  * 设置改参数后,会优先使用备用地址进行dash的降级播放,再次出错时,会降级为mp4播放
1184
1428
  * 默认:false
1185
1429
  * 非必选
1186
1430
  */
1431
+ /** {en}
1432
+ * @brief Fallback address degradation. By default, when dash playback fails, it will be downgraded to mp4 playback.
1433
+ * @default false
1434
+ * @hidden
1435
+ */
1187
1436
  useBackUrl?: boolean;
1188
- /**
1437
+ /** {zh}
1189
1438
  * @hidden
1190
1439
  * 优化首帧
1191
1440
  * 是针对域名,将range参数放在url后面,避免OPTIONS请求,从而优化首帧
1192
1441
  * 默认:无
1193
1442
  * 非必选
1194
1443
  */
1444
+ /** {en}
1445
+ * @brief Optimize the first frame.
1446
+ * @default undefined
1447
+ * @hidden
1448
+ */
1195
1449
  url_range_domains?: string[];
1196
1450
  }
1197
- /**
1451
+ /** {zh}
1198
1452
  * @brief dash播放的mp4兜底播放列表配置
1199
1453
  * @list Options
1454
+ * @kind property
1455
+ * @hidden
1456
+ */
1457
+ /** {en}
1458
+ * @brief Fallback mp4 playback list configuration for dash playback.
1459
+ * @list Options
1460
+ * @kind property
1200
1461
  * @hidden
1201
1462
  */
1202
1463
  export interface mp4OptsItem {
1203
- /**
1464
+ /** {zh}
1204
1465
  * 清晰度
1205
1466
  * 默认: 无
1206
1467
  * 必传
1207
1468
  */
1469
+ /** {en}
1470
+ * @brief Definition for fallback mp4 playback.
1471
+ * @default -
1472
+ * @notes Required.
1473
+ */
1208
1474
  definition: string;
1209
- /**
1210
- * mp4地址
1211
- * 默认:
1212
- * 必传
1475
+ /** {zh}
1476
+ * @briefmp4地址
1477
+ * @default -
1478
+ * @notes Required.
1479
+ */
1480
+ /** {en}
1481
+ * @brief URL for fallback mp4 playback.
1482
+ * @default -
1483
+ * @notes Required.
1213
1484
  */
1214
1485
  url: string;
1215
1486
  }
1216
- /**
1487
+ /** {zh}
1217
1488
  * @brief HLS 加密播放配置。
1218
1489
  * @list Options
1219
1490
  * @kind property
1220
1491
  */
1221
1492
  /** {en}
1222
1493
  * @brief HLS encrypted playback configuration.
1494
+ * @list Options
1495
+ * @kind property
1223
1496
  */
1224
1497
  export interface IEncryptHlsPluginConfig {
1225
1498
  /** {zh}
@@ -1231,49 +1504,77 @@ export interface IEncryptHlsPluginConfig {
1231
1504
  * @default https://vod.byteplusapi.com
1232
1505
  */
1233
1506
  playDomain?: string;
1234
- /**
1507
+ /** {zh}
1235
1508
  * @hidden
1236
1509
  * @brief 请求类型,固定值 'TOP'
1237
1510
  * @default TOP
1238
1511
  */
1512
+ /** {en}
1513
+ * @brief Request type, fixed value 'TOP'
1514
+ * @default TOP
1515
+ * @hidden
1516
+ */
1239
1517
  getKeyType?: string;
1240
- /**
1518
+ /** {zh}
1241
1519
  * @hidden
1242
1520
  * @brief 密钥请求域名
1243
1521
  * @default https://vod.volcengineapi.com
1244
1522
  */
1523
+ /** {en}
1524
+ * @brief Request domain name for key request
1525
+ * @default https://vod.byteplusapi.com
1526
+ */
1245
1527
  keyDomain?: string;
1246
- /**
1528
+ /** {zh}
1247
1529
  * @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
1530
  * @default -
1249
1531
  */
1532
+ /** {en}
1533
+ * @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}
1534
+ * @default -
1535
+ */
1250
1536
  playAuthToken?: string;
1251
- /**
1537
+ /** {zh}
1252
1538
  * @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
1539
  * @default -
1254
1540
  */
1541
+ /** {en}
1542
+ * @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}
1543
+ */
1255
1544
  keyToken: string;
1256
1545
  }
1257
- /**
1546
+ /** {zh}
1258
1547
  * @brief 质量日志上报配置。
1259
1548
  * @list Options
1260
1549
  * @kind property
1261
1550
  */
1262
1551
  /** {en}
1263
1552
  * @brief Quality log configuration.
1553
+ * @list Options
1554
+ * @kind property
1264
1555
  */
1265
1556
  export interface IVodLogOptsConfig {
1266
- /**
1557
+ /** {zh}
1267
1558
  * @brief 视频点播应用 ID。您可在视频{@link https://console.volcengine.com/vod/region:vod+cn-north-1/sdk/app/ 点播控制台 > 点播SDK > 应用管理}页面获取应用 ID(App ID)。
1268
1559
  * @default -
1269
1560
  */
1561
+ /** {en}
1562
+ * @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.
1563
+ * @default -
1564
+ */
1270
1565
  line_app_id: number;
1271
- /**
1566
+ /** {zh}
1272
1567
  * @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
1568
  * 用户 ID 对应于单点追查功能的查询条件中的设备 ID 维度。如不设置用户 ID,VePlayer 将根据用户浏览器随机生成一个值,该值会在浏览器端缓存。
1274
1569
  * @notes 强烈建议您使用与业务相关的用户 ID,以便在发生播放错误时通过{@link https://console.volcengine.com/vod/region:vod+cn-north-1/quality_control/SingleTracing/?Tab=play 点播控制台 > 质量平台 > 单点追查}功能排查故障。
1275
1570
  * @default -
1276
1571
  */
1572
+ /** {en}
1573
+ * @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.
1574
+ * 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.
1575
+ * @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.
1576
+ * @default -
1577
+ */
1277
1578
  line_user_id: string | number;
1278
1579
  /**
1279
1580
  * @hidden
@@ -1281,154 +1582,273 @@ export interface IVodLogOptsConfig {
1281
1582
  * @default MP4
1282
1583
  */
1283
1584
  vtype?: "MP4" | "HLS" | "DASH" | "FLV";
1284
- /**
1585
+ /** {zh}
1285
1586
  * @brief 业务标签。对应于质量平台上的业务类型维度,其作用是区分业务中的不同场景,以便进行多维度分析。举例来说,假设您的应用中包含短视频和长视频两个场景,则可分别将 `tag` 设为 `short` 和 `long`。这样一来,您就能够在{@link https://www.volcengine.com/docs/4/120175 质量平台}上通过业务标签维度查询或过滤不同场景的数据。
1286
1587
  * @notes 如需自定义配置 tag 值在点播控制台上的展示文案,请联系{@link https://www.volcengine.com/docs/4/108992#%E5%94%AE%E5%90%8E%E6%94%AF%E6%8C%81 技术支持}
1287
1588
  * @default 普通视频
1288
1589
  */
1590
+ /** {en}
1591
+ * @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}.
1592
+ * @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}.
1593
+ * @default Normal
1594
+ */
1289
1595
  tag?: string;
1290
- /**
1596
+ /** {zh}
1291
1597
  * @brief 自定义子标签。对应于质量平台上的自定义标签维度,与 `tag` 配合使用,可用于区分同一业务类型下更为细分的音视频类型,比如加密视频、非加密视频、音频等。
1292
1598
  * @default -
1293
1599
  */
1294
1600
  /** {en}
1295
1601
  * @brief Custom sub-tag for quality platform analytics; use with `tag` to distinguish sub-types such as encrypted/non-encrypted video or audio.
1602
+ * @default -
1296
1603
  */
1297
1604
  subtag?: string;
1298
- /**
1605
+ /** {zh}
1299
1606
  * @brief 视频编码类型,取值如下
1300
1607
  * - `h264`:H.264
1301
1608
  * - `h265`:H.265
1302
1609
  * @default unknown
1303
1610
  */
1611
+ /** {en}
1612
+ * @brief Video codec type, values:
1613
+ * - `h264`: H.264
1614
+ * - `h265`: H.265
1615
+ * @default unknown
1616
+ */
1304
1617
  codec_type?: "h264" | "h265";
1305
- /**
1618
+ /** {zh}
1306
1619
  * @brief 是否加密,0:非drm视频,1:drm视频
1307
1620
  * @hidden
1308
1621
  * @default 0
1309
1622
  */
1623
+ /** {en}
1624
+ * @brief Whether the video is encrypted, 0: non-drm video, 1: drm video
1625
+ * @hidden
1626
+ * @default 0
1627
+ */
1310
1628
  drm_type?: 0 | 1;
1311
- /**
1629
+ /** {zh}
1312
1630
  * @hidden
1313
1631
  * @brief 播放内核版本号
1314
1632
  */
1633
+ /** {en}
1634
+ * @brief Player core version number
1635
+ * @hidden
1636
+ * @default -
1637
+ */
1315
1638
  playerCoreVersion?: string;
1316
- /**
1639
+ /** {zh}
1317
1640
  * @hidden
1318
1641
  * @brief 播放器版本号
1319
1642
  */
1643
+ /** {en}
1644
+ * @brief Player version number
1645
+ * @hidden
1646
+ * @default -
1647
+ */
1320
1648
  playerVersion?: string;
1321
- /**
1649
+ /** {zh}
1322
1650
  * @hidden
1323
1651
  * @brief DASH播放的封装类型
1324
1652
  */
1653
+ /** {en}
1654
+ * @brief DASH playback packaging type
1655
+ * @hidden
1656
+ * @default -
1657
+ */
1325
1658
  dynamic_type?: "segment_base" | "segment_template";
1326
- /**
1659
+ /** {zh}
1327
1660
  * @hidden
1328
1661
  * @brief 是否使用bash,0:不使用,1:使用
1329
1662
  * @default 0
1330
1663
  */
1664
+ /** {en}
1665
+ * @brief Whether to use bash, 0: not use, 1: use
1666
+ * @hidden
1667
+ * @default 0
1668
+ */
1331
1669
  enable_bash?: 0 | 1;
1332
- /**
1670
+ /** {zh}
1333
1671
  * @hidden
1334
1672
  * @brief 发送的埋点日志是本地缓存的时候回调
1335
1673
  * @default -
1336
1674
  */
1675
+ /** {en}
1676
+ * @brief Callback when the local cache of the sent log is sent
1677
+ * @hidden
1678
+ * @default -
1679
+ */
1337
1680
  sendLocalCallback?: (event: any, data: any) => void;
1338
- /**
1681
+ /** {zh}
1339
1682
  * @hidden
1340
1683
  * @brief 是否禁用localStorage暂时缓存onPlay逻辑
1341
1684
  * @default false
1342
1685
  */
1686
+ /** {en}
1687
+ * @brief Whether to disable localStorage temporarily cache onPlay logic
1688
+ * @hidden
1689
+ * @default false
1690
+ */
1343
1691
  disableLocalCache?: boolean;
1344
- /**
1692
+ /** {zh}
1345
1693
  * @brief 日志上报渠道,可选值:cn(国内) 、sg(新加坡)
1346
1694
  * @default cn
1695
+ * @hidden
1696
+ */
1697
+ /** {en}
1698
+ * @brief Log reporting channel, optional values: cn(domestic) 、va(overseas) 、sg(Singapore)
1699
+ * @default sg
1700
+ * @hidden
1347
1701
  */
1348
1702
  channel?: "cn" | "va" | "sg";
1349
- /**
1703
+ /** {zh}
1350
1704
  * @brief 日志上报额外配置
1351
1705
  * @note 火山海外区域的用户播放需要配置为`{log_from_region: 'volc-overseas'}`
1706
+ * @hidden
1707
+ */
1708
+ /** {en}
1709
+ * @brief Log reporting additional configuration
1710
+ * @note BytePlus need to configure `{log_from_region: 'byteplus'}`
1711
+ * @hidden
1352
1712
  */
1353
1713
  trackerConfig?: Record<string, string>;
1354
- /**
1714
+ /** {zh}
1355
1715
  * @hidden
1356
1716
  * @brief 是否关闭清晰度切换埋点
1357
1717
  * @default false
1358
1718
  */
1719
+ /** {en}
1720
+ * @brief Whether to close the resolution switching log
1721
+ * @hidden
1722
+ * @default false
1723
+ */
1359
1724
  closeResolutionLog?: boolean;
1360
- /**
1725
+ /** {zh}
1361
1726
  * @hidden
1362
1727
  * @brief 关闭seek相关埋点
1363
1728
  * @default false
1364
1729
  */
1730
+ /** {en}
1731
+ * @brief Whether to close the seek related log
1732
+ * @hidden
1733
+ * @default false
1734
+ */
1365
1735
  closeSeekLog?: boolean;
1366
- /**
1736
+ /** {zh}
1367
1737
  * @hidden
1368
1738
  * @brief 队列超过多少条日志的时候发送
1369
1739
  * @default 5
1370
1740
  */
1741
+ /** {en}
1742
+ * @brief The number of logs when the queue exceeds the threshold
1743
+ * @hidden
1744
+ * @default 5
1745
+ */
1371
1746
  maxQueueCount?: number;
1372
1747
  }
1373
- /**
1748
+ /** {zh}
1374
1749
  * @brief mp4加密日志配置项
1375
1750
  * @list Options
1376
1751
  * @hidden
1377
1752
  */
1378
1753
  export interface IMp4EncryptPlayerConfig {
1379
- /**
1754
+ /** {zh}
1380
1755
  * @hidden
1381
1756
  * @brief 是否加密
1382
1757
  * @default false
1383
1758
  */
1759
+ /** {en}
1760
+ * @brief Whether to encrypt
1761
+ * @hidden
1762
+ * @default false
1763
+ */
1384
1764
  isEncrypt?: boolean;
1385
- /**
1765
+ /** {zh}
1386
1766
  * @hidden
1387
1767
  * @brief 视频vid
1388
1768
  * @default -
1389
1769
  */
1770
+ /** {en}
1771
+ * @brief Video vid
1772
+ * @hidden
1773
+ * @default -
1774
+ */
1390
1775
  vid?: string;
1391
- /**
1776
+ /** {zh}
1392
1777
  * @hidden
1393
1778
  * @brief 视频密钥 id
1394
1779
  * @default -
1395
1780
  */
1781
+ /** {en}
1782
+ * @brief Video kid
1783
+ * @hidden
1784
+ * @default -
1785
+ */
1396
1786
  kid?: string;
1397
- /**
1787
+ /** {zh}
1398
1788
  * @hidden
1399
1789
  * @brief 获取密钥凭证地址
1400
1790
  * @default -
1401
1791
  */
1792
+ /** {en}
1793
+ * @brief Get the certificate address
1794
+ * @hidden
1795
+ * @default -
1796
+ */
1402
1797
  getLicenseUrl?: string;
1403
- /**
1798
+ /** {zh}
1404
1799
  * @hidden
1405
1800
  * @brief 是否使用EME
1406
1801
  * @default false
1407
1802
  */
1803
+ /** {en}
1804
+ * @brief Whether to use EME
1805
+ * @hidden
1806
+ * @default false
1807
+ */
1408
1808
  useEME?: boolean;
1409
- /**
1809
+ /** {zh}
1410
1810
  * @hidden
1411
1811
  * @brief 视频密钥值
1412
1812
  * @default -
1413
1813
  */
1814
+ /** {en}
1815
+ * @brief Video key value
1816
+ * @hidden
1817
+ * @default -
1818
+ */
1414
1819
  keyValue?: string;
1415
- /**
1820
+ /** {zh}
1416
1821
  * @hidden
1417
1822
  * @brief 加密后的视频密钥值
1418
1823
  * @default -
1419
1824
  */
1825
+ /** {en}
1826
+ * @brief Encrypted video key value
1827
+ * @hidden
1828
+ * @default -
1829
+ */
1420
1830
  secretKey?: string;
1421
- /**
1831
+ /** {zh}
1422
1832
  * @hidden
1423
1833
  * @brief 是否携带cookie
1424
1834
  * @default false
1425
1835
  */
1836
+ /** {en}
1837
+ * @brief Whether to carry cookie
1838
+ * @hidden
1839
+ * @default false
1840
+ */
1426
1841
  withCredentials?: boolean;
1427
- /**
1842
+ /** {zh}
1428
1843
  * @hidden
1429
1844
  * @brief drm内容
1430
1845
  * @default -
1431
1846
  */
1847
+ /** {en}
1848
+ * @brief Drm content
1849
+ * @hidden
1850
+ * @default -
1851
+ */
1432
1852
  drm?: {
1433
1853
  clearKeys: {
1434
1854
  [propName: string]: string;
@@ -1451,73 +1871,127 @@ export declare type IDefinition = {
1451
1871
  [propName: string]: any;
1452
1872
  };
1453
1873
  };
1454
- /**
1874
+ /** {zh}
1455
1875
  * @brief 音量配置。
1456
1876
  * @list Options
1457
1877
  * @kind property
1458
1878
  */
1879
+ /** {en}
1880
+ * @brief Volume configuration.
1881
+ * @list Options
1882
+ * @kind property
1883
+ */
1459
1884
  export declare type IVolume = number | {
1460
- /**
1885
+ /** {zh}
1461
1886
  * @brief 插件Dom挂载的位置,默认播放器底部控制栏右侧
1462
1887
  * @default POSITIONS.CONTROLS_RIGHT
1463
1888
  */
1889
+ /** {en}
1890
+ * @brief The position of the plugin dom. The default value is `POSITIONS.CONTROLS_RIGHT`.
1891
+ * @default POSITIONS.CONTROLS_RIGHT
1892
+ */
1464
1893
  position?: POSITIONS;
1465
- /**
1894
+ /** {zh}
1466
1895
  * @brief 插件在挂载的位置的排序权重
1467
1896
  * @default 1
1468
1897
  */
1898
+ /** {en}
1899
+ * @brief The index of the plugin in the position. The default value is `1`.
1900
+ * @default 1
1901
+ */
1469
1902
  index?: number;
1470
- /**
1903
+ /** {zh}
1471
1904
  * @brief 是否禁用插件交互行为,即是否隐藏音量调节按钮
1472
1905
  * @default false
1473
1906
  */
1907
+ /** {en}
1908
+ * @brief Whether to disable the plugin interaction behavior, i.e., whether to hide the volume adjustment button.
1909
+ * @default false
1910
+ */
1474
1911
  disable?: boolean;
1475
- /**
1912
+ /** {zh}
1476
1913
  * @brief 是否在音量调节slider上方显示当前音量数值
1477
1914
  * @default false
1478
1915
  */
1916
+ /** {en}
1917
+ * @brief Whether to show the current volume value on the volume adjustment slider.
1918
+ * @default false
1919
+ */
1479
1920
  showValueLabel?: boolean;
1480
- /**
1921
+ /** {zh}
1481
1922
  * @brief 默认音量大小,取值范围0-1
1482
1923
  * @default 0.6
1483
1924
  */
1925
+ /** {en}
1926
+ * @brief The default volume value. The value range is `[0, 1]`.
1927
+ * @default 0.6
1928
+ */
1484
1929
  default?: number;
1485
- /**
1930
+ /** {zh}
1486
1931
  * @brief 静音恢复的时候最小音量
1487
1932
  * @default 0.2
1488
1933
  */
1934
+ /** {en}
1935
+ * @brief The minimum volume value when unmuting. The value range is `[0, 1]`.
1936
+ * @default 0.2
1937
+ */
1489
1938
  miniVolume?: number;
1490
1939
  };
1491
- /**
1940
+ /** {zh}
1492
1941
  * @brief 进度条标记点配置。
1493
1942
  * @list Options
1494
1943
  * @kind property
1495
1944
  */
1945
+ /** {en}
1946
+ * @brief Progress bar marker point configuration.
1947
+ * @list Options
1948
+ * @kind property
1949
+ */
1496
1950
  export interface IDot {
1497
- /**
1951
+ /** {zh}
1498
1952
  * @brief 进度条标记点
1499
1953
  * @default 1
1500
1954
  */
1955
+ /** {en}
1956
+ * @brief The id of the progress bar marker point.
1957
+ * @default 1
1958
+ */
1501
1959
  id: string | number;
1502
- /**
1960
+ /** {zh}
1503
1961
  * @brief 标记点所在的播放时间
1504
1962
  * @default 0
1505
1963
  */
1964
+ /** {en}
1965
+ * @brief The time of the progress bar marker point.
1966
+ * @default 0
1967
+ */
1506
1968
  time: number;
1507
- /**
1969
+ /** {zh}
1508
1970
  * @brief 进度条自定义文案
1509
1971
  * @default -
1510
1972
  */
1973
+ /** {en}
1974
+ * @brief The text of the progress bar marker point.
1975
+ * @default -
1976
+ */
1511
1977
  text?: string;
1512
- /**
1978
+ /** {zh}
1513
1979
  * @brief 标记点持续的时间,单位秒
1514
1980
  * @default 1
1515
1981
  */
1982
+ /** {en}
1983
+ * @brief The duration of the progress bar marker point.
1984
+ * @default 1
1985
+ */
1516
1986
  duration?: number;
1517
- /**
1987
+ /** {zh}
1518
1988
  * @brief 进度条自定义的CSS Style样式
1519
1989
  * @default -
1520
1990
  */
1991
+ /** {en}
1992
+ * @brief The custom CSS style of the progress bar marker point.
1993
+ * @default -
1994
+ */
1521
1995
  style?: CSSStyleDeclaration;
1522
1996
  }
1523
1997
  /**
@@ -1636,49 +2110,83 @@ export declare type IPlayerOptions = {
1636
2110
  volumeColor?: string;
1637
2111
  };
1638
2112
  };
1639
- /**
2113
+ /** {zh}
1640
2114
  * @brief mobile端交互配置。
1641
2115
  */
2116
+ /** {en}
2117
+ * @brief Mobile interaction configuration.
2118
+ */
1642
2119
  export interface IMobileConfig {
1643
- /**
2120
+ /** {zh}
1644
2121
  * @brief 是否禁用手势,手势包括:
1645
2122
  * - 水平手势滑动快进/快退
1646
2123
  * - 左侧手势滑动调节亮度
1647
2124
  * - 右侧手势滑动调节音量(iOS不可用)
1648
2125
  * @default false
1649
2126
  */
2127
+ /** {en}
2128
+ * @brief Whether to disable gestures. Gesture includes:
2129
+ * - Horizontal gesture to fast forward/rewind
2130
+ * - Left gesture to adjust brightness
2131
+ * - Right gesture to adjust volume (iOS not available)
2132
+ * @default false
2133
+ */
1650
2134
  disableGesture?: boolean;
1651
- /**
2135
+ /** {zh}
1652
2136
  * @brief 是否启用水平手势处理,水平手势快进/快退
1653
2137
  * @default false
1654
2138
  */
2139
+ /** {en}
2140
+ * @brief Whether to enable horizontal gesture processing. Horizontal gesture includes fast forward/rewind.
2141
+ * @default false
2142
+ */
1655
2143
  gestureX?: boolean;
1656
- /**
2144
+ /** {zh}
1657
2145
  * @brief 是否启用垂直手势处理,默认不启用, 垂直手势包括屏幕右侧和屏幕左侧,默认左侧调节亮度,右侧调节音量,左右范围比例通过scopeL和scopeR设置
1658
2146
  * @default false
1659
2147
  */
2148
+ /** {en}
2149
+ * @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.
2150
+ * @default false
2151
+ */
1660
2152
  gestureY?: boolean;
1661
- /**
2153
+ /** {zh}
1662
2154
  * @brief 左侧手势范围比例,取值0-1
1663
2155
  * @default 0.25
1664
2156
  */
2157
+ /** {en}
2158
+ * @brief The left gesture range ratio, the value is 0-1.
2159
+ * @default 0.25
2160
+ */
1665
2161
  scopeL?: number;
1666
- /**
2162
+ /** {zh}
1667
2163
  * @brief 右侧手势范围,取值0-1
1668
2164
  * @default 0.25
1669
2165
  */
2166
+ /** {en}
2167
+ * @brief The right gesture range ratio, the value is 0-1.
2168
+ * @default 0.25
2169
+ */
1670
2170
  scopeR?: number;
1671
- /**
2171
+ /** {zh}
1672
2172
  * @brief 是否启用左侧调暗功能,因为web端无法调用系统的亮度,这个功能实际使用透明蒙层实
1673
2173
  * @default true
1674
2174
  */
2175
+ /** {en}
2176
+ * @brief Whether to enable left dimming function. Because the web cannot call the system brightness, this function is actually implemented using a transparent overlay.
2177
+ * @default true
2178
+ */
1675
2179
  darkness?: boolean;
1676
- /**
1677
- * @brief 播放器可调节的最大暗度,即蒙层最大透明度
2180
+ /** {zh}
2181
+ * @brief 播放器可调节的最大暗度,即蒙层最大透明度。
2182
+ * @default 0.6
2183
+ */
2184
+ /** {en}
2185
+ * @brief The maximum darkness of the player, i.e., the maximum transparency of the transparent layer.
1678
2186
  * @default 0.6
1679
2187
  */
1680
2188
  maxDarkness?: number;
1681
- /**
2189
+ /** {zh}
1682
2190
  * @brief 是否启用上下渐变阴影,即在播放器在激活时上下范围内有阴影
1683
2191
  * - normal 上下阴影
1684
2192
  * - none 无阴影
@@ -1686,90 +2194,165 @@ export interface IMobileConfig {
1686
2194
  * - bottom 仅下阴影
1687
2195
  * @default normal
1688
2196
  */
2197
+ /** {en}
2198
+ * @brief Whether to enable vertical gradient shadow, i.e., there is a shadow in the upper and lower range when the player is activated.
2199
+ * - normal: normal shadow
2200
+ * - none: no shadow
2201
+ * - top: only upper shadow
2202
+ * - bottom: only lower shadow
2203
+ * @default normal
2204
+ */
1689
2205
  gradient?: "normal" | "none" | "top" | "bottom";
1690
- /**
2206
+ /** {zh}
1691
2207
  * @brief 是否在touchMove事件触发时(即手势滑动时)同时更新播放器的currentTime, 在手势移动过程中,不会直接调用播放器的快进快退,在toucheEnd的时候再设置
1692
2208
  * @default false
1693
2209
  */
2210
+ /** {en}
2211
+ * @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.
2212
+ * @default false
2213
+ */
1694
2214
  isTouchingSeek?: boolean;
1695
- /**
1696
- * @brief 手势滑动的最小步伐,单位px,即滑动距离超过多少算作滑动,以减少不必要的滑动手势事件触发
2215
+ /** {zh}
2216
+ * @brief 手势滑动的最小步伐,单位px,即滑动距离超过多少算作滑动,以减少不必要的滑动手势事件触发。
2217
+ * @default 5
2218
+ */
2219
+ /** {en}
2220
+ * @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
2221
  * @default 5
1698
2222
  */
1699
2223
  miniMoveStep?: number;
1700
- /**
2224
+ /** {zh}
1701
2225
  * @brief 长按快进倍速
1702
2226
  * @default 2
1703
2227
  */
2228
+ /** {en}
2229
+ * @brief The long press fast forward speed.
2230
+ * @default 2
2231
+ */
1704
2232
  pressRate?: number;
1705
- /**
1706
- * @brief 是否禁用时间预览雪碧图面板
2233
+ /** {zh}
2234
+ * @brief 是否禁用时间预览雪碧图面板。
1707
2235
  * @notice 前提需要配置进度条预览雪碧图 thumbnail
1708
2236
  * @default true
1709
2237
  */
2238
+ /** {en}
2239
+ * @brief Whether to disable the time preview sprite panel.
2240
+ * @notice The prerequisite is to configure the progress bar preview sprite thumbnail.
2241
+ * @default true
2242
+ */
1710
2243
  disableActive?: boolean;
1711
- /**
2244
+ /** {zh}
1712
2245
  * @brief 是否禁用时间进度条,即拖动时不展示mini进度条
1713
2246
  * @default false
1714
2247
  */
2248
+ /** {en}
2249
+ * @brief Whether to disable the time progress bar, i.e., not to show the mini progress bar when dragging.
2250
+ * @default false
2251
+ */
1715
2252
  disableTimeProgress?: boolean;
1716
- /**
2253
+ /** {zh}
1717
2254
  * @brief 手势拖动的时候是否隐藏控制栏
1718
2255
  * @default true
1719
2256
  */
2257
+ /** {en}
2258
+ * @brief Whether to hide the control bar when dragging.
2259
+ * @default true
2260
+ */
1720
2261
  hideControlsActive?: boolean;
1721
- /**
2262
+ /** {zh}
1722
2263
  * @brief 手势结束时隐藏控制栏
1723
2264
  * @default false
1724
2265
  */
2266
+ /** {en}
2267
+ * @brief Whether to hide the control bar when the gesture ends.
2268
+ * @default false
2269
+ */
1725
2270
  hideControlsEnd?: boolean;
1726
- /**
2271
+ /** {zh}
1727
2272
  * @brief 滑动播放器区域快进/快退时,播放器区域对应的时长,即完整滑过播放器所对应的时长,单位ms
1728
2273
  * @default 360000
1729
2274
  */
2275
+ /** {en}
2276
+ * @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.
2277
+ * @default 360000
2278
+ */
1730
2279
  moveDuration?: number;
1731
- /**
2280
+ /** {zh}
1732
2281
  * @brief 是否关闭双击切换暂停/播放的能力,同closeVideoDblclick
1733
2282
  * @default false
1734
2283
  */
2284
+ /** {en}
2285
+ * @brief Whether to disable the double-click to switch pause/play ability, same as closeVideoDblclick.
2286
+ * @default false
2287
+ */
1735
2288
  closedbClick?: boolean;
1736
- /**
2289
+ /** {zh}
1737
2290
  * @brief 禁用长按倍速调整
1738
2291
  * @default true
1739
2292
  */
2293
+ /** {en}
2294
+ * @brief Whether to disable the long press to adjust the speed.
2295
+ * @default true
2296
+ */
1740
2297
  disablePress?: boolean;
1741
- /**
2298
+ /** {zh}
1742
2299
  * @brief 是否禁用快进/快退的时候按钮提示
1743
2300
  * @default false
1744
2301
  */
2302
+ /** {en}
2303
+ * @brief Whether to disable the fast forward/rewind button prompt.
2304
+ * @default false
2305
+ */
1745
2306
  disableSeekIcon?: boolean;
1746
2307
  }
1747
- /**
2308
+ /** {zh}
1748
2309
  * @brief 播放器中间切换暂停/播放的按钮。
1749
2310
  */
2311
+ /** {en}
2312
+ * @brief The center play/pause button.
2313
+ */
1750
2314
  export interface IStartConfig {
1751
- /**
2315
+ /** {zh}
1752
2316
  * @brief 暂停是否常驻
1753
2317
  * @default true
1754
2318
  */
2319
+ /** {en}
2320
+ * @brief Whether to keep the pause button visible.
2321
+ * @default true
2322
+ */
1755
2323
  isShowPause?: boolean;
1756
- /**
2324
+ /** {zh}
1757
2325
  * @brief 是否播放结束常驻
1758
2326
  * @default false
1759
2327
  */
2328
+ /** {en}
2329
+ * @brief Whether to keep the end button visible.
2330
+ * @default false
2331
+ */
1760
2332
  isShowEnd?: boolean;
1761
- /**
2333
+ /** {zh}
1762
2334
  * @brief 是否禁用点击动画
1763
2335
  * @default pc:true,mobile:false
1764
2336
  */
2337
+ /** {en}
2338
+ * @brief Whether to disable the click animation.
2339
+ * @default pc: true, mobile: false
2340
+ */
1765
2341
  disableAnimate?: boolean;
1766
- /**
2342
+ /** {zh}
1767
2343
  * @brief 按钮的跟随模式
1768
2344
  * - hide:起播之后隐藏
1769
2345
  * - show:常驻一直存在
1770
2346
  * - auto:自动跟随,播放器激活时即player.isActive=true的时候显示,否则隐藏
1771
2347
  * @default hide
1772
2348
  */
2349
+ /** {en}
2350
+ * @brief The following modes are supported:
2351
+ * - hide: hidden after playback starts
2352
+ * - show: always visible
2353
+ * - auto: automatically follows, visible when player.isActive=true
2354
+ * @default hide
2355
+ */
1773
2356
  mode?: "hide" | "show" | "auto";
1774
2357
  }
1775
2358
  /**
@@ -1777,7 +2360,7 @@ export interface IStartConfig {
1777
2360
  * @brief 西瓜插件
1778
2361
  */
1779
2362
  export declare type XGPlugin = typeof Plugin | typeof BasePlugin;
1780
- /**
2363
+ /** {zh}
1781
2364
  * @brief 自动播放配置。
1782
2365
  * @list Options
1783
2366
  * @kind property
@@ -1792,7 +2375,7 @@ export interface IAutoplayPluginConfig {
1792
2375
  * @hidden
1793
2376
  */
1794
2377
  position?: string;
1795
- /**
2378
+ /** {zh}
1796
2379
  * @brief 是否开启降级静音自动播放。开启后,如果当前浏览器环境不支持有声音自动播放,则降级为静音自动播放。
1797
2380
  * @default false
1798
2381
  */
@@ -1801,7 +2384,7 @@ export interface IAutoplayPluginConfig {
1801
2384
  * @default false
1802
2385
  */
1803
2386
  enableDegradeMuteAutoplay?: boolean;
1804
- /**
2387
+ /** {zh}
1805
2388
  * @brief 启用微信jsBridge方式的自动播放
1806
2389
  * @default false
1807
2390
  * @hidden
@@ -1813,7 +2396,7 @@ export interface IAutoplayPluginConfig {
1813
2396
  * @hidden
1814
2397
  */
1815
2398
  enableWxJsBridgeAutoplay?: boolean;
1816
- /**
2399
+ /** {zh}
1817
2400
  * @brief 用户触发自动播放的目标 dom。
1818
2401
  * @default window.document.body
1819
2402
  */
@@ -1863,21 +2446,21 @@ declare class PlayList {
1863
2446
  setStyle(style: any): void;
1864
2447
  destroy(): void;
1865
2448
  }
1866
- /**
2449
+ /** {zh}
1867
2450
  * @brief 播放列表展示面板触发动作类型。
1868
2451
  */
1869
2452
  /** {en}
1870
2453
  * @brief Playlist panel trigger action type.
1871
2454
  */
1872
2455
  export declare const enum TOGGLE_MODES {
1873
- /**
2456
+ /** {zh}
1874
2457
  * @brief 鼠标点击。
1875
2458
  */
1876
2459
  /** {en}
1877
2460
  * @brief Mouse click.
1878
2461
  */
1879
2462
  CLICK = "click",
1880
- /**
2463
+ /** {zh}
1881
2464
  * @brief 鼠标悬浮。
1882
2465
  */
1883
2466
  /** {en}
@@ -1885,20 +2468,26 @@ export declare const enum TOGGLE_MODES {
1885
2468
  */
1886
2469
  HOVER = "hover"
1887
2470
  }
1888
- /**
2471
+ /** {zh}
1889
2472
  * @list Options
1890
2473
  * @brief 播放列表项配置,支持 DirectUrl 和 Vid + playAuthToken 两种播放模式。
1891
2474
  * @notes 列表数据由外部提供,播放器内部不直接获取播放列表数据。
1892
2475
  * @kind property
1893
2476
  */
2477
+ /** {en}
2478
+ * @list Options
2479
+ * @brief Playlist item configuration, supporting DirectUrl and Vid + playAuthToken two playback modes.
2480
+ * @notes The list data is provided by external, and the player does not directly obtain the list data.
2481
+ * @kind property
2482
+ */
1894
2483
  export interface IPlayListItem {
1895
- /**
2484
+ /** {zh}
1896
2485
  * @notes 临时播放 Token 为空时,此参数必传。
1897
2486
  * @default -
1898
2487
  * @listtip `playAuthToken` 为空时,此参数必传。
1899
2488
  * @brief 视频地址。
1900
2489
  */
1901
- /**
2490
+ /** {en}
1902
2491
  * @notes Required when temporary play token is empty.
1903
2492
  * @default -
1904
2493
  * @listtip when `playAuthToken` is empty, this parameter is required.
@@ -1936,7 +2525,7 @@ export interface IPlayListItem {
1936
2525
  * @brief Video cover image URL.
1937
2526
  */
1938
2527
  poster?: string;
1939
- /**
2528
+ /** {zh}
1940
2529
  * @default -
1941
2530
  * @brief 视频标题。
1942
2531
  */
@@ -1945,7 +2534,7 @@ export interface IPlayListItem {
1945
2534
  * @brief Video title.
1946
2535
  */
1947
2536
  title?: string;
1948
- /**
2537
+ /** {zh}
1949
2538
  * @brief 视频时长,单位为秒。
1950
2539
  * @default -
1951
2540
  */
@@ -1978,10 +2567,11 @@ declare enum EPlayMode {
1978
2567
  */
1979
2568
  /** {en}
1980
2569
  * @list Options
2570
+ * @brief Playlist plugin configuration.
1981
2571
  * @kind property
1982
2572
  */
1983
2573
  export interface IPlayListConfig {
1984
- /**
2574
+ /** {zh}
1985
2575
  * @brief 按钮位置。取值如下:
1986
2576
  *
1987
2577
  * - `controlsLeft`: 播控栏左侧
@@ -2007,7 +2597,7 @@ export interface IPlayListConfig {
2007
2597
  * @default controlsLeft
2008
2598
  */
2009
2599
  position?: string;
2010
- /**
2600
+ /** {zh}
2011
2601
  * @brief 按钮在所在区域的次序。默认值为 `2`,表示在播放按钮后。
2012
2602
  * @default 20
2013
2603
  */
@@ -2016,7 +2606,7 @@ export interface IPlayListConfig {
2016
2606
  * @default 20
2017
2607
  */
2018
2608
  index?: number;
2019
- /**
2609
+ /** {zh}
2020
2610
  * @brief 播放列表数据。
2021
2611
  * @default []
2022
2612
  */
@@ -2025,7 +2615,7 @@ export interface IPlayListConfig {
2025
2615
  * @default []
2026
2616
  */
2027
2617
  list: IPlayListItem[];
2028
- /**
2618
+ /** {zh}
2029
2619
  * @brief 循环模式,取值如下:
2030
2620
  *
2031
2621
  * - `order`: 不循环播放,即列表中最后一个视频播放完成后就停止播放。
@@ -2040,7 +2630,7 @@ export interface IPlayListConfig {
2040
2630
  * @default order
2041
2631
  */
2042
2632
  mode?: EPlayMode;
2043
- /**
2633
+ /** {zh}
2044
2634
  * @brief 默认起始的播放次序。
2045
2635
  * @default order
2046
2636
  */
@@ -2049,7 +2639,7 @@ export interface IPlayListConfig {
2049
2639
  * @default order
2050
2640
  */
2051
2641
  defaultIndex?: number;
2052
- /**
2642
+ /** {zh}
2053
2643
  * @brief 列表点击之后是否隐藏。
2054
2644
  * @default true
2055
2645
  */
@@ -2058,7 +2648,7 @@ export interface IPlayListConfig {
2058
2648
  * @default true
2059
2649
  */
2060
2650
  isItemClickHide?: boolean;
2061
- /**
2651
+ /** {zh}
2062
2652
  * @brief 列表行为触发模式。
2063
2653
  * @default click
2064
2654
  */
@@ -2067,7 +2657,7 @@ export interface IPlayListConfig {
2067
2657
  * @default click
2068
2658
  */
2069
2659
  toggleMode?: TOGGLE_MODES;
2070
- /**
2660
+ /** {zh}
2071
2661
  * @brief 是否显示播放列表按钮。
2072
2662
  * @default true
2073
2663
  */
@@ -2156,16 +2746,18 @@ export declare class PlayListPlugin extends Plugin {
2156
2746
  get disable(): boolean;
2157
2747
  render(): string;
2158
2748
  }
2159
- /**
2749
+ /** {zh}
2160
2750
  * @brief 动态水印配置。
2161
2751
  * @list Options
2162
2752
  * @kind property
2163
2753
  */
2164
2754
  /** {en}
2165
2755
  * @brief watermark config
2756
+ * @list Options
2757
+ * @kind property
2166
2758
  */
2167
2759
  export interface IWatermarkConfig {
2168
- /**
2760
+ /** {zh}
2169
2761
  * @brief 是否开启动态水印,取值如下:<br/>
2170
2762
  * - `true`:开启动态水印
2171
2763
  * - `false`:关闭动态水印
@@ -2175,17 +2767,19 @@ export interface IWatermarkConfig {
2175
2767
  * @brief Is dynamic watermark enabled? The value is as follows:<br/>
2176
2768
  * - `true`: Enable dynamic watermark
2177
2769
  * - `false`: Disable dynamic watermark
2770
+ * @default false
2178
2771
  */
2179
2772
  enable: boolean;
2180
- /**
2773
+ /** {zh}
2181
2774
  * @brief 水印文案。
2182
2775
  * @default -
2183
2776
  */
2184
2777
  /** {en}
2778
+ * @brief Watermark content.
2185
2779
  * @default -
2186
2780
  */
2187
2781
  content: string;
2188
- /**
2782
+ /** {zh}
2189
2783
  * @brief 水印展示形式,取值如下:<br/>
2190
2784
  * - `0`:固定位置
2191
2785
  * - `1`:全屏滚动
@@ -2193,18 +2787,23 @@ export interface IWatermarkConfig {
2193
2787
  * @default 1
2194
2788
  */
2195
2789
  /** {en}
2790
+ * @brief Watermark display type. The value is as follows:<br/>
2791
+ * - `0`: Fixed position
2792
+ * - `1`: Full screen scrolling
2793
+ * - `2`: Random flickering
2196
2794
  * @default 1
2197
2795
  */
2198
2796
  displayType?: 0 | 1 | 2;
2199
- /**
2797
+ /** {zh}
2200
2798
  * @brief 水印字体大小。`number`类型时单位为 px,`string` 类型时需要携带单位。
2201
2799
  * @default 12
2202
2800
  */
2203
2801
  /** {en}
2802
+ * @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
2803
  * @default 12
2205
2804
  */
2206
2805
  fontSize?: number | string;
2207
- /**
2806
+ /** {zh}
2208
2807
  * @brief 水印字体颜色。
2209
2808
  * @brief 水印字体颜色。
2210
2809
  */
@@ -2213,15 +2812,16 @@ export interface IWatermarkConfig {
2213
2812
  * @brief Watermark font color.
2214
2813
  */
2215
2814
  fontColor?: string;
2216
- /**
2815
+ /** {zh}
2217
2816
  * @brief 水印不透明度。取值范围:\[0~1\]。
2218
2817
  * @default 0.3
2219
2818
  */
2220
2819
  /** {en}
2820
+ * @brief Watermark opacity. The value is in the range of [0~1].
2221
2821
  * @default 0.3
2222
2822
  */
2223
2823
  opacity?: number;
2224
- /**
2824
+ /** {zh}
2225
2825
  * @brief 水印闪烁速度,取值如下:<br/>
2226
2826
  * - `MODERATE`:适中
2227
2827
  * - `FAST`:较快
@@ -2229,33 +2829,57 @@ export interface IWatermarkConfig {
2229
2829
  * @default MODERATE
2230
2830
  */
2231
2831
  /** {en}
2832
+ * @brief Watermark ticker speed. The value is as follows:<br/>
2833
+ * - `MODERATE`: Moderate
2834
+ * - `FAST`: Fast
2835
+ * - `SLOW`: Slow
2232
2836
  * @default MODERATE
2233
2837
  */
2234
2838
  tickerSpeed?: "SLOW" | "MODERATE" | "FAST";
2235
- /**
2839
+ /** {zh}
2236
2840
  * @brief 水印字体类型
2237
2841
  * @default -
2238
2842
  */
2843
+ /** {en}
2844
+ * @brief Watermark font family.
2845
+ * @default -
2846
+ */
2239
2847
  fontFamily?: string;
2240
- /**
2848
+ /** {zh}
2241
2849
  * @brief 水印相对于播放容器顶部的距离,单位为 px
2242
2850
  * @default 0
2243
2851
  */
2852
+ /** {en}
2853
+ * @brief Watermark top distance. The unit is px.
2854
+ * @default 0
2855
+ */
2244
2856
  top?: number;
2245
- /**
2857
+ /** {zh}
2246
2858
  * @brief 水印相对于播放容器左侧的距离,单位为 px。
2247
2859
  * @default 0
2248
2860
  */
2861
+ /** {en}
2862
+ * @brief Watermark left distance. The unit is px.
2863
+ * @default 0
2864
+ */
2249
2865
  left?: number;
2250
- /**
2866
+ /** {zh}
2251
2867
  * @brief 水印相对于播放容器底部的距离,单位为 px。
2252
2868
  * @default -
2253
2869
  */
2870
+ /** {en}
2871
+ * @brief Watermark bottom distance. The unit is px.
2872
+ * @default -
2873
+ */
2254
2874
  bottom?: number;
2255
- /**
2875
+ /** {zh}
2256
2876
  * @brief 水印相对于播放容器右侧的距离,单位为 px。
2257
2877
  * @default -
2258
2878
  */
2879
+ /** {en}
2880
+ * @brief Watermark right distance. The unit is px.
2881
+ * @default -
2882
+ */
2259
2883
  right?: number;
2260
2884
  }
2261
2885
  export declare class DynamicWatermarkPlugin extends Plugin {
@@ -2451,6 +3075,7 @@ export interface ISubtitleInfoList {
2451
3075
  Version: string;
2452
3076
  Vid: string;
2453
3077
  }
3078
+ export declare type ISubtitleInfoListItem = ISubtitleInfoList | string;
2454
3079
  /** {zh}
2455
3080
  * @hidden
2456
3081
  */
@@ -2525,11 +3150,118 @@ export interface IGetPlayInfoRes {
2525
3150
  PlayInfoList: IPlayInfoListItem[];
2526
3151
  PosterUrl: string;
2527
3152
  Status: number;
2528
- SubtitleInfoList: ISubtitleInfoList[];
3153
+ SubtitleInfoList?: ISubtitleInfoListItem[];
2529
3154
  ThumbInfoList: IThumbInfoItem[];
2530
3155
  TotalCount: number;
2531
3156
  Version: number;
2532
3157
  }
3158
+ /**
3159
+ * 短剧环境配置接口
3160
+ */
3161
+ export interface ITTDramaEnv {
3162
+ /** 云服务商,默认从构建时 env.__PLATFORM__ 获取,未注入时默认为 byteplus */
3163
+ channel?: "volcengine" | "byteplus";
3164
+ /**
3165
+ * @brief 应用版本号
3166
+ * @type {string}
3167
+ */
3168
+ appVersion: string;
3169
+ /**
3170
+ * @brief 小程序三方id
3171
+ * @type {string}
3172
+ */
3173
+ clientKey: string;
3174
+ /**
3175
+ * @brief 是否支持获取短剧信息
3176
+ * @type {boolean}
3177
+ */
3178
+ canIUseGetDramaInfo: boolean;
3179
+ /** 是否支持在 getDramaInfo 中透传 transcodeParam */
3180
+ canIUseGetDramaInfoTranscodeParam?: boolean;
3181
+ /**
3182
+ * @brief Android 是否支持批量获取短剧信息(高版本 app)
3183
+ * @type {boolean}
3184
+ */
3185
+ canAndroidBatchGetDramaInfo?: boolean;
3186
+ /**
3187
+ * @brief 获取短剧信息
3188
+ * @type {function}
3189
+ */
3190
+ getDramaInfo: (callback: (res: IJSBCallbackResult) => void, options: IGetDramaInfoOptions) => void;
3191
+ videoSecurityModule?: any;
3192
+ /**
3193
+ * @brief 日志发送接口
3194
+ * @type {function}
3195
+ */
3196
+ sendLog: (EventName: string, params: Record<string, any>) => void;
3197
+ /**
3198
+ * 低版本 app 下验证 TTOP 签发的 playAuthToken 时使用的密钥
3199
+ * 通过 JSB(如 minis.getSecret)从 Native 获取,用于 HMAC-SHA256 签名校验
3200
+ */
3201
+ getTokenVerifySecret?: () => Promise<string>;
3202
+ }
3203
+ /**
3204
+ * JSB 获取短剧信息请求参数
3205
+ */
3206
+ export interface IGetDramaInfoOptions {
3207
+ clientKey: string;
3208
+ albumId: string;
3209
+ episodeId: string;
3210
+ vid: string;
3211
+ transcodeParam?: IGetDramaInfoTranscodeParam;
3212
+ }
3213
+ /** JSB/TTOP 使用的 snake_case 转码参数。 */
3214
+ export interface IGetDramaInfoTranscodeParam {
3215
+ format?: string;
3216
+ codec?: string;
3217
+ definition?: string;
3218
+ file_type?: string;
3219
+ need_thumbs?: string;
3220
+ need_barrage_mask?: string;
3221
+ union_info?: string;
3222
+ quality?: string;
3223
+ drm_kek?: string;
3224
+ js_player?: string;
3225
+ }
3226
+ export interface MinisError {
3227
+ error_code: number;
3228
+ error_msg: string;
3229
+ error_extra?: unknown;
3230
+ }
3231
+ /**
3232
+ * JSB getDramaInfo 返回的客户端耗时信息,单位 ms。
3233
+ */
3234
+ export interface IGetDramaInfoPerfInfo {
3235
+ prepare_cost?: number;
3236
+ request_cost?: number;
3237
+ parse_cost?: number;
3238
+ total_cost?: number;
3239
+ [propName: string]: any;
3240
+ }
3241
+ /**
3242
+ * JSB 获取短剧信息返回结果
3243
+ */
3244
+ export interface IJSBCallbackResult {
3245
+ is_success: number | boolean;
3246
+ error?: MinisError;
3247
+ data?: {
3248
+ status: number;
3249
+ drama_info: {
3250
+ album_id: string;
3251
+ drama_name: string;
3252
+ drama_cover: string;
3253
+ drama_description: string;
3254
+ };
3255
+ episode_info: {
3256
+ episode_id: string;
3257
+ episode_name: string;
3258
+ episode_cover: string;
3259
+ episode_description: string;
3260
+ };
3261
+ video_info: IGetPlayInfoRes | Record<string, any>;
3262
+ perf_info?: IGetDramaInfoPerfInfo;
3263
+ };
3264
+ }
2533
3265
  /** {zh}
2534
3266
  * @list Options
2535
3267
  * @brief 视频编码格式。
@@ -2828,6 +3560,7 @@ export interface IABCycle {
2828
3560
  */
2829
3561
  /** {en}
2830
3562
  * @list Options
3563
+ * @brief Music playback mode configuration.
2831
3564
  * @kind property
2832
3565
  */
2833
3566
  export interface IMusicConfig {
@@ -3158,21 +3891,119 @@ export interface Current extends Partial<Stream> {
3158
3891
  /**
3159
3892
  * @hidden
3160
3893
  */
3161
- [propName: string]: any;
3894
+ [propName: string]: any;
3895
+ }
3896
+ /** {zh}
3897
+ * @detail Options
3898
+ * @brief URL 类型。支持字符串和数组。如果是数组形式,则每个数组项应包含视频播放地址 `src` 和视频容器格式类型 `type`,在 HTML `<video />` 元素中使用 [`<source />`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/source) 元素设置多种格式的视频源。以 `<source />` 元素设置的地址不支持 MSE(媒体源扩展)播放场景,例如 PC 上播放 HLS 视频或安卓上播放 HLS 加密视频。
3899
+ */
3900
+ /** {en}
3901
+ * @detail Options
3902
+ * @brief URL type. Supports strings and arrays. If it's in the form of an array, each item in the array should contain the video playback address `src` and the video container format type `type`. Use the [<source />](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/source) element in the HTML `<video />` element to set multiple format video sources. The addresses set with the `<source />` element do not support MSE (Media Source Extensions) playback scenarios, such as playing HLS videos on PCs or encrypted HLS videos on Android.
3903
+ */
3904
+ export declare type Url = string | Array<{
3905
+ src: string;
3906
+ type?: string;
3907
+ [propName: string]: any;
3908
+ }>;
3909
+ /** {zh}
3910
+ * @list Options
3911
+ * @kind property
3912
+ * @brief 获取到媒体信息时的回调参数。
3913
+ */
3914
+ /** {en}
3915
+ * @list Options
3916
+ * @kind property
3917
+ * @brief Callback payload when media information is obtained.
3918
+ */
3919
+ export interface IGetMediaInfoCallbackPayload {
3920
+ /** {zh}
3921
+ * @brief 媒体信息。
3922
+ */
3923
+ /** {en}
3924
+ * @brief Media information.
3925
+ */
3926
+ data: {
3927
+ playList?: Stream[];
3928
+ type?: string;
3929
+ poster?: string;
3930
+ vid?: string;
3931
+ duration?: number;
3932
+ [propName: string]: any;
3933
+ };
3934
+ /** {zh}
3935
+ * @brief 媒体信息是否来自缓存。
3936
+ */
3937
+ /** {en}
3938
+ * @brief Whether the media information comes from cache.
3939
+ */
3940
+ fromCache: boolean;
3941
+ }
3942
+ /** {zh}
3943
+ * @list Options
3944
+ * @kind property
3945
+ * @brief JSB getDramaInfo 客户端耗时回调参数。
3946
+ */
3947
+ /** {en}
3948
+ * @list Options
3949
+ * @kind property
3950
+ * @brief Callback payload for client-side getDramaInfo timing returned by JSB.
3951
+ */
3952
+ export interface IGetDramaInfoPerfCallbackPayload {
3953
+ /** {zh}
3954
+ * @brief JSB 返回的客户端耗时信息,单位 ms。
3955
+ */
3956
+ /** {en}
3957
+ * @brief Client-side timing returned by JSB, in milliseconds.
3958
+ */
3959
+ perfInfo: IGetDramaInfoPerfInfo;
3960
+ /** {zh}
3961
+ * @brief 剧 ID。
3962
+ */
3963
+ albumId?: string;
3964
+ /** {zh}
3965
+ * @brief 剧集 ID。
3966
+ */
3967
+ episodeId?: string;
3968
+ /** {zh}
3969
+ * @brief 视频 ID。
3970
+ */
3971
+ vid?: string;
3972
+ /** {zh}
3973
+ * @brief JSB 是否请求成功。
3974
+ */
3975
+ isSuccess: boolean;
3976
+ /** {zh}
3977
+ * @brief 短剧审核状态。
3978
+ */
3979
+ status?: number;
3980
+ /** {zh}
3981
+ * @brief 是否来自缓存。getDramaInfo 实际请求返回时固定为 false。
3982
+ */
3983
+ fromCache: boolean;
3984
+ /** {zh}
3985
+ * @brief SDK 收到回调时的时间戳。
3986
+ */
3987
+ timestamp: number;
3162
3988
  }
3163
3989
  /** {zh}
3164
- * @detail Options
3165
- * @brief URL 类型。支持字符串和数组。如果是数组形式,则每个数组项应包含视频播放地址 `src` 和视频容器格式类型 `type`,在 HTML `<video />` 元素中使用 [`<source />`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/source) 元素设置多种格式的视频源。以 `<source />` 元素设置的地址不支持 MSE(媒体源扩展)播放场景,例如 PC 上播放 HLS 视频或安卓上播放 HLS 加密视频。
3990
+ * @brief Minis 短剧转码参数。各字段会由 VePlayer 转换为服务端 snake_case 命名后透传。
3166
3991
  */
3167
3992
  /** {en}
3168
- * @detail Options
3169
- * @brief URL type. Supports strings and arrays. If it's in the form of an array, each item in the array should contain the video playback address `src` and the video container format type `type`. Use the [<source />](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/source) element in the HTML `<video />` element to set multiple format video sources. The addresses set with the `<source />` element do not support MSE (Media Source Extensions) playback scenarios, such as playing HLS videos on PCs or encrypted HLS videos on Android.
3993
+ * @brief Minis short-drama transcoding parameters. VePlayer converts the fields to server-side snake_case names before forwarding them.
3170
3994
  */
3171
- export declare type Url = string | Array<{
3172
- src: string;
3173
- type?: string;
3174
- [propName: string]: any;
3175
- }>;
3995
+ export interface ITranscodeParam {
3996
+ format?: string;
3997
+ codec?: string;
3998
+ definition?: string;
3999
+ fileType?: string;
4000
+ needThumbs?: string;
4001
+ needBarrageMask?: string;
4002
+ unionInfo?: string;
4003
+ quality?: string;
4004
+ drmKek?: string;
4005
+ jsPlayer?: string;
4006
+ }
3176
4007
  /** {zh}
3177
4008
  * @list Options
3178
4009
  * @kind property
@@ -3236,6 +4067,21 @@ export interface IPlayerConfig extends IPlayerOptions {
3236
4067
  * @default -
3237
4068
  */
3238
4069
  vid?: string;
4070
+ /**
4071
+ * @brief 剧id,Minis 短剧播放需要
4072
+ */
4073
+ albumId?: string;
4074
+ /**
4075
+ * @brief 剧集id,Minis 短剧播放需要
4076
+ */
4077
+ episodeId?: string;
4078
+ /** {zh}
4079
+ * @brief Minis 短剧转码参数。
4080
+ */
4081
+ /** {en}
4082
+ * @brief Minis short-drama transcoding parameters.
4083
+ */
4084
+ transcodeParam?: ITranscodeParam;
3239
4085
  /** {zh}
3240
4086
  * @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
3241
4087
  * @type {IPlayAuthTokenConfig}
@@ -3245,6 +4091,34 @@ export interface IPlayerConfig extends IPlayerOptions {
3245
4091
  * @brief Vid playback configuration. The app server generates a temporary play token from `vid` and passes it to the client.
3246
4092
  */
3247
4093
  getVideoByToken?: IPlayAuthTokenConfig;
4094
+ /** {zh}
4095
+ * @brief 通过 `playAuthToken` 或缓存获取到媒体信息时触发的回调。
4096
+ * @default -
4097
+ */
4098
+ /** {en}
4099
+ * @brief Callback fired when media information is obtained from `playAuthToken` or cache.
4100
+ * @default -
4101
+ */
4102
+ onGetMediaInfo?: (payload: IGetMediaInfoCallbackPayload) => void;
4103
+ /** {zh}
4104
+ * @brief JSB `getDramaInfo` 返回客户端耗时信息时触发的回调。
4105
+ * @default -
4106
+ */
4107
+ /** {en}
4108
+ * @brief Callback fired when JSB `getDramaInfo` returns client-side timing.
4109
+ * @default -
4110
+ */
4111
+ onGetDramaInfoPerf?: (payload: IGetDramaInfoPerfCallbackPayload) => void;
4112
+ /** {zh}
4113
+ * @brief 是否自动使用 `playAuthToken` 或短剧信息返回的字幕列表。
4114
+ * @default false
4115
+ */
4116
+ autoSubtitle?: boolean;
4117
+ /** {zh}
4118
+ * @brief 自动字幕项格式化回调。返回字符串或数字时作为字幕名称;返回 `false` 或 `{ show: false }` 时不展示该项;返回 `{ isDefault: true }` 或 `{ default: true }` 时设为默认字幕。
4119
+ * @default -
4120
+ */
4121
+ formatAutoSubtitleItem?: IAutoSubtitleItemFormatter;
3248
4122
  /** {zh}
3249
4123
  * @brief 视频加密类型
3250
4124
  * @default -
@@ -4122,6 +4996,15 @@ export interface IPlayerConfig extends IPlayerOptions {
4122
4996
  * @default 0
4123
4997
  */
4124
4998
  oriErrMaxTotalRetry?: number;
4999
+ /** {zh}
5000
+ * @brief 是否在原生媒体错误时自动重试拉流。
5001
+ * @default true
5002
+ */
5003
+ /** {en}
5004
+ * @brief Whether to automatically retry playback after native media errors.
5005
+ * @default true
5006
+ */
5007
+ enableOriErrRetry?: boolean;
4125
5008
  /** {zh}
4126
5009
  * @brief 是否在重试耗尽后发起错误诊断请求,以细化错误码。
4127
5010
  * @default true
@@ -5289,7 +6172,8 @@ export interface ApiMapConfig {
5289
6172
  playDomain: string;
5290
6173
  backupPlayDomain?: string;
5291
6174
  }
5292
- declare enum UmdKeys {
6175
+ /** UMD modules that can be loaded or explicitly pre-registered. */
6176
+ export declare enum UmdKeys {
5293
6177
  HLS = "hls",
5294
6178
  HLSJS = "hlsjs",
5295
6179
  FLV = "flv",
@@ -5308,11 +6192,13 @@ declare enum UmdKeys {
5308
6192
  Preloader = "preloader",
5309
6193
  HLSjsPro = "hlsjsPro"
5310
6194
  }
6195
+ /** Resolved UMD module values keyed by their public UMD key. */
6196
+ export declare type UmdModules = Partial<Record<UmdKeys, unknown>>;
5311
6197
  /**
5312
6198
  * @hidden
5313
- * @breif umdmap 配置
6199
+ * @breif umdmap 单项配置
5314
6200
  */
5315
- export declare type UMDMap = Record<UmdKeys, {
6201
+ export interface UMDMapEntry {
5316
6202
  /**
5317
6203
  * umd Module 的名称,即在window下暴露的接口名称
5318
6204
  */
@@ -5329,10 +6215,20 @@ export declare type UMDMap = Record<UmdKeys, {
5329
6215
  * npm包中umd入口文件路径,用于打包上传到cdn目录
5330
6216
  */
5331
6217
  devPath: string;
5332
- }>;
6218
+ }
6219
+ /**
6220
+ * @hidden
6221
+ * @breif umdmap 配置;精简构建可只提供其支持的依赖。
6222
+ */
6223
+ export declare type UMDMap = Partial<Record<UmdKeys, UMDMapEntry>>;
5333
6224
  declare class UMDLoader {
5334
6225
  private static jsLoadMap;
5335
6226
  private static jsLoadPromiseMap;
6227
+ private static registeredModules;
6228
+ /** 注册业务已打包的 UMD 模块,优先于缓存、window 全局和 script 加载。 */
6229
+ static registerModules(modules: UmdModules): void;
6230
+ /** 清除指定插件的加载缓存,使下次 loadPlugins 重新触发加载。 */
6231
+ clearPluginCache(pluginName: UmdKeys): void;
5336
6232
  umdMap: UMDMap;
5337
6233
  backupUmdUrlMap: Record<string, string>;
5338
6234
  failCallback: (umdName: string, err: any) => any;
@@ -5434,6 +6330,129 @@ export declare class SdkPlugin {
5434
6330
  */
5435
6331
  __destroy(): void;
5436
6332
  }
6333
+ /**
6334
+ * @author bytedance
6335
+ * @version 1.0
6336
+ * @Description
6337
+ * @date 2024/12/16 17:59
6338
+ */
6339
+ export declare const enum LangTextKey {
6340
+ NETWORK = "NETWORK",
6341
+ NETWORK_TIMEOUT = "NETWORK_TIMEOUT",
6342
+ NETWORK_FORBIDDEN = "NETWORK_FORBIDDEN",
6343
+ NETWORK_NOTFOUND = "NETWORK_NOTFOUND",
6344
+ NETWORK_RANGE_NOT_SATISFIABLE = "NETWORK_RANGE_NOT_SATISFIABLE",
6345
+ NETWORK_PROTOCOL = "NETWORK_PROTOCOL",
6346
+ NETWORK_URL_EXPIRE = "NETWORK_URL_EXPIRE",
6347
+ NETWORK_URL_SIGN = "NETWORK_URL_SIGN",
6348
+ NETWORK_ENCRYPT_HLS_ERR = "NETWORK_ENCRYPT_HLS_ERR",
6349
+ MEDIA_ERR = "MEDIA_ERR",
6350
+ MEDIA_ERR_ABORTED = "MEDIA_ERR_ABORTED",
6351
+ MEDIA_ERR_NETWORK = "MEDIA_ERR_NETWORK",
6352
+ MEDIA_ERR_DECODE = "MEDIA_ERR_DECODE",
6353
+ MEDIA_ERR_SRC_NOT_SUPPORTED = "MEDIA_ERR_SRC_NOT_SUPPORTED",
6354
+ MEDIA_ERR_NOT_SUPPORTED = "MEDIA_ERR_NOT_SUPPORTED",
6355
+ MEDIA_ERR_URL_EMPTY = "MEDIA_ERR_URL_EMPTY",
6356
+ MEDIA_ERR_FILE_NOT_SUPPORTED = "MEDIA_ERR_FILE_NOT_SUPPORTED",
6357
+ MEDIA_ERR_PLAY_ERR = "MEDIA_ERR_PLAY_ERR",
6358
+ MEDIA_SOURCE_CANNOT_PLAY_TYPE = "MEDIA_SOURCE_CANNOT_PLAY_TYPE",
6359
+ BUSINESS_DRM_NOT_SUPPORT = "BUSINESS_DRM_NOT_SUPPORT",
6360
+ BUSINESS_DRM_NOT_SUPPORT_UN_RECORD = "BUSINESS_DRM_NOT_SUPPORT_UN_RECORD",
6361
+ BUSINESS_DRM_LACK_MEDIA_KEY = "BUSINESS_DRM_LACK_MEDIA_KEY",
6362
+ BUSINESS_DRM_LACK_KEY_SESSION = "BUSINESS_DRM_LACK_KEY_SESSION",
6363
+ BUSINESS_DRM_GENERATE_REQUEST_FAIL = "BUSINESS_DRM_GENERATE_REQUEST_FAIL",
6364
+ BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH = "BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH",
6365
+ BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH = "BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH",
6366
+ BUSINESS_DRM_LICENSE_FAIL = "BUSINESS_DRM_LICENSE_FAIL",
6367
+ BUSINESS_DRM_KEY_ERROR = "BUSINESS_DRM_KEY_ERROR",
6368
+ BUSINESS_DRM_CERT_FAIL = "BUSINESS_DRM_CERT_FAIL",
6369
+ PRIVATE_DRM_KEY_GET_FAILED = "PRIVATE_DRM_KEY_GET_FAILED",
6370
+ PRIVATE_DRM_CRYPTO_NOT_SUPPORT = "PRIVATE_DRM_CRYPTO_NOT_SUPPORT",
6371
+ PRIVATE_DRM_RSA_FAIL = "PRIVATE_DRM_RSA_FAIL",
6372
+ OTHER = "OTHER",
6373
+ VOD_LOG_NOT_CONFIGURED = "VOD_LOG_NOT_CONFIGURED",
6374
+ PLAY_AUTH_TOKEN_EXPIRED = "PLAY_AUTH_TOKEN_EXPIRED",
6375
+ HLS_KEY_TOKEN_EXPIRED = "HLS_KEY_TOKEN_EXPIRED",
6376
+ THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED = "THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED",
6377
+ GET_PLAY_INFO_ERR = "GET_PLAY_INFO_ERR",
6378
+ GET_HLS_DECRYPTION_KEY_ERR = "GET_HLS_DECRYPTION_KEY_ERR",
6379
+ LICENSE_VALIDATE_FAIL = "LICENSE_VALIDATE_FAIL",
6380
+ DEFINITION_AUTO = "DEFINITION_AUTO",
6381
+ LICENSE_STATUS_INVALID = "LICENSE_STATUS_INVALID",
6382
+ LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH = "LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH",
6383
+ BASE_LICENSE_NOT_SUPPORT_265 = "BASE_LICENSE_NOT_SUPPORT_265",
6384
+ BASE_LICENSE_NOT_SUPPORT_ABR = "BASE_LICENSE_NOT_SUPPORT_ABR",
6385
+ BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
6386
+ BASE_LICENSE_NOT_SUPPORT_PRELOAD = "BASE_LICENSE_NOT_SUPPORT_PRELOAD",
6387
+ EXPIRED_LICENSE_NOT_SUPPORT_265 = "EXPIRED_LICENSE_NOT_SUPPORT_265",
6388
+ EXPIRED_LICENSE_NOT_SUPPORT_ABR = "EXPIRED_LICENSE_NOT_SUPPORT_ABR",
6389
+ EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
6390
+ EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD = "EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD",
6391
+ /** Short drama (Minis) errors — codes 93xx */
6392
+ DRAMA_INVALID_PARAM = "DRAMA_INVALID_PARAM",
6393
+ DRAMA_NO_INFO_FOUND = "DRAMA_NO_INFO_FOUND",
6394
+ DRAMA_NOT_SUBMITTED = "DRAMA_NOT_SUBMITTED",
6395
+ DRAMA_UNDER_REVIEW = "DRAMA_UNDER_REVIEW",
6396
+ DRAMA_FAILED_REVIEW = "DRAMA_FAILED_REVIEW",
6397
+ DRAMA_WITHDRAWN_REVIEW = "DRAMA_WITHDRAWN_REVIEW",
6398
+ DRAMA_FAILED_TO_QUERY = "DRAMA_FAILED_TO_QUERY",
6399
+ DRAMA_INVALID_TTOP_TOKEN = "DRAMA_INVALID_TTOP_TOKEN",
6400
+ DRAMA_NOT_ON_SHELF = "DRAMA_NOT_ON_SHELF",
6401
+ DRAMA_FAILED_GET_EPISODE_INFO = "DRAMA_FAILED_GET_EPISODE_INFO"
6402
+ }
6403
+ declare const DRAMA_ERROR_CODE: {
6404
+ /** 9301 - 短剧环境下参数不合法(如使用 url/playList 播放,或缺少 albumId / episodeId) */
6405
+ readonly INVALID_PARAM: {
6406
+ readonly code: 9301;
6407
+ readonly message: "Invalid parameter in short drama environment";
6408
+ readonly textKey: LangTextKey.DRAMA_INVALID_PARAM;
6409
+ };
6410
+ readonly NO_INFO_FOUND: {
6411
+ readonly code: 9302;
6412
+ readonly message: "No information found for this Episode";
6413
+ readonly textKey: LangTextKey.DRAMA_NO_INFO_FOUND;
6414
+ };
6415
+ readonly NOT_SUBMITTED: {
6416
+ readonly code: 9303;
6417
+ readonly message: "Episode not submitted for review";
6418
+ readonly textKey: LangTextKey.DRAMA_NOT_SUBMITTED;
6419
+ };
6420
+ readonly UNDER_REVIEW: {
6421
+ readonly code: 9304;
6422
+ readonly message: "Episode under for review";
6423
+ readonly textKey: LangTextKey.DRAMA_UNDER_REVIEW;
6424
+ };
6425
+ readonly FAILED_REVIEW: {
6426
+ readonly code: 9305;
6427
+ readonly message: "Episode failed review";
6428
+ readonly textKey: LangTextKey.DRAMA_FAILED_REVIEW;
6429
+ };
6430
+ readonly WITHDRAWN_REVIEW: {
6431
+ readonly code: 9306;
6432
+ readonly message: "Episode withdrawn from review";
6433
+ readonly textKey: LangTextKey.DRAMA_WITHDRAWN_REVIEW;
6434
+ };
6435
+ readonly FAILED_TO_QUERY: {
6436
+ readonly code: 9307;
6437
+ readonly message: "Failed to query video playback information";
6438
+ readonly textKey: LangTextKey.DRAMA_FAILED_TO_QUERY;
6439
+ };
6440
+ readonly INVALID_TTOP_TOKEN: {
6441
+ readonly code: 9308;
6442
+ readonly message: "Invalid playAuthToken or failed to verify TTOP token";
6443
+ readonly textKey: LangTextKey.DRAMA_INVALID_TTOP_TOKEN;
6444
+ };
6445
+ readonly NOT_ON_SHELF: {
6446
+ readonly code: 9310;
6447
+ readonly message: "Video is not on shelf";
6448
+ readonly textKey: LangTextKey.DRAMA_NOT_ON_SHELF;
6449
+ };
6450
+ readonly FAILED_GET_EPISODE_INFO: {
6451
+ readonly code: 9399;
6452
+ readonly message: "Failed get episode info";
6453
+ readonly textKey: LangTextKey.DRAMA_FAILED_GET_EPISODE_INFO;
6454
+ };
6455
+ };
5437
6456
  declare class AuthToken extends SdkPlugin {
5438
6457
  static get pluginName(): string;
5439
6458
  isPlayByToken: boolean;
@@ -5449,19 +6468,56 @@ declare class AuthToken extends SdkPlugin {
5449
6468
  playInfo?: VideoInfoRes;
5450
6469
  constructor(args: any);
5451
6470
  beforePlayerCreate(): Promise<void>;
5452
- getVideoInfo(): Promise<{
6471
+ getVideoInfo(sourceConfigs?: IPlayerConfig): Promise<{
5453
6472
  vid: string;
5454
6473
  playList: Stream[];
5455
6474
  codec: ICodecType;
5456
6475
  defaultDefinition: string;
5457
6476
  }>;
5458
- getVideos(): Promise<any>;
6477
+ /**
6478
+ * 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
6479
+ */
6480
+ getDramaInfoViaJSB(sourceConfigs?: IPlayerConfig): Promise<VideoInfoRes | undefined>;
6481
+ /**
6482
+ * 将审核状态映射到短剧错误码
6483
+ */
6484
+ mapReviewStatusToErrorCode(status: number): keyof typeof DRAMA_ERROR_CODE;
6485
+ /**
6486
+ * 根据 JSB 返回的 msg 或 status 映射到错误码 key
6487
+ */
6488
+ mapDramaErrorCode(msg: string, status?: number): keyof typeof DRAMA_ERROR_CODE;
6489
+ /**
6490
+ * 将 JSB 返回的 video_info 转换为 VideoInfoRes 格式
6491
+ */
6492
+ transformDramaVideoInfoToRes(videoInfo: any, config: IPlayAuthTokenConfig): VideoInfoRes;
6493
+ callOnGetMediaInfo(mediaInfo: VideoInfoRes | undefined, fromCache: boolean): void;
6494
+ reportGetDramaInfoPerf(res: IJSBCallbackResult | undefined, request: {
6495
+ albumId?: string;
6496
+ episodeId?: string;
6497
+ vid?: string;
6498
+ }): void;
6499
+ getVideos(sourceConfigs?: IPlayerConfig): Promise<any>;
5459
6500
  getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
5460
6501
  getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
5461
6502
  getBarrageMaskUrl(url: string): void;
6503
+ setSubtitleConfig(mediaInfo: VideoInfoRes | undefined): void;
6504
+ getAutoSubtitleList(mediaInfo: VideoInfoRes): ISubTitleItem[];
6505
+ getSubtitleSourceData(mediaInfo: VideoInfoRes): any;
6506
+ getAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
6507
+ getStringAutoSubtitleItem(item: string, index: number): ISubTitleItem;
6508
+ getObjectAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
6509
+ formatAutoSubtitleItem(subtitleItem: ISubTitleItem, rawItem: any, index: number): ISubTitleItem | undefined;
5462
6510
  getDrmConfig(videoInfo: IVideoInfo): void;
6511
+ /**
6512
+ * 是否处于短剧 Minis 环境(通过剧 ID + 剧集 ID 获取视频)
6513
+ */
6514
+ get isMinisDramaMode(): boolean;
5463
6515
  init(): void;
5464
- initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
6516
+ initConfig(getVideoByToken: IPlayAuthTokenConfig, sourceConfigs?: IPlayerConfig): void;
6517
+ /**
6518
+ * 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
6519
+ */
6520
+ updateDramaEpisode(isNewVideo: boolean, candidateConfig?: IPlayerConfig): Promise<void>;
5465
6521
  /**
5466
6522
  * @description 更新playAuthToken
5467
6523
  * @param {IPlayAuthTokenConfig} getVideoByToken token信息
@@ -5584,9 +6640,7 @@ declare class PlayerData {
5584
6640
  * @brief 私有加密会话id
5585
6641
  */
5586
6642
  encryptSessionId?: string;
5587
- constructor(configs: IPlayerConfig & {
5588
- licensSupportModuleList: string[];
5589
- }, sdk: VePlayer);
6643
+ constructor(configs: IPlayerConfig, sdk: VePlayer);
5590
6644
  /**
5591
6645
  * 初始化播放数据
5592
6646
  * @param configs { IPlayerConfig } 播放器配置
@@ -5666,6 +6720,10 @@ declare class PlayerData {
5666
6720
  */
5667
6721
  get playDomain(): string;
5668
6722
  setVodTeaId(): void;
6723
+ /**
6724
+ * 基于当前配置生成合并后的候选配置,不修改当前播放状态。
6725
+ */
6726
+ getMergedConfigs(newConfigs: IPlayerConfig): IPlayerConfig;
5669
6727
  /**
5670
6728
  * 更新configs,即更新用户的configs,常用于playNext时
5671
6729
  * @param newConfigs {IPlayerConfig} 要更新的配置
@@ -5771,146 +6829,412 @@ export declare type PreloaderManager = {
5771
6829
  };
5772
6830
  declare enum PreloadScene {
5773
6831
  /** {zh}
5774
- * @brief 普通场景(手动执行预加载)
6832
+ * @brief 普通场景(手动执行预加载)
6833
+ */
6834
+ /** {en}
6835
+ * @brief Normal scenario (manual preload).
6836
+ */
6837
+ NORMAL = 0,
6838
+ /** {zh}
6839
+ * @brief Feed 流场景(播放器自动执行预加载)
6840
+ */
6841
+ /** {en}
6842
+ * @brief Feed scenario (player auto-preloads).
6843
+ */
6844
+ FEED = 1
6845
+ }
6846
+ declare enum PreloadFormat {
6847
+ MP4 = "mp4",
6848
+ HLS = "hls"
6849
+ }
6850
+ declare enum PreloaderStatus {
6851
+ /** {zh}
6852
+ * @brief 不可用
6853
+ */
6854
+ /** {en}
6855
+ * @brief Disabled.
6856
+ */
6857
+ DISABLED = 0,
6858
+ /** {zh}
6859
+ * @brief 初始状态
6860
+ */
6861
+ /** {en}
6862
+ * @brief Initializing.
6863
+ */
6864
+ INITIALIZING = 1,
6865
+ /** {zh}
6866
+ * @brief 已Ready
6867
+ */
6868
+ /** {en}
6869
+ * @brief Ready.
6870
+ */
6871
+ READY = 2,
6872
+ /** {zh}
6873
+ * @brief 加载失败
6874
+ */
6875
+ /** {en}
6876
+ * @brief Failed.
6877
+ */
6878
+ FAILED = 3
6879
+ }
6880
+ /** {zh}
6881
+ * 预加载配置更新
6882
+ * @detail Options
6883
+ * @hidden
6884
+ */
6885
+ /** {en}
6886
+ * @brief Preload configuration update.
6887
+ * @detail Options
6888
+ * @hidden
6889
+ */
6890
+ export declare type IPreloadUpdateConfig = {
6891
+ /** {zh}
6892
+ * @brief 向前加载视频个数
6893
+ */
6894
+ /** {en}
6895
+ * @brief Number of videos to load ahead.
6896
+ */
6897
+ prevCount?: number;
6898
+ /** {zh}
6899
+ * @brief 向后加载视频个数
6900
+ */
6901
+ /** {en}
6902
+ * @brief Number of videos to load behind.
6903
+ */
6904
+ nextCount?: number;
6905
+ };
6906
+ /** {zh}
6907
+ * 预加载视频资源
6908
+ * @detail Options
6909
+ */
6910
+ /** {en}
6911
+ * @brief Preload video resource.
6912
+ * @detail Options
6913
+ */
6914
+ export declare type IPreloadResolvedStream = {
6915
+ /** {zh}
6916
+ * @brief 视频 ID
6917
+ */
6918
+ /** {en}
6919
+ * @brief Unique video ID.
6920
+ */
6921
+ vid: string;
6922
+ /** {zh}
6923
+ * @brief 视频播放地址
6924
+ */
6925
+ /** {en}
6926
+ * @brief Playback URL.
6927
+ */
6928
+ url: string;
6929
+ /** {zh}
6930
+ * @brief 视频清晰度
6931
+ */
6932
+ /** {en}
6933
+ * @brief Video definition (resolution).
6934
+ */
6935
+ definition: string;
6936
+ /** {zh}
6937
+ * @brief 视频流类型,支持 mp4、hls
6938
+ */
6939
+ /** {en}
6940
+ * @brief Stream type; supports mp4 and hls.
6941
+ */
6942
+ streamType: string;
6943
+ /** {zh}
6944
+ * @brief 视频编码格式,当前仅支持 mp4
6945
+ */
6946
+ /** {en}
6947
+ * @brief Video codec; currently supports h264.
6948
+ */
6949
+ codec: string;
6950
+ /** {zh}
6951
+ * @brief 码率, 数据统计需要,选填
6952
+ */
6953
+ /** {en}
6954
+ * @brief Bitrate; optional, used for analytics.
6955
+ */
6956
+ bitrate: number;
6957
+ /** {zh}
6958
+ * @brief 视频时长,数据统计需要,选填
6959
+ */
6960
+ /** {en}
6961
+ * @brief Duration; optional, used for analytics.
6962
+ */
6963
+ duration: number;
6964
+ /** {zh}
6965
+ * @brief 视频大小,数据统计需要,选填
6966
+ */
6967
+ /** {en}
6968
+ * @brief File size; optional, used for analytics.
6969
+ */
6970
+ size: number;
6971
+ };
6972
+ export declare type IPreloadDramaStream = {
6973
+ vid?: string;
6974
+ albumId: string;
6975
+ episodeId: string;
6976
+ /** {zh}
6977
+ * @brief 默认清晰度,仅用于从完整媒体信息中选择预加载流。
6978
+ */
6979
+ /** {en}
6980
+ * @brief Default definition used only to select a preload stream from complete media information.
6981
+ */
6982
+ defaultDefinition?: string;
6983
+ /** {zh}
6984
+ * @brief Minis 短剧转码参数。
6985
+ */
6986
+ /** {en}
6987
+ * @brief Transcoding parameters for Minis short dramas.
6988
+ */
6989
+ transcodeParam?: ITranscodeParam;
6990
+ /** {zh}
6991
+ * @brief Vid 播放配置。短剧预加载会复用 playAuthToken 等配置请求短剧信息。
6992
+ */
6993
+ /** {en}
6994
+ * @brief Vid playback configuration reused by short-drama preload requests.
6995
+ */
6996
+ getVideoByToken?: IPlayAuthTokenConfig;
6997
+ };
6998
+ export declare type IPreloadAuthTokenStream = {
6999
+ vid?: string;
7000
+ defaultDefinition?: string;
7001
+ getVideoByToken: IPlayAuthTokenConfig;
7002
+ };
7003
+ /** {zh}
7004
+ * @brief 媒体信息预取源,支持 playAuthToken 和短剧剧集配置,不支持直接 URL。
7005
+ * @detail ref
7006
+ */
7007
+ /** {en}
7008
+ * @brief Media info prefetch source. Supports playAuthToken and short-drama episode configs, but not direct URLs.
7009
+ * @detail ref
7010
+ */
7011
+ export declare type IMediaInfoPrefetchSource = IPreloadAuthTokenStream | IPreloadDramaStream;
7012
+ /** {zh}
7013
+ * @brief 媒体信息预取成功结果。
7014
+ * @detail ref
7015
+ */
7016
+ /** {en}
7017
+ * @brief Successful media info prefetch result.
7018
+ * @detail ref
7019
+ */
7020
+ export declare type IMediaInfoPrefetchSuccess = {
7021
+ status: "fulfilled";
7022
+ source: IMediaInfoPrefetchSource;
7023
+ data: IGetMediaInfoCallbackPayload["data"];
7024
+ fromCache: boolean;
7025
+ };
7026
+ /** {zh}
7027
+ * @brief 媒体信息预取失败结果。
7028
+ * @detail ref
7029
+ */
7030
+ /** {en}
7031
+ * @brief Failed media info prefetch result.
7032
+ * @detail ref
7033
+ */
7034
+ export declare type IMediaInfoPrefetchFailure = {
7035
+ status: "rejected";
7036
+ source: IMediaInfoPrefetchSource;
7037
+ error: {
7038
+ code: number;
7039
+ message: string;
7040
+ };
7041
+ };
7042
+ /** {zh}
7043
+ * @brief 单个媒体信息预取结果。批量请求按输入顺序返回,单项失败不会中断其他项。
7044
+ * @detail ref
7045
+ */
7046
+ /** {en}
7047
+ * @brief Result for one media info prefetch item. Batch results preserve input order, and one failure does not interrupt other items.
7048
+ * @detail ref
7049
+ */
7050
+ export declare type IMediaInfoPrefetchResult = IMediaInfoPrefetchSuccess | IMediaInfoPrefetchFailure;
7051
+ export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
7052
+ /** {zh}
7053
+ * @list Options
7054
+ * @brief 字幕项。
7055
+ * @kind property
7056
+ */
7057
+ /** {en}
7058
+ * @list Options
7059
+ * @brief Subtitle item.
7060
+ * @kind property
7061
+ */
7062
+ export interface ISubTitleItem {
7063
+ /** {zh}
7064
+ * @brief 字幕语言。
7065
+ * @default -
5775
7066
  */
5776
7067
  /** {en}
5777
- * @brief Normal scenario (manual preload).
7068
+ * @brief Subtitle language.
7069
+ * @default -
5778
7070
  */
5779
- NORMAL = 0,
7071
+ language?: string | number;
5780
7072
  /** {zh}
5781
- * @brief Feed 流场景(播放器自动执行预加载)
7073
+ * @brief 字幕 ID。
7074
+ * @default -
5782
7075
  */
5783
7076
  /** {en}
5784
- * @brief Feed scenario (player auto-preloads).
7077
+ * @brief Subtitle ID.
7078
+ * @default -
5785
7079
  */
5786
- FEED = 1
5787
- }
5788
- declare enum PreloadFormat {
5789
- MP4 = "mp4",
5790
- HLS = "hls"
5791
- }
5792
- declare enum PreloaderStatus {
7080
+ id?: number | string;
5793
7081
  /** {zh}
5794
- * @brief 不可用
7082
+ * @brief 是否为默认选择的字幕。
7083
+ * @default false
5795
7084
  */
5796
7085
  /** {en}
5797
- * @brief Disabled.
7086
+ * @brief Whether this is the default selected subtitle.
7087
+ * @default false
5798
7088
  */
5799
- DISABLED = 0,
7089
+ isDefault?: boolean;
5800
7090
  /** {zh}
5801
- * @brief 初始状态
7091
+ * @brief 字幕名称。
7092
+ * @default -
5802
7093
  */
5803
7094
  /** {en}
5804
- * @brief Initializing.
7095
+ * @brief Subtitle display name.
7096
+ * @default -
5805
7097
  */
5806
- INITIALIZING = 1,
7098
+ text?: string;
5807
7099
  /** {zh}
5808
- * @brief 已Ready
7100
+ * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
7101
+ * @default -
5809
7102
  */
5810
7103
  /** {en}
5811
- * @brief Ready.
7104
+ * @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
7105
+ * @default -
5812
7106
  */
5813
- READY = 2,
7107
+ label?: string | number;
5814
7108
  /** {zh}
5815
- * @brief 加载失败
7109
+ * @brief 外挂字幕 URL 地址。
7110
+ * @default -
5816
7111
  */
5817
7112
  /** {en}
5818
- * @brief Failed.
5819
- */
5820
- FAILED = 3
5821
- }
5822
- /** {zh}
5823
- * 预加载配置更新
5824
- * @detail Options
5825
- * @hidden
5826
- */
5827
- /** {en}
5828
- * @brief Preload configuration update.
5829
- * @detail Options
5830
- * @hidden
5831
- */
5832
- export declare type IPreloadUpdateConfig = {
5833
- /** {zh}
5834
- * @brief 向前加载视频个数
7113
+ * @brief External subtitle URL.
7114
+ * @default -
5835
7115
  */
5836
- /** {en}
5837
- * @brief Number of videos to load ahead.
7116
+ url?: string;
7117
+ /**
7118
+ * @hidden
7119
+ * @type {string}
7120
+ * @memberof ISubTitleItem
5838
7121
  */
5839
- prevCount?: number;
7122
+ stringContent?: string;
5840
7123
  /** {zh}
5841
- * @brief 向后加载视频个数
7124
+ * @brief 字幕内容列表。非 `url` 形式时使用。
7125
+ * @default -
7126
+ * @type {Array<Object>}
7127
+ * @memberof ISubTitleItem
5842
7128
  */
5843
7129
  /** {en}
5844
- * @brief Number of videos to load behind.
7130
+ * @brief Subtitle content list when not using URL.
7131
+ * @default -
7132
+ * @type {Array<Object>}
7133
+ * @memberof ISubTitleItem
5845
7134
  */
5846
- nextCount?: number;
5847
- };
7135
+ list?: IListItem[];
7136
+ }
5848
7137
  /** {zh}
5849
- * 预加载视频资源
5850
- * @detail Options
7138
+ * @brief 字幕内容项。
7139
+ * @list Options
7140
+ * @kind property
7141
+ * @export
7142
+ * @interface IListItem
5851
7143
  */
5852
7144
  /** {en}
5853
- * @brief Preload video resource.
5854
- * @detail Options
7145
+ * @brief Subtitle content item.
7146
+ * @list Options
7147
+ * @kind property
7148
+ * @export
7149
+ * @interface IListItem
5855
7150
  */
5856
- export declare type IPreloadStream = {
7151
+ export interface IListItem {
5857
7152
  /** {zh}
5858
- * @brief 视频 ID
7153
+ * @brief 开始时间,单位为秒。
7154
+ * @type {number}
5859
7155
  */
5860
7156
  /** {en}
5861
- * @brief Unique video ID.
7157
+ * @brief Start time in seconds.
7158
+ * @type {number}
5862
7159
  */
5863
- vid: string;
7160
+ start: number;
5864
7161
  /** {zh}
5865
- * @brief 视频播放地址
7162
+ * @brief 结束时间,单位为秒。
7163
+ * @type {number}
5866
7164
  */
5867
7165
  /** {en}
5868
- * @brief Playback URL.
7166
+ * @brief End time in seconds.
7167
+ * @type {number}
5869
7168
  */
5870
- url: string;
7169
+ end: number;
5871
7170
  /** {zh}
5872
- * @brief 视频清晰度
7171
+ * @brief 字幕数据列表。
7172
+ * @type {Array<ITextItem>}
5873
7173
  */
5874
7174
  /** {en}
5875
- * @brief Video definition (resolution).
7175
+ * @brief Subtitle cue data list.
7176
+ * @type {Array<ITextItem>}
5876
7177
  */
5877
- definition: string;
5878
- /** {zh}
5879
- * @brief 视频流类型,支持 mp4、hls
7178
+ list: Array<ITextItem>;
7179
+ /**
7180
+ * @hidden
7181
+ * @type {any}
5880
7182
  */
5881
- /** {en}
5882
- * @brief Stream type; supports mp4 and hls.
7183
+ [propName: string]: any;
7184
+ }
7185
+ /** {zh}
7186
+ * @brief 字幕文案配置。
7187
+ * @list Options
7188
+ * @kind property
7189
+ */
7190
+ /** {en}
7191
+ * @brief Subtitle text item configuration.
7192
+ * @list Options
7193
+ * @kind property
7194
+ */
7195
+ export interface ITextItem {
7196
+ /**
7197
+ * @hidden
7198
+ * @type {any}
5883
7199
  */
5884
- streamType: string;
7200
+ [propName: string]: any;
5885
7201
  /** {zh}
5886
- * @brief 视频编码格式,当前仅支持 mp4
7202
+ * @brief 开始时间,单位为秒。
7203
+ * @type {number}
5887
7204
  */
5888
7205
  /** {en}
5889
- * @brief Video codec; currently supports h264.
7206
+ * @brief Start time in seconds.
7207
+ * @type {number}
5890
7208
  */
5891
- codec: string;
7209
+ start: number;
5892
7210
  /** {zh}
5893
- * @brief 码率, 数据统计需要,选填
7211
+ * @brief 结束时间,单位为秒。
7212
+ * @type {number}
5894
7213
  */
5895
7214
  /** {en}
5896
- * @brief Bitrate; optional, used for analytics.
7215
+ * @brief End time in seconds.
7216
+ * @type {number}
5897
7217
  */
5898
- bitrate: number;
7218
+ end: number;
5899
7219
  /** {zh}
5900
- * @brief 视频时长,数据统计需要,选填
7220
+ * @brief 字幕文案数组。
7221
+ * @type {string[]}
5901
7222
  */
5902
7223
  /** {en}
5903
- * @brief Duration; optional, used for analytics.
7224
+ * @brief Subtitle text array.
7225
+ * @type {string[]}
5904
7226
  */
5905
- duration: number;
7227
+ text: string[];
5906
7228
  /** {zh}
5907
- * @brief 视频大小,数据统计需要,选填
7229
+ * @brief 字幕顺序。
7230
+ * @type {number}
5908
7231
  */
5909
7232
  /** {en}
5910
- * @brief File size; optional, used for analytics.
7233
+ * @brief Subtitle display order.
7234
+ * @type {number}
5911
7235
  */
5912
- size: number;
5913
- };
7236
+ index?: number;
7237
+ }
5914
7238
  export type TLogChannel = "cn" | "va" | "sg";
5915
7239
  /** {zh}
5916
7240
  * @hidden
@@ -6148,8 +7472,8 @@ export declare type StrategyInitOptions = {
6148
7472
  Module?: typeof VeStrategy;
6149
7473
  };
6150
7474
  declare class VeStrategyManager {
6151
- tea: Collector;
6152
- private static mapStrategyNameToUmdKey;
7475
+ tea: InstanceType<CollectorConstructor> | undefined;
7476
+ private collector;
6153
7477
  teaId: number;
6154
7478
  teaChannel: TLogChannel;
6155
7479
  private sdkUmdLoader;
@@ -6209,6 +7533,79 @@ export interface ILicenseConfig {
6209
7533
  expireDiffTime?: number;
6210
7534
  expireCallback?: (expireDiffTime?: number) => void;
6211
7535
  }
7536
+ export declare type MediaInfoCacheType = "memory" | "localStorage";
7537
+ /** {zh}
7538
+ * @brief 媒体信息本地缓存配置。
7539
+ * @list Options
7540
+ * @kind property
7541
+ */
7542
+ /** {en}
7543
+ * @brief Local media info cache config.
7544
+ * @list Options
7545
+ * @kind property
7546
+ */
7547
+ export interface MediaInfoCacheConfig {
7548
+ /** {zh}
7549
+ * @brief 是否启用媒体信息本地缓存。默认关闭。
7550
+ * @default false
7551
+ */
7552
+ /** {en}
7553
+ * @brief Whether to enable local media info cache. Disabled by default.
7554
+ * @default false
7555
+ */
7556
+ enable?: boolean;
7557
+ /** {zh}
7558
+ * @brief 缓存方式。默认使用内存缓存,设置为 localStorage 时写入浏览器本地存储。
7559
+ * @default memory
7560
+ */
7561
+ /** {en}
7562
+ * @brief Cache storage type. Memory cache is used by default. Set to localStorage to write browser local storage.
7563
+ * @default memory
7564
+ */
7565
+ cacheType?: MediaInfoCacheType;
7566
+ /** {zh}
7567
+ * @brief 缓存过期时间,单位毫秒。默认 30 分钟。
7568
+ * @default 1800000
7569
+ */
7570
+ /** {en}
7571
+ * @brief Cache expiration time in milliseconds. Defaults to 30 minutes.
7572
+ * @default 1800000
7573
+ */
7574
+ expireTime?: number;
7575
+ /** {zh}
7576
+ * @brief 最多缓存的媒体信息条数,默认 100。
7577
+ * @default 100
7578
+ */
7579
+ /** {en}
7580
+ * @brief Maximum number of media info entries to cache. Defaults to 100.
7581
+ * @default 100
7582
+ */
7583
+ maxEntries?: number;
7584
+ }
7585
+ export declare type NormalizedMediaInfoCacheConfig = {
7586
+ enable: boolean;
7587
+ expireTime: number;
7588
+ cacheType: MediaInfoCacheType;
7589
+ maxEntries: number;
7590
+ };
7591
+ declare function getMediaInfoCacheConfig(): NormalizedMediaInfoCacheConfig;
7592
+ export interface DramaIdentity {
7593
+ albumId: string | null;
7594
+ episodeId: string | null;
7595
+ }
7596
+ export declare type PlayerPlaybackState = "creating" | "ready" | "playing" | "paused" | "buffering" | "ended" | "error" | "destroyed";
7597
+ export interface PlayerPlaybackStateSnapshot extends DramaIdentity {
7598
+ playbackSessionId: string;
7599
+ playbackState: PlayerPlaybackState;
7600
+ isEnded: boolean;
7601
+ isPaused: boolean;
7602
+ isBeforePlayerCreate: boolean;
7603
+ duration: number;
7604
+ currentTime: number;
7605
+ }
7606
+ export interface IdentitySwitchTransaction {
7607
+ readonly settled: Promise<void>;
7608
+ }
6212
7609
  /** {zh}
6213
7610
  * @hidden
6214
7611
  */
@@ -6229,24 +7626,51 @@ export declare type PlayerCore = Player & {
6229
7626
  licenseType: LicenseEdition;
6230
7627
  };
6231
7628
  };
6232
- /**
7629
+ /** {zh}
6233
7630
  * @brief 加密混淆信息
7631
+ * @hidden
7632
+ */
7633
+ /** {en}
7634
+ * @brief Encrypted obfuscation information
7635
+ * @hidden
6234
7636
  */
6235
7637
  export interface EncryptInfo {
6236
- /**
7638
+ /** {zh}
6237
7639
  * @breif 会话ID
6238
7640
  */
7641
+ /** {en}
7642
+ * @brief Session ID
7643
+ */
6239
7644
  sessionId: string;
6240
- /**
7645
+ /** {zh}
6241
7646
  * @brief 混淆后的公钥
6242
7647
  */
6243
- drmKeK: string;
7648
+ /** {en}
7649
+ * @brief Encrypted public key
7650
+ */
7651
+ drmKeK: string;
7652
+ /** {zh}
7653
+ * @breif 唯一身份信息
7654
+ */
7655
+ /** {en}
7656
+ * @brief Unique identity information
7657
+ */
7658
+ unionInfo: string;
7659
+ }
7660
+ declare class VePlayer {
7661
+ /** {zh}
7662
+ * @brief 供 JSSDK 门面查询当前播放器播放状态。
7663
+ * @hidden
7664
+ */
7665
+ /** {en}
7666
+ * @brief Returns the current player playback state for the JSSDK facade.
7667
+ * @hidden
7668
+ */
7669
+ static getPlayerPlaybackState(): PlayerPlaybackStateSnapshot | null;
6244
7670
  /**
6245
- * @breif 唯一身份信息
7671
+ * 注册业务已打包的 UMD 模块,供所有后续创建的播放器共享使用。
6246
7672
  */
6247
- unionInfo: string;
6248
- }
6249
- declare class VePlayer {
7673
+ static registerModules(modules: UmdModules): void;
6250
7674
  /** {zh}
6251
7675
  * @brief 播放相关配置数据
6252
7676
  * @hidden
@@ -6330,6 +7754,18 @@ declare class VePlayer {
6330
7754
  private _suppressAudioTrackMemoryTimer;
6331
7755
  /** playNext 后置为 true,直到新视频首个 addtrack 到达前屏蔽旧视频 change 事件的干扰 */
6332
7756
  private _playNextPending;
7757
+ /**
7758
+ * @hidden
7759
+ * createPlayer 阶段耗时采集器(仅在 createPlayer 执行期间存在)
7760
+ */
7761
+ _createPlayerPerf?: CreatePlayerPerfCollector;
7762
+ /**
7763
+ * @hidden
7764
+ * 最近一次 createPlayer 性能报告
7765
+ */
7766
+ private _lastCreatePlayerPerfReport?;
7767
+ private _isCollectingCreatePlayerPerf;
7768
+ private _getDramaInfoPerfRecords;
6333
7769
  /**
6334
7770
  *
6335
7771
  *
@@ -6372,6 +7808,22 @@ declare class VePlayer {
6372
7808
  * @memberof VePlayer
6373
7809
  */
6374
7810
  delayError: any[];
7811
+ /** {zh}
7812
+ * @brief 设置是否为通过短剧信息或 playAuthToken 获取到的视频地址追加时间戳 query(t=Date.now())。
7813
+ * @param enable true=追加时间戳,false=不追加
7814
+ */
7815
+ /** {en}
7816
+ * @brief Set whether to append a timestamp query (t=Date.now()) to video URLs from drama info or playAuthToken.
7817
+ * @param enable true=append timestamp, false=do not append
7818
+ */
7819
+ static setAppendVideoUrlTimestamp(enable?: boolean): void;
7820
+ /** {zh}
7821
+ * @hidden
7822
+ */
7823
+ /** {en}
7824
+ * @hidden
7825
+ */
7826
+ static getAppendVideoUrlTimestamp(): boolean;
6375
7827
  /**
6376
7828
  * @hidden
6377
7829
  * umd加载器
@@ -6387,22 +7839,113 @@ declare class VePlayer {
6387
7839
  /**
6388
7840
  * @hidden
6389
7841
  */
6390
- static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
6391
7842
  /**
6392
7843
  * @hidden
6393
7844
  */
6394
7845
  static veStrategy: typeof VeStrategy;
6395
- /**
7846
+ /** {zh}
6396
7847
  * @brief SDK 版本
6397
7848
  * @type {*}
6398
7849
  * @memberof VePlayer
6399
7850
  */
7851
+ /** {en}
7852
+ * @brief SDK version
7853
+ * @type {*}
7854
+ * @memberof VePlayer
7855
+ */
6400
7856
  static sdkVersion: string;
7857
+ /**
7858
+ * @brief TT短剧环境配置
7859
+ * @type {ITTDramaEnv | null}
7860
+ * @memberof VePlayer
7861
+ */
7862
+ static ttDramaEnv: ITTDramaEnv | null;
7863
+ /** {zh}
7864
+ * @brief 设置TT短剧播放环境
7865
+ * @param env 短剧环境配置,详情见{@link ITTDramaEnv}
7866
+ */
7867
+ static setTTDramaEnv(env: ITTDramaEnv): void;
7868
+ /** {zh}
7869
+ * @brief 设置媒体信息本地缓存配置,默认关闭。开启后,通过短剧信息或 playAuthToken 获取媒体信息时优先使用缓存。
7870
+ * @param config 缓存配置
7871
+ */
7872
+ /** {en}
7873
+ * @brief Set the local media info cache config. It is disabled by default. When enabled, media info from drama info or playAuthToken prefers cached data.
7874
+ * @param config Cache config
7875
+ */
7876
+ static setMediaInfoCacheConfig(config: MediaInfoCacheConfig): void;
7877
+ /** {zh}
7878
+ * @brief 获取当前媒体信息本地缓存配置。
7879
+ * @returns 当前媒体信息缓存配置。
7880
+ */
7881
+ /** {en}
7882
+ * @brief Get current local media info cache config.
7883
+ * @returns Current media info cache config.
7884
+ */
7885
+ static getMediaInfoCacheConfig(): ReturnType<typeof getMediaInfoCacheConfig>;
7886
+ /** {zh}
7887
+ * @brief 清除媒体信息缓存,会同时清除内存缓存和 localStorage 缓存。
7888
+ */
7889
+ /** {en}
7890
+ * @brief Clear media info cache from both memory cache and localStorage cache.
7891
+ */
7892
+ static clearMediaInfoCache(): void;
7893
+ /** {zh}
7894
+ * @brief 提前请求并缓存 playAuthToken 或短剧剧集的媒体信息,不下载视频数据。批量结果与输入顺序一致,单项失败不会中断其他项。
7895
+ * @list Api
7896
+ * @param sources 媒体信息预取源列表,详情见 {@link IMediaInfoPrefetchSource}。
7897
+ * @returns 每项媒体信息的成功或失败结果,详情见 {@link IMediaInfoPrefetchResult}。
7898
+ * @example
7899
+ * ``` javascript
7900
+ * const results = await VePlayer.prefetchMediaInfo([
7901
+ * { getVideoByToken: { playAuthToken } },
7902
+ * { albumId: 'album-id', episodeId: 'episode-id' }
7903
+ * ]);
7904
+ * ```
7905
+ */
7906
+ /** {en}
7907
+ * @brief Request and cache media information for playAuthToken or short-drama episodes without downloading video data. Batch results preserve input order, and one failure does not interrupt other items.
7908
+ * @list Api
7909
+ * @param sources Media info prefetch sources. See {@link IMediaInfoPrefetchSource}.
7910
+ * @returns A success or failure result for each source. See {@link IMediaInfoPrefetchResult}.
7911
+ * @example
7912
+ * ``` javascript
7913
+ * const results = await VePlayer.prefetchMediaInfo([
7914
+ * { getVideoByToken: { playAuthToken } },
7915
+ * { albumId: 'album-id', episodeId: 'episode-id' }
7916
+ * ]);
7917
+ * ```
7918
+ */
7919
+ static prefetchMediaInfo(sources: IMediaInfoPrefetchSource[]): Promise<IMediaInfoPrefetchResult[]>;
7920
+ /** {zh}
7921
+ * @brief 设置全局日志开关。开启后会输出 VE_DEBUG.log 级别日志。
7922
+ * @param enable 是否开启详细日志
7923
+ */
7924
+ /** {en}
7925
+ * @brief Set the global log switch. When enabled, VE_DEBUG.log level logs are printed.
7926
+ * @param enable Whether to enable verbose logs
7927
+ */
7928
+ static setDebug(enable: boolean): void;
7929
+ /** {zh}
7930
+ * @brief 设置可选的 Tea Collector 构造函数。传入 undefined 可清除后续实例的注册。
7931
+ * @param Collector Tea Collector 构造函数
7932
+ */
7933
+ /** {en}
7934
+ * @brief Set the optional Tea Collector constructor. Pass undefined to clear it for subsequent instances.
7935
+ * @param Collector Tea Collector constructor
7936
+ */
7937
+ static setCollector(Collector?: CollectorConstructor): void;
7938
+ /** @hidden 短剧 Minis 环境与 Lite 构建均不执行 License 校验。 */
7939
+ private static shouldCheckLicense;
6401
7940
  /**
6402
7941
  * @hidden
6403
7942
  */
6404
7943
  private veErrorIns;
6405
7944
  private vodLogCommon;
7945
+ private _publicPlayNextOperation;
7946
+ private _sourceSwitchAborters?;
7947
+ private _lifecycleGeneration;
7948
+ private _playerRebuildListener?;
6406
7949
  /** {zh}
6407
7950
  * @brief 播放策略预初始化配置
6408
7951
  * @param options 初始化配置,详情见{@link StrategyInitOptions}
@@ -6447,7 +7990,7 @@ declare class VePlayer {
6447
7990
  /** {en}
6448
7991
  * @brief Add videos to the preload list.
6449
7992
  */
6450
- static addPreloadList(list: IPreloadStream[]): void;
7993
+ static addPreloadList(list: IPreloadStream[]): Promise<void>;
6451
7994
  /** {zh}
6452
7995
  * @brief 设置待预加载视频列表,替换当前已设置的待预加载列表
6453
7996
  * @param list 待预加载视频列表,详情见{@link IPreloadStream[]}
@@ -6468,9 +8011,7 @@ declare class VePlayer {
6468
8011
  * @param codec
6469
8012
  * @param options
6470
8013
  */
6471
- static isRTMSupportCodec: (codec: RTMCodec, options: {
6472
- targetProfileLevel?: string;
6473
- }) => Promise<boolean>;
8014
+ static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
6474
8015
  static setLicenseConfig(config: ILicenseConfig): Promise<void>;
6475
8016
  static checkLicense(): Promise<LicenseEdition>;
6476
8017
  static checkModuleList(): Promise<string[]>;
@@ -6505,6 +8046,8 @@ declare class VePlayer {
6505
8046
  * @brief Constructor.
6506
8047
  */
6507
8048
  constructor(configs: IPlayerConfig);
8049
+ /** @hidden */
8050
+ assertLiteConfig(config?: Partial<IPlayerConfig>): void;
6508
8051
  /**
6509
8052
  *
6510
8053
  * @hidden
@@ -6646,7 +8189,8 @@ declare class VePlayer {
6646
8189
  * @return {*}
6647
8190
  * @memberof VePlayer
6648
8191
  */
6649
- createPlayer: () => Promise<PlayerCore>;
8192
+ createPlayer: (transaction?: IdentitySwitchTransaction) => Promise<any>;
8193
+ private _createPlayer;
6650
8194
  private checkLicenseCallback;
6651
8195
  /** {zh}
6652
8196
  * @hidden
@@ -6723,6 +8267,28 @@ declare class VePlayer {
6723
8267
  * @memberof VePlayer
6724
8268
  */
6725
8269
  beforePlayerCreate(): Promise<void>;
8270
+ /** {zh}
8271
+ * @hidden
8272
+ * @brief 获取最近一次 createPlayer 的性能报告。
8273
+ */
8274
+ /** {en}
8275
+ * @hidden
8276
+ * @brief Get the perf report of the latest createPlayer.
8277
+ */
8278
+ getCreatePlayerPerfReport(): ICreatePlayerPerfReport;
8279
+ /**
8280
+ * @brief 记录一次 JSB getDramaInfo 返回的客户端耗时信息。
8281
+ */
8282
+ recordGetDramaInfoPerf(payload: IGetDramaInfoPerfCallbackPayload): void;
8283
+ /**
8284
+ * @brief 获取当前播放器实例记录到的 getDramaInfo 客户端耗时列表。
8285
+ */
8286
+ getDramaInfoPerfRecords(): IGetDramaInfoPerfCallbackPayload[];
8287
+ /**
8288
+ * @brief 获取最近一次 getDramaInfo 客户端耗时。
8289
+ */
8290
+ getLastDramaInfoPerf(): IGetDramaInfoPerfCallbackPayload | undefined;
8291
+ private _markGetDramaInfoClientPerf;
6726
8292
  private prepareStrategies;
6727
8293
  /**
6728
8294
  * @hidden
@@ -6768,7 +8334,10 @@ declare class VePlayer {
6768
8334
  * @return {*}
6769
8335
  * @memberof VePlayer
6770
8336
  */
8337
+ private _onPlayerRebuild;
8338
+ private _getPlayerRebuildListener;
6771
8339
  private _bindPlayerEvents;
8340
+ private _onMp4PreloadInfo;
6772
8341
  private _proxyError;
6773
8342
  private _onError;
6774
8343
  /** {zh}
@@ -6778,10 +8347,14 @@ declare class VePlayer {
6778
8347
  * @private
6779
8348
  */
6780
8349
  private _onMediaExpiredAction;
6781
- /**
8350
+ /** {zh}
6782
8351
  * @brief 更新播放源。您可在视频播放地址过期前调用此方法更新地址及过期时间戳。
6783
8352
  * @param source 播放源配置。详见 [SourceConfig](1248901#sourceconfig)。支持传入视频播放地址 `url`、播放列表 `playList` 或者 `vid` 和 `playAuthToken`,还需包含新地址的过期时间戳 `urlExpireTimestamp`。
6784
8353
  */
8354
+ /** {en}
8355
+ * @brief Update the media source. You can call this method to update the address and expiration timestamp before the video playback address expires.
8356
+ * @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.
8357
+ */
6785
8358
  updateMediaSource(source: SourceConfig): Promise<void>;
6786
8359
  /** {zh}
6787
8360
  * @hidden
@@ -6879,6 +8452,8 @@ declare class VePlayer {
6879
8452
  * @memberof VePlayer
6880
8453
  */
6881
8454
  switchAuthToken(config: IPlayAuthTokenConfig, isNewVideo?: boolean): Promise<void>;
8455
+ private _switchAuthToken;
8456
+ private _performAuthTokenSwitch;
6882
8457
  /** {zh}
6883
8458
  * @brief 更新临时播放 Token。
6884
8459
  * @memberof VePlayer
@@ -6936,13 +8511,14 @@ declare class VePlayer {
6936
8511
  * @memberof VePlayer
6937
8512
  */
6938
8513
  next(config: IPlayerConfig, isNewVideo?: boolean): Promise<void>;
8514
+ private _next;
6939
8515
  /** {zh}
6940
8516
  * @brief 播放下一视频。
6941
8517
  * @return{Promise<any>}
6942
8518
  * @memberof VePlayer
6943
8519
  * @notes - 成功更换视频源后,默认是暂停状态。如果设置了自动播放,则会自动播放。
6944
8520
  * - 此接口不支持切换火山引擎私有加密视频。
6945
- * @param config 播放器实例化配置。此接口仅支持 `IPlayerConfig` 中的 `url`、`playList`、`poster`、`getVideoByToken` 字段。。
8521
+ * @param config 播放器实例化配置
6946
8522
  * @param isNewVideo 是否为新视频。为 `false` 时,更换后,会从更换前的时间点继续播放。
6947
8523
  */
6948
8524
  /** {en}
@@ -6951,7 +8527,25 @@ declare class VePlayer {
6951
8527
  * @memberof VePlayer
6952
8528
  */
6953
8529
  playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
8530
+ private _createPlayNextInProgressError;
8531
+ private _registerSourceSwitchAborter;
8532
+ private _abortSourceSwitches;
8533
+ private _runDestroyableSourceSwitch;
8534
+ private _createDestroyedPlaybackSwitchError;
8535
+ private _isDestroyedPlaybackSwitchError;
8536
+ private _isStaleLifecycleGeneration;
8537
+ private _cancelStalePlayerCreation;
8538
+ private _discardStalePlayer;
8539
+ private updatePlayNextSubtitleConfig;
6954
8540
  private _playNext;
8541
+ private _applyIncomingIdentityAliases;
8542
+ private _createDramaPlayNextCandidateConfig;
8543
+ /** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
8544
+ private _getDramaConfigPatchForPlayer;
8545
+ private _buildDramaInvalidParamError;
8546
+ private _getDramaAlbumIdFromConfig;
8547
+ private _getDramaEpisodeIdFromConfig;
8548
+ private switchDramaEpisode;
6955
8549
  /** {zh}
6956
8550
  * @brief 销毁xgplayer实例
6957
8551
  *
@@ -7032,6 +8626,8 @@ declare class VePlayer {
7032
8626
  * @notes 每项包含 `id`、`name`、`lang`、`channels`、`default`、`selected` 字段;轨道数量 ≤ 1 时返回空数组。
7033
8627
  */
7034
8628
  /** {en}
8629
+ * @brief Get the audio track list. For HLS, tracks come from hls.js; on iOS native playback, from `HTMLMediaElement.audioTracks`.
8630
+ * @notes Each item includes `id`, `name`, `lang`, `channels`, `default`, and `selected`. Returns an empty array when there is at most one track.
7035
8631
  */
7036
8632
  getAudioTracks(): AudioTrackInfo[];
7037
8633
  /** {zh}
@@ -7039,18 +8635,20 @@ declare class VePlayer {
7039
8635
  * @notes HLS 流通过 hls.js 获取,iOS 原生播放通过 HTMLMediaElement.audioTracks 获取;无激活轨道时返回 null。
7040
8636
  */
7041
8637
  /** {en}
8638
+ * @brief Get the currently active audio track.
8639
+ * @notes For HLS, from hls.js; on iOS native playback, from `HTMLMediaElement.audioTracks`. Returns `null` when no track is active.
7042
8640
  */
7043
8641
  getCurrentAudioTrack(): AudioTrackInfo | null;
7044
8642
  /** {zh}
7045
8643
  * @brief 切换音频轨道。
7046
- * @param id 目标轨道的 id,可通过 `getAudioTracks()` 获取。
7047
- * @param lang 目标轨道的语言代码(BCP-47)。若提供,则 id 与 lang 同时匹配时才执行切换,
7048
- * 可用于 iOS 原生 audioTracks 中存在重复 id 的场景。
8644
+ * @param track 目标音轨对象,可通过 `getAudioTracks()` 获取。
7049
8645
  * @notes 切换完成后会触发 `Events.AUDIO_TRACK_CHANGE` 事件;
7050
8646
  * 同时 PC 端和移动端音频轨道插件的选中状态会自动更新。
7051
8647
  */
7052
8648
  /** {en}
7053
8649
  * @brief Switch audio track.
8650
+ * @param track Target audio track object from `getAudioTracks()`.
8651
+ * @notes Emits `Events.AUDIO_TRACK_CHANGE` when done. PC and mobile audio track plugins update selection automatically.
7054
8652
  */
7055
8653
  switchAudioTrack(track: AudioTrackInfo): void;
7056
8654
  /** {zh}
@@ -7298,8 +8896,41 @@ declare class VePlayer {
7298
8896
  */
7299
8897
  getPlugin(pluginName: string): null | BasePlugin;
7300
8898
  /** {zh}
8899
+ * @brief 获取字幕列表。需配置 `Subtitle` 插件后调用。
8900
+ * @return 当前字幕列表,每项包含 `id`、`language`、`text`(显示名称)等字段。列表为空时返回空数组。
7301
8901
  * @memberof VePlayer
8902
+ */
8903
+ getSubtitleList(): ISubTitleItem[];
8904
+ /** {zh}
8905
+ * @brief 切换字幕。需配置 `Subtitle` 插件后调用。
8906
+ * @param subtitle 目标字幕的 id 或 language,任意一个非空即可定位字幕项。
8907
+ * @return 切换成功时 resolve,失败(未找到、切换被中止)时 reject。
8908
+ * @memberof VePlayer
8909
+ */
8910
+ switchSubtitle(subtitle: {
8911
+ id?: string | number;
8912
+ language?: string | number;
8913
+ }): Promise<void>;
8914
+ /** {zh}
8915
+ * @brief 开启字幕展示。恢复上次选中的字幕项;若从未选中过则默认选第一项。需配置 `Subtitle` 插件后调用。
8916
+ * @memberof VePlayer
8917
+ */
8918
+ showSubtitle(): void;
8919
+ /** {zh}
8920
+ * @brief 关闭字幕展示。字幕数据保留,可通过 `showSubtitle` 重新开启。需配置 `Subtitle` 插件后调用。
8921
+ * @memberof VePlayer
8922
+ */
8923
+ hideSubtitle(): void;
8924
+ /** {zh}
8925
+ * @hidden
8926
+ */
8927
+ /** {en}
8928
+ * @hidden
8929
+ */
8930
+ private _teardown;
8931
+ /** {zh}
7302
8932
  * @brief 销毁当前播放器实例。
8933
+ * @memberof VePlayer
7303
8934
  */
7304
8935
  /** {en}
7305
8936
  * @brief Destroy the current player instance.
@@ -7721,344 +9352,242 @@ export declare class MirrorPlugin extends Plugin {
7721
9352
  destroy(): void;
7722
9353
  render(): string;
7723
9354
  }
7724
- export declare type InfoItem = {
7725
- key: string;
7726
- label: string;
7727
- labelTextKey?: string;
7728
- value?: any;
7729
- render?: (key: any) => string;
7730
- type?: string;
7731
- dom?: Element;
7732
- };
7733
- /**
7734
- * 直播信息面板
7735
- */
7736
- export declare class LiveInfoPanel extends Plugin {
7737
- private _pollTimer;
7738
- private _infoItems;
7739
- static get pluginName(): string;
7740
- static get defaultConfig(): {
7741
- visible: boolean;
7742
- showH265Info: boolean;
7743
- };
7744
- get streamType(): any;
7745
- afterCreate(): void;
7746
- registerLanguageTexts(): {
7747
- DECODEFPS: {
7748
- en: string;
7749
- zh: string;
7750
- };
7751
- DECODECOST: {
7752
- en: string;
7753
- zh: string;
7754
- };
7755
- FORMAT: {
7756
- en: string;
7757
- zh: string;
7758
- };
7759
- FPS: {
7760
- en: string;
7761
- zh: string;
7762
- };
7763
- BITRATE: {
7764
- en: string;
7765
- zh: string;
7766
- };
7767
- GOP: {
7768
- en: string;
7769
- zh: string;
7770
- };
7771
- RESOLUTION: {
7772
- en: string;
7773
- zh: string;
7774
- };
7775
- ENCODETYPE: {
7776
- en: string;
7777
- zh: string;
7778
- };
7779
- BUFFEREND: {
7780
- en: string;
7781
- zh: string;
7782
- };
7783
- CURRENTTIME: {
7784
- en: string;
7785
- zh: string;
7786
- };
7787
- };
7788
- _getDefaultInfo(data: any): Record<string, InfoItem>;
7789
- _init(): void;
7790
- _getStats(): any;
7791
- _getInfoListData(): Record<string, InfoItem>;
7792
- _initDom(infoItems: any): any;
7793
- _updateTitle(rowDom: Element, item: InfoItem): void;
7794
- _updateDom(rowdom: Element, newItem: InfoItem): void;
7795
- _renderLabel(item: InfoItem): any;
7796
- _renderValue(item: InfoItem): any;
7797
- _handleDataChange(): void;
7798
- _tick(): void;
7799
- _poll(): void;
7800
- destroy(): void;
7801
- _handleError(): void;
7802
- _handleLoadedData(): void;
7803
- _open(): void;
7804
- _close(): void;
7805
- open(): void;
7806
- close(): void;
7807
- render(): string;
7808
- }
7809
9355
  export declare const Events: {
7810
9356
  /** {zh}
7811
- * @brief 弹幕配置发生变化。
7812
- */
7813
- /** {en}
7814
- * @brief Triggered when danmu (bullet comment) configuration changes.
7815
- */
7816
- DANMU_CHANGE: string;
7817
- /** {zh}
7818
- * @hidden
7819
- */
7820
- /** {en}
7821
- * @hidden
7822
- */
7823
- TIME_SHIFT_CHANGE: string;
7824
- /** {zh}
7825
- * @hidden
7826
- */
7827
- /** {en}
7828
- * @hidden
7829
- */
7830
- AI_SUBTITLE_LANG_CHANGE: string;
7831
- /** {zh}
7832
- * @hidden
9357
+ * @brief 自动播放成功。
7833
9358
  */
7834
9359
  /** {en}
7835
- * @hidden
9360
+ * @brief Triggered when autoplay succeeds.
7836
9361
  */
7837
- AI_SUBTITLE_MATCH: string;
9362
+ AUTOPLAY_SUCCESS: string;
7838
9363
  /** {zh}
7839
- * @brief 取消静音。
9364
+ * @brief 自动播放失败。
7840
9365
  */
7841
9366
  /** {en}
7842
- * @brief Triggered when unmute is cancelled.
9367
+ * @brief Triggered when autoplay fails.
7843
9368
  */
7844
- CANCEL_UNMUTE: string;
9369
+ AUTOPLAY_FAILED: string;
7845
9370
  /** {zh}
7846
- * @brief 刷新按钮被点击。
9371
+ * @brief 右键菜单事件。事件 `data` 中包含具体信息。
7847
9372
  */
7848
9373
  /** {en}
7849
- * @brief Triggered when the refresh button is clicked.
9374
+ * @brief Triggered for context menu actions. Event `data` contains details.
7850
9375
  */
7851
- REFRESH_CLICK: string;
9376
+ MENU_LOG: string;
7852
9377
  /** {zh}
7853
- * @brief 报错时触发降级。
9378
+ * @brief 点击了右键菜单的反馈按钮。
7854
9379
  */
7855
9380
  /** {en}
7856
- * @brief Triggered when playback demotes to a backup URL after an error.
9381
+ * @brief Triggered when the context menu feedback button is clicked.
7857
9382
  */
7858
- PLAY_BACKUP_CHANGE: string;
9383
+ MENU_REPORT: string;
7859
9384
  /** {zh}
7860
- * @brief 报错时触发的降级结束。
9385
+ * @brief 播放列表更新。
7861
9386
  */
7862
9387
  /** {en}
7863
- * @brief Triggered when error-triggered demotion finishes.
9388
+ * @brief Triggered when the playlist is updated.
7864
9389
  */
7865
- PLAY_BACKUP_CHANGE_FINISH: string;
9390
+ PLAY_LIST_CHANGE: string;
7866
9391
  /** {zh}
7867
- * @brief 报错时触发重试。
9392
+ * @brief 播放列表播放项变更。
7868
9393
  */
7869
9394
  /** {en}
7870
- * @brief Triggered when the error retry button is clicked.
9395
+ * @brief Triggered when the current playlist item changes.
7871
9396
  */
7872
- PLAY_ERROR_BUTTON_CLICK: string;
9397
+ PLAY_LIST_ITEM_CHANGE: string;
7873
9398
  /** {zh}
7874
- * @brief 播放 URL 改变。
9399
+ * @brief `playNext` 开始。
7875
9400
  */
7876
9401
  /** {en}
7877
- * @brief Triggered when the playback URL changes.
9402
+ * @brief Triggered when `playNext` starts.
7878
9403
  */
7879
- PlAY_URL_CHANGE: string;
9404
+ PLAY_NEXT_START: string;
7880
9405
  /** {zh}
7881
- * @brief 展示报错。
9406
+ * @brief `playNext` 结束。
7882
9407
  */
7883
9408
  /** {en}
7884
- * @brief Triggered when the error UI is shown.
9409
+ * @brief Triggered when `playNext` ends.
7885
9410
  */
7886
- SHOW_PLAY_ERROR: string;
9411
+ PLAY_NEXT_END: string;
7887
9412
  /** {zh}
7888
- * @hidden
9413
+ * @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
7889
9414
  */
7890
9415
  /** {en}
7891
- * @hidden
9416
+ * @brief Triggered when the actual definition behind the auto ABR level changes.
7892
9417
  */
7893
- PLAYER_EXTEND_BUTTON: string;
9418
+ ABR_AUTO_DESC_CHANGE: string;
7894
9419
  /** {zh}
7895
- * @brief 发生长时间卡顿时触发。播放器会在事件发生时自动进行清晰度降级或提醒用户手动切换晰度降级。
9420
+ * @brief 播放插件内核的扩展事件
7896
9421
  */
7897
9422
  /** {en}
7898
- * @brief Triggered on prolonged stalling. The player may auto-demote definition or prompt the user to switch manually.
9423
+ * @brief Extension events from the playback plugin core.
7899
9424
  */
7900
- LONG_WAITING: string;
9425
+ CORE_EVENT: string;
7901
9426
  /** {zh}
7902
- * @brief 发生频繁卡顿时触发。
9427
+ * @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
7903
9428
  */
7904
9429
  /** {en}
7905
- * @brief Triggered on frequent stalling.
9430
+ * @brief Fired when the mp4 encrypt plugin finds a preload cache hit. The event data is the preload cache object, including fields such as `byteLength`, `duration`, and `mediaSegList`.
7906
9431
  */
7907
- OFTEN_WAITING: string;
9432
+ PRELOAD_INFO: string;
9433
+ TIME_SCALE_CHANGE?: string;
9434
+ MUSIC_MODE_CHANGE?: string;
9435
+ MUSIC_CHANGE?: string;
9436
+ MUSIC_LIST_CHANGE?: string;
7908
9437
  /** {zh}
7909
- * @brief 清晰度降级。
9438
+ * @brief 弹幕配置发生变化。
7910
9439
  */
7911
9440
  /** {en}
7912
- * @brief Triggered when definition is demoted.
9441
+ * @brief Triggered when danmu (bullet comment) configuration changes.
7913
9442
  */
7914
- DEFINITION_DEMOTE: string;
9443
+ DANMU_CHANGE: string;
7915
9444
  /** {zh}
7916
9445
  * @hidden
7917
9446
  */
7918
9447
  /** {en}
7919
9448
  * @hidden
7920
9449
  */
7921
- LARKWINDOW_CHANGE: string;
9450
+ TIME_SHIFT_CHANGE: string;
7922
9451
  /** {zh}
7923
9452
  * @hidden
7924
9453
  */
7925
9454
  /** {en}
7926
9455
  * @hidden
7927
9456
  */
7928
- PANEL_MODE_CHANGE: string;
9457
+ AI_SUBTITLE_LANG_CHANGE: string;
7929
9458
  /** {zh}
7930
- * @brief 清晰度切换。
9459
+ * @hidden
7931
9460
  */
7932
9461
  /** {en}
7933
- * @brief Triggered when definition changes.
9462
+ * @hidden
7934
9463
  */
7935
- INNER_DEFINITION_CHANGE: string;
9464
+ AI_SUBTITLE_MATCH: string;
7936
9465
  /** {zh}
7937
- * @brief 线路切换。
9466
+ * @brief 取消静音。
7938
9467
  */
7939
9468
  /** {en}
7940
- * @brief Triggered when the CDN line (route) changes.
9469
+ * @brief Triggered when unmute is cancelled.
7941
9470
  */
7942
- LINE_CHANGE: string;
9471
+ CANCEL_UNMUTE: string;
7943
9472
  /** {zh}
7944
- * @brief 播放器通过 `playAuthToken` 获取 URL 失败。
9473
+ * @brief 刷新按钮被点击。
7945
9474
  */
7946
9475
  /** {en}
7947
- * @brief Triggered when fetching the URL via `playAuthToken` fails.
9476
+ * @brief Triggered when the refresh button is clicked.
7948
9477
  */
7949
- GET_PLAY_URL_ERR: string;
9478
+ REFRESH_CLICK: string;
7950
9479
  /** {zh}
7951
- * @brief 资源过期。
9480
+ * @brief 报错时触发降级。
7952
9481
  */
7953
9482
  /** {en}
7954
- * @brief Triggered when the media resource has expired.
9483
+ * @brief Triggered when playback demotes to a backup URL after an error.
7955
9484
  */
7956
- MEDIA_EXPIRED: string;
9485
+ PLAY_BACKUP_CHANGE: string;
7957
9486
  /** {zh}
7958
- * @brief 镜像开启。
9487
+ * @brief 报错时触发的降级结束。
7959
9488
  */
7960
9489
  /** {en}
7961
- * @brief Triggered when mirror mode is enabled.
9490
+ * @brief Triggered when error-triggered demotion finishes.
7962
9491
  */
7963
- MIRROR_CHANGE: string;
9492
+ PLAY_BACKUP_CHANGE_FINISH: string;
7964
9493
  /** {zh}
7965
- * @brief 音乐播放器快进或快退。
9494
+ * @brief 报错时触发重试。
7966
9495
  */
7967
9496
  /** {en}
7968
- * @brief Triggered when music playback seeks forward or backward.
9497
+ * @brief Triggered when the error retry button is clicked.
7969
9498
  */
7970
- TIME_SCALE_CHANGE: string;
9499
+ PLAY_ERROR_BUTTON_CLICK: string;
7971
9500
  /** {zh}
7972
- * @brief 音乐播放模式切换。
9501
+ * @brief 播放 URL 改变。
7973
9502
  */
7974
9503
  /** {en}
7975
- * @brief Triggered when music play mode changes.
9504
+ * @brief Triggered when the playback URL changes.
7976
9505
  */
7977
- MUSIC_MODE_CHANGE: string;
9506
+ PlAY_URL_CHANGE: string;
7978
9507
  /** {zh}
7979
- * @brief 音乐播放模式下切换音乐。
9508
+ * @brief 展示报错。
7980
9509
  */
7981
9510
  /** {en}
7982
- * @brief Triggered when switching tracks in music mode.
9511
+ * @brief Triggered when the error UI is shown.
7983
9512
  */
7984
- MUSIC_CHANGE: string;
9513
+ SHOW_PLAY_ERROR: string;
7985
9514
  /** {zh}
7986
- * @brief 音乐播放列表发生变化。
9515
+ * @hidden
7987
9516
  */
7988
9517
  /** {en}
7989
- * @brief Triggered when the music playlist changes.
9518
+ * @hidden
7990
9519
  */
7991
- MUSIC_LIST_CHANGE: string;
9520
+ PLAYER_EXTEND_BUTTON: string;
7992
9521
  /** {zh}
7993
- * @brief 自动播放成功。
9522
+ * @brief 发生长时间卡顿时触发。播放器会在事件发生时自动进行清晰度降级或提醒用户手动切换晰度降级。
7994
9523
  */
7995
9524
  /** {en}
7996
- * @brief Triggered when autoplay succeeds.
9525
+ * @brief Triggered on prolonged stalling. The player may auto-demote definition or prompt the user to switch manually.
7997
9526
  */
7998
- AUTOPLAY_SUCCESS: string;
9527
+ LONG_WAITING: string;
7999
9528
  /** {zh}
8000
- * @brief 自动播放失败。
9529
+ * @brief 发生频繁卡顿时触发。
8001
9530
  */
8002
9531
  /** {en}
8003
- * @brief Triggered when autoplay fails.
9532
+ * @brief Triggered on frequent stalling.
8004
9533
  */
8005
- AUTOPLAY_FAILED: string;
9534
+ OFTEN_WAITING: string;
8006
9535
  /** {zh}
8007
- * @brief 右键菜单事件。事件 `data` 中包含具体信息。
9536
+ * @brief 清晰度降级。
8008
9537
  */
8009
9538
  /** {en}
8010
- * @brief Triggered for context menu actions. Event `data` contains details.
9539
+ * @brief Triggered when definition is demoted.
8011
9540
  */
8012
- MENU_LOG: string;
9541
+ DEFINITION_DEMOTE: string;
8013
9542
  /** {zh}
8014
- * @brief 点击了右键菜单的反馈按钮。
9543
+ * @hidden
8015
9544
  */
8016
9545
  /** {en}
8017
- * @brief Triggered when the context menu feedback button is clicked.
9546
+ * @hidden
8018
9547
  */
8019
- MENU_REPORT: string;
9548
+ LARKWINDOW_CHANGE: string;
8020
9549
  /** {zh}
8021
- * @brief 播放列表更新。
9550
+ * @hidden
8022
9551
  */
8023
9552
  /** {en}
8024
- * @brief Triggered when the playlist is updated.
9553
+ * @hidden
8025
9554
  */
8026
- PLAY_LIST_CHANGE: string;
9555
+ PANEL_MODE_CHANGE: string;
8027
9556
  /** {zh}
8028
- * @brief 播放列表播放项变更。
9557
+ * @brief 清晰度切换。
8029
9558
  */
8030
9559
  /** {en}
8031
- * @brief Triggered when the current playlist item changes.
9560
+ * @brief Triggered when definition changes.
8032
9561
  */
8033
- PLAY_LIST_ITEM_CHANGE: string;
9562
+ INNER_DEFINITION_CHANGE: string;
8034
9563
  /** {zh}
8035
- * @brief `playNext` 开始。
9564
+ * @brief 线路切换。
8036
9565
  */
8037
9566
  /** {en}
8038
- * @brief Triggered when `playNext` starts.
9567
+ * @brief Triggered when the CDN line (route) changes.
8039
9568
  */
8040
- PLAY_NEXT_START: string;
9569
+ LINE_CHANGE: string;
8041
9570
  /** {zh}
8042
- * @brief `playNext` 结束。
9571
+ * @brief 播放器通过 `playAuthToken` 获取 URL 失败。
8043
9572
  */
8044
9573
  /** {en}
8045
- * @brief Triggered when `playNext` ends.
9574
+ * @brief Triggered when fetching the URL via `playAuthToken` fails.
8046
9575
  */
8047
- PLAY_NEXT_END: string;
9576
+ GET_PLAY_URL_ERR: string;
8048
9577
  /** {zh}
8049
- * @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
9578
+ * @brief 资源过期。
8050
9579
  */
8051
9580
  /** {en}
8052
- * @brief Triggered when the actual definition behind the auto ABR level changes.
9581
+ * @brief Triggered when the media resource has expired.
8053
9582
  */
8054
- ABR_AUTO_DESC_CHANGE: string;
9583
+ MEDIA_EXPIRED: string;
8055
9584
  /** {zh}
8056
- * @brief 播放插件内核的扩展事件
9585
+ * @brief 镜像开启。
8057
9586
  */
8058
9587
  /** {en}
8059
- * @brief Extension events from the playback plugin core.
9588
+ * @brief Triggered when mirror mode is enabled.
8060
9589
  */
8061
- CORE_EVENT: string;
9590
+ MIRROR_CHANGE: string;
8062
9591
  /** {zh}
8063
9592
  * @brief 播放器实例创建完成时触发。
8064
9593
  */
@@ -8215,6 +9744,10 @@ export declare const Events: {
8215
9744
  * @brief Triggered when autoplay fails.
8216
9745
  */
8217
9746
  AUTOPLAY_PREVENTED: string;
9747
+ /** {zh}
9748
+ * @brief 播放器准备创建。
9749
+ */
9750
+ READY_CREATE_PLAYER: string;
8218
9751
  /** {zh}
8219
9752
  * @brief 播放器完成创建。
8220
9753
  */
@@ -8222,6 +9755,13 @@ export declare const Events: {
8222
9755
  * @brief Triggered when player creation completes.
8223
9756
  */
8224
9757
  PLAYER_CREATED_FINISH: string;
9758
+ /** {zh}
9759
+ * @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
9760
+ */
9761
+ /** {en}
9762
+ * @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
9763
+ */
9764
+ CREATE_PLAYER_PERF: string;
8225
9765
  /** {zh}
8226
9766
  * @brief 播放器重建。
8227
9767
  */
@@ -8649,6 +10189,10 @@ export declare const Event: {
8649
10189
  * @brief Triggered when autoplay fails.
8650
10190
  */
8651
10191
  AUTOPLAY_PREVENTED: string;
10192
+ /** {zh}
10193
+ * @brief 播放器准备创建。
10194
+ */
10195
+ READY_CREATE_PLAYER: string;
8652
10196
  /** {zh}
8653
10197
  * @brief 播放器完成创建。
8654
10198
  */
@@ -8656,6 +10200,13 @@ export declare const Event: {
8656
10200
  * @brief Triggered when player creation completes.
8657
10201
  */
8658
10202
  PLAYER_CREATED_FINISH: string;
10203
+ /** {zh}
10204
+ * @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
10205
+ */
10206
+ /** {en}
10207
+ * @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
10208
+ */
10209
+ CREATE_PLAYER_PERF: string;
8659
10210
  /** {zh}
8660
10211
  * @brief 播放器重建。
8661
10212
  */
@@ -8763,6 +10314,87 @@ export declare const Event: {
8763
10314
  AUDIO_TRACK_CHANGE: string;
8764
10315
  };
8765
10316
  PluginEvents: {
10317
+ /** {zh}
10318
+ * @brief 自动播放成功。
10319
+ */
10320
+ /** {en}
10321
+ * @brief Triggered when autoplay succeeds.
10322
+ */
10323
+ AUTOPLAY_SUCCESS: string;
10324
+ /** {zh}
10325
+ * @brief 自动播放失败。
10326
+ */
10327
+ /** {en}
10328
+ * @brief Triggered when autoplay fails.
10329
+ */
10330
+ AUTOPLAY_FAILED: string;
10331
+ /** {zh}
10332
+ * @brief 右键菜单事件。事件 `data` 中包含具体信息。
10333
+ */
10334
+ /** {en}
10335
+ * @brief Triggered for context menu actions. Event `data` contains details.
10336
+ */
10337
+ MENU_LOG: string;
10338
+ /** {zh}
10339
+ * @brief 点击了右键菜单的反馈按钮。
10340
+ */
10341
+ /** {en}
10342
+ * @brief Triggered when the context menu feedback button is clicked.
10343
+ */
10344
+ MENU_REPORT: string;
10345
+ /** {zh}
10346
+ * @brief 播放列表更新。
10347
+ */
10348
+ /** {en}
10349
+ * @brief Triggered when the playlist is updated.
10350
+ */
10351
+ PLAY_LIST_CHANGE: string;
10352
+ /** {zh}
10353
+ * @brief 播放列表播放项变更。
10354
+ */
10355
+ /** {en}
10356
+ * @brief Triggered when the current playlist item changes.
10357
+ */
10358
+ PLAY_LIST_ITEM_CHANGE: string;
10359
+ /** {zh}
10360
+ * @brief `playNext` 开始。
10361
+ */
10362
+ /** {en}
10363
+ * @brief Triggered when `playNext` starts.
10364
+ */
10365
+ PLAY_NEXT_START: string;
10366
+ /** {zh}
10367
+ * @brief `playNext` 结束。
10368
+ */
10369
+ /** {en}
10370
+ * @brief Triggered when `playNext` ends.
10371
+ */
10372
+ PLAY_NEXT_END: string;
10373
+ /** {zh}
10374
+ * @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
10375
+ */
10376
+ /** {en}
10377
+ * @brief Triggered when the actual definition behind the auto ABR level changes.
10378
+ */
10379
+ ABR_AUTO_DESC_CHANGE: string;
10380
+ /** {zh}
10381
+ * @brief 播放插件内核的扩展事件
10382
+ */
10383
+ /** {en}
10384
+ * @brief Extension events from the playback plugin core.
10385
+ */
10386
+ CORE_EVENT: string;
10387
+ /** {zh}
10388
+ * @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
10389
+ */
10390
+ /** {en}
10391
+ * @brief Fired when the mp4 encrypt plugin finds a preload cache hit. The event data is the preload cache object, including fields such as `byteLength`, `duration`, and `mediaSegList`.
10392
+ */
10393
+ PRELOAD_INFO: string;
10394
+ TIME_SCALE_CHANGE?: string;
10395
+ MUSIC_MODE_CHANGE?: string;
10396
+ MUSIC_CHANGE?: string;
10397
+ MUSIC_LIST_CHANGE?: string;
8766
10398
  /** {zh}
8767
10399
  * @brief 弹幕配置发生变化。
8768
10400
  */
@@ -8917,110 +10549,11 @@ export declare const Event: {
8917
10549
  * @brief Triggered when mirror mode is enabled.
8918
10550
  */
8919
10551
  MIRROR_CHANGE: string;
8920
- /** {zh}
8921
- * @brief 音乐播放器快进或快退。
8922
- */
8923
- /** {en}
8924
- * @brief Triggered when music playback seeks forward or backward.
8925
- */
8926
- TIME_SCALE_CHANGE: string;
8927
- /** {zh}
8928
- * @brief 音乐播放模式切换。
8929
- */
8930
- /** {en}
8931
- * @brief Triggered when music play mode changes.
8932
- */
8933
- MUSIC_MODE_CHANGE: string;
8934
- /** {zh}
8935
- * @brief 音乐播放模式下切换音乐。
8936
- */
8937
- /** {en}
8938
- * @brief Triggered when switching tracks in music mode.
8939
- */
8940
- MUSIC_CHANGE: string;
8941
- /** {zh}
8942
- * @brief 音乐播放列表发生变化。
8943
- */
8944
- /** {en}
8945
- * @brief Triggered when the music playlist changes.
8946
- */
8947
- MUSIC_LIST_CHANGE: string;
8948
- /** {zh}
8949
- * @brief 自动播放成功。
8950
- */
8951
- /** {en}
8952
- * @brief Triggered when autoplay succeeds.
8953
- */
8954
- AUTOPLAY_SUCCESS: string;
8955
- /** {zh}
8956
- * @brief 自动播放失败。
8957
- */
8958
- /** {en}
8959
- * @brief Triggered when autoplay fails.
8960
- */
8961
- AUTOPLAY_FAILED: string;
8962
- /** {zh}
8963
- * @brief 右键菜单事件。事件 `data` 中包含具体信息。
8964
- */
8965
- /** {en}
8966
- * @brief Triggered for context menu actions. Event `data` contains details.
8967
- */
8968
- MENU_LOG: string;
8969
- /** {zh}
8970
- * @brief 点击了右键菜单的反馈按钮。
8971
- */
8972
- /** {en}
8973
- * @brief Triggered when the context menu feedback button is clicked.
8974
- */
8975
- MENU_REPORT: string;
8976
- /** {zh}
8977
- * @brief 播放列表更新。
8978
- */
8979
- /** {en}
8980
- * @brief Triggered when the playlist is updated.
8981
- */
8982
- PLAY_LIST_CHANGE: string;
8983
- /** {zh}
8984
- * @brief 播放列表播放项变更。
8985
- */
8986
- /** {en}
8987
- * @brief Triggered when the current playlist item changes.
8988
- */
8989
- PLAY_LIST_ITEM_CHANGE: string;
8990
- /** {zh}
8991
- * @brief `playNext` 开始。
8992
- */
8993
- /** {en}
8994
- * @brief Triggered when `playNext` starts.
8995
- */
8996
- PLAY_NEXT_START: string;
8997
- /** {zh}
8998
- * @brief `playNext` 结束。
8999
- */
9000
- /** {en}
9001
- * @brief Triggered when `playNext` ends.
9002
- */
9003
- PLAY_NEXT_END: string;
9004
- /** {zh}
9005
- * @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
9006
- */
9007
- /** {en}
9008
- * @brief Triggered when the actual definition behind the auto ABR level changes.
9009
- */
9010
- ABR_AUTO_DESC_CHANGE: string;
9011
- /** {zh}
9012
- * @brief 播放插件内核的扩展事件
9013
- */
9014
- /** {en}
9015
- * @brief Extension events from the playback plugin core.
9016
- */
9017
- CORE_EVENT: string;
9018
10552
  };
9019
10553
  };
9020
10554
  export * from "xgplayer";
9021
10555
 
9022
10556
  export {
9023
- LiveSubTitlesPlugin as LiveSubtitlesPlugin,
9024
10557
  MusicPreset as Music,
9025
10558
  VePlayer as default,
9026
10559
  };