@byteplus/veplayer 1.19.1 → 1.19.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lite.d.ts CHANGED
@@ -1039,6 +1039,27 @@ export type LitePreloadScene = 0 | 1;
1039
1039
  export type LiteServiceConfigMode = "remote" | "local-only";
1040
1040
  /** Lite-safe preload strategy configuration. */
1041
1041
  export interface LitePreloadStrategyConfig {
1042
+ /** {zh}
1043
+ * @brief 预加载格式;数组可同时初始化 MP4 和 HLS,默认 MP4。
1044
+ */
1045
+ /** {en}
1046
+ * @brief Preload format. An array initializes MP4 and HLS; defaults to MP4.
1047
+ */
1048
+ format?: "mp4" | "hls" | Array<"mp4" | "hls">;
1049
+ /** {zh}
1050
+ * @brief HLS 分片数量,正整数,默认 2。
1051
+ */
1052
+ /** {en}
1053
+ * @brief HLS segment count. Positive integer; defaults to 2.
1054
+ */
1055
+ sn?: number;
1056
+ /** {zh}
1057
+ * @brief HLS master 子列表索引,从 0 开始,默认 0。
1058
+ */
1059
+ /** {en}
1060
+ * @brief Zero-based HLS master variant index; defaults to 0.
1061
+ */
1062
+ level?: number;
1042
1063
  preloadScene?: LitePreloadScene;
1043
1064
  prevCount?: number;
1044
1065
  nextCount?: number;
@@ -1049,6 +1070,13 @@ export interface LitePreloadStrategyConfig {
1049
1070
  }
1050
1071
  /** Lite strategy initialization. Full strategy names are deliberately absent. */
1051
1072
  export interface LiteStrategyInitOptions {
1073
+ /** HLS kernel warmup; additionally requires explicit preload and setPreloadList. */
1074
+ kernelWarmup?: {
1075
+ enabled?: boolean;
1076
+ timeoutMs?: number;
1077
+ maxAgeMs?: number;
1078
+ minBufferSeconds?: number;
1079
+ };
1052
1080
  /** Optional for a configured short-drama environment. */
1053
1081
  appId?: number;
1054
1082
  /**
@@ -1115,10 +1143,24 @@ export interface LiteVeStrategy {
1115
1143
  export type LiteEncryptInfo = Record<string, unknown>;
1116
1144
  /** A direct media entry accepted by Lite preload APIs. */
1117
1145
  export interface LitePreloadResolvedStream {
1146
+ /** {zh}
1147
+ * @brief HLS 分片数量,覆盖策略默认值。
1148
+ */
1149
+ /** {en}
1150
+ * @brief HLS segment count; overrides the strategy default.
1151
+ */
1152
+ sn?: number;
1153
+ /** {zh}
1154
+ * @brief HLS master 子列表索引,覆盖策略默认值。
1155
+ */
1156
+ /** {en}
1157
+ * @brief Zero-based HLS master variant index; overrides the strategy default.
1158
+ */
1159
+ level?: number;
1118
1160
  vid: string;
1119
1161
  url: string;
1120
1162
  definition: string;
1121
- streamType: "mp4";
1163
+ streamType: "mp4" | "hls";
1122
1164
  codec: "h264";
1123
1165
  bitrate: number;
1124
1166
  duration: number;
@@ -1188,18 +1230,35 @@ export interface LiteDramaVideoInfo {
1188
1230
  }
1189
1231
  /** Short-drama bridge result with only Lite-safe media data. */
1190
1232
  export interface LiteDramaInfoResponse {
1233
+ /** {zh} @brief 旧回包的顶层 Native 通参;优先使用 data.tracking_context。 */
1234
+ /** {en} @brief Legacy top-level tracking fields; data.tracking_context takes priority. */
1235
+ tracking_context?: {
1236
+ enter_from?: string;
1237
+ minis_type?: string;
1238
+ minis_id?: string;
1239
+ ttoclid?: string;
1240
+ };
1191
1241
  is_success: number | boolean;
1192
1242
  error?: LiteDramaInfoError;
1193
1243
  data?: {
1244
+ /** {zh} @brief Native 埋点通参;缺失时不报对应字段。 */
1245
+ /** {en} @brief Native tracking fields; omitted fields are not reported. */
1246
+ tracking_context?: LiteDramaInfoResponse["tracking_context"];
1194
1247
  status: number;
1195
1248
  drama_info: {
1196
- album_id: string;
1197
- drama_name: string;
1198
- drama_cover: string;
1199
- drama_description: string;
1249
+ drama_id?: string;
1250
+ album_id?: string;
1251
+ album_name?: string;
1252
+ episode_total_num?: number;
1253
+ drama_name?: string;
1254
+ album_cover?: string;
1255
+ drama_cover?: string;
1256
+ album_description?: string;
1257
+ drama_description?: string;
1200
1258
  };
1201
1259
  episode_info: {
1202
1260
  episode_id: string;
1261
+ episode_current_num?: number;
1203
1262
  episode_name: string;
1204
1263
  episode_cover: string;
1205
1264
  episode_description: string;
@@ -1526,6 +1585,8 @@ type LiteHlsEventPayloadMap = {
1526
1585
  hls_level_switched: IHlsLevelSwitchEvent;
1527
1586
  };
1528
1587
  export interface LiteVePlayer {
1588
+ /** Diagnostic preparation state, not a visible first-frame measurement. */
1589
+ getKernelWarmupState(): string;
1529
1590
  readonly preLoadData: {
1530
1591
  hit: number;
1531
1592
  duration?: number;