@byteplus/veplayer 1.18.0-rc.6 → 1.18.0-rc.8

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
@@ -118,6 +118,32 @@ export interface LitePlayAuthTokenConfig {
118
118
  autoDemoteDefinitionTextKey?: string;
119
119
  urlQueryParams?: Record<string, string>;
120
120
  }
121
+ /** Minis short-drama transcoding options exposed by Lite. */
122
+ export interface LiteTranscodeParam {
123
+ format?: string;
124
+ codec?: string;
125
+ definition?: string;
126
+ fileType?: string;
127
+ needThumbs?: string;
128
+ needBarrageMask?: string;
129
+ unionInfo?: string;
130
+ quality?: string;
131
+ drmKek?: string;
132
+ jsPlayer?: string;
133
+ }
134
+ /** Snake-case transcode parameters passed to the host drama bridge. */
135
+ export interface LiteDramaInfoTranscodeParam {
136
+ format?: string;
137
+ codec?: string;
138
+ definition?: string;
139
+ file_type?: string;
140
+ need_thumbs?: string;
141
+ need_barrage_mask?: string;
142
+ union_info?: string;
143
+ quality?: string;
144
+ drm_kek?: string;
145
+ js_player?: string;
146
+ }
121
147
  /** Lite-only preloading scene values supported by the player runtime. */
122
148
  export type LitePreloadScene = 0 | 1;
123
149
  /** Lite-safe preload strategy configuration. */
@@ -161,6 +187,20 @@ export interface LiteMediaInfoCacheState {
161
187
  expireTime: number;
162
188
  maxEntries: number;
163
189
  }
190
+ /** Stable playback lifecycle values exposed to JSSDK integrations. */
191
+ export type LitePlayerPlaybackState = "creating" | "ready" | "playing" | "paused" | "buffering" | "ended" | "error" | "destroyed";
192
+ /** Current or most recently played VePlayer snapshot. Times are in seconds. */
193
+ export interface LitePlayerPlaybackStateSnapshot {
194
+ playbackState: LitePlayerPlaybackState;
195
+ isEnded: boolean;
196
+ isPaused: boolean;
197
+ isBeforePlayerCreate: boolean;
198
+ albumId: string | null;
199
+ episodeId: string | null;
200
+ playbackSessionId: string;
201
+ duration: number;
202
+ currentTime: number;
203
+ }
164
204
  /** Minimal preloader operations available from the Lite static surface. */
165
205
  export interface LitePreloaderManager {
166
206
  removeAll(): void;
@@ -193,6 +233,7 @@ export interface LitePreloadDramaStream {
193
233
  albumId: string;
194
234
  episodeId: string;
195
235
  defaultDefinition?: string;
236
+ transcodeParam?: LiteTranscodeParam;
196
237
  getVideoByToken?: LitePlayAuthTokenConfig;
197
238
  }
198
239
  /** A token-resolved VOD item accepted by Lite preload APIs. */
@@ -209,6 +250,7 @@ export interface LiteDramaInfoRequest {
209
250
  albumId: string;
210
251
  episodeId: string;
211
252
  vid: string;
253
+ transcodeParam?: LiteDramaInfoTranscodeParam;
212
254
  }
213
255
  /** Error returned by the host short-drama bridge. */
214
256
  export interface LiteDramaInfoError {
@@ -280,6 +322,7 @@ export interface LiteTTDramaEnv {
280
322
  appVersion: string;
281
323
  clientKey: string;
282
324
  canIUseGetDramaInfo: boolean;
325
+ canIUseGetDramaInfoTranscodeParam?: boolean;
283
326
  canAndroidBatchGetDramaInfo?: boolean;
284
327
  getDramaInfo: (callback: (res: LiteDramaInfoResponse) => void, options: LiteDramaInfoRequest) => void;
285
328
  videoSecurityModule?: unknown;
@@ -428,6 +471,7 @@ export interface LitePlayerConfig<MediaUrl extends LiteMediaUrl = LiteMediaUrl,
428
471
  vid?: string;
429
472
  albumId?: string;
430
473
  episodeId?: string;
474
+ transcodeParam?: LiteTranscodeParam;
431
475
  onGetMediaInfo?: (...args: unknown[]) => void;
432
476
  onGetDramaInfoPerf?: (...args: unknown[]) => void;
433
477
  autoSubtitle?: boolean;
@@ -624,6 +668,7 @@ export interface LiteVePlayerConstructor {
624
668
  setMediaInfoCacheConfig(config: LiteMediaInfoCacheConfig): void;
625
669
  getMediaInfoCacheConfig(): LiteMediaInfoCacheState;
626
670
  clearMediaInfoCache(): void;
671
+ getPlayerPlaybackState(): LitePlayerPlaybackStateSnapshot | null;
627
672
  generateEncryptInfo(unionId: string, streamType: "hls" | "mp4" | "dash"): Promise<LiteEncryptInfo | undefined>;
628
673
  }
629
674
  declare const LiteVePlayer: LiteVePlayerConstructor;