@byteplus/veplayer 1.18.0-rc.6 → 1.18.0-rc.7
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/index.d.ts +101 -6
- package/index.min.js +2 -2
- package/lite.cjs +2 -2
- package/lite.d.ts +44 -0
- package/lite.esm.mjs +2 -2
- package/lite.min.js +2 -2
- package/package.json +1 -1
- package/plugin/modules/DashAbralgo.mjs +1 -1
- package/plugin/modules/XGVideo.mjs +1 -1
- package/plugin/modules/danmuMask.mjs +1 -1
- package/plugin/modules/danmujs.mjs +1 -1
- package/plugin/modules/dash.mjs +1 -1
- package/plugin/modules/flv.mjs +1 -1
- package/plugin/modules/hls.mjs +1 -1
- package/plugin/modules/hlsEncrypt.mjs +1 -1
- package/plugin/modules/hlsjs.mjs +1 -1
- package/plugin/modules/hlsjsPro.mjs +1 -1
- package/plugin/modules/mp4Encrypt.mjs +1 -1
- package/plugin/modules/preloader.mjs +1 -1
- package/plugin/modules/streamprobe.mjs +1 -1
- package/plugin/modules/vestrategy.mjs +1 -1
- package/plugin/modules/vestrategy_adapt_range.mjs +1 -1
- package/plugin/modules/vestrategy_h265.mjs +1 -1
- package/plugin/modules/vestrategy_preload.mjs +1 -1
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,19 @@ 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
|
+
duration: number;
|
|
201
|
+
currentTime: number;
|
|
202
|
+
}
|
|
164
203
|
/** Minimal preloader operations available from the Lite static surface. */
|
|
165
204
|
export interface LitePreloaderManager {
|
|
166
205
|
removeAll(): void;
|
|
@@ -193,6 +232,7 @@ export interface LitePreloadDramaStream {
|
|
|
193
232
|
albumId: string;
|
|
194
233
|
episodeId: string;
|
|
195
234
|
defaultDefinition?: string;
|
|
235
|
+
transcodeParam?: LiteTranscodeParam;
|
|
196
236
|
getVideoByToken?: LitePlayAuthTokenConfig;
|
|
197
237
|
}
|
|
198
238
|
/** A token-resolved VOD item accepted by Lite preload APIs. */
|
|
@@ -209,6 +249,7 @@ export interface LiteDramaInfoRequest {
|
|
|
209
249
|
albumId: string;
|
|
210
250
|
episodeId: string;
|
|
211
251
|
vid: string;
|
|
252
|
+
transcodeParam?: LiteDramaInfoTranscodeParam;
|
|
212
253
|
}
|
|
213
254
|
/** Error returned by the host short-drama bridge. */
|
|
214
255
|
export interface LiteDramaInfoError {
|
|
@@ -280,6 +321,7 @@ export interface LiteTTDramaEnv {
|
|
|
280
321
|
appVersion: string;
|
|
281
322
|
clientKey: string;
|
|
282
323
|
canIUseGetDramaInfo: boolean;
|
|
324
|
+
canIUseGetDramaInfoTranscodeParam?: boolean;
|
|
283
325
|
canAndroidBatchGetDramaInfo?: boolean;
|
|
284
326
|
getDramaInfo: (callback: (res: LiteDramaInfoResponse) => void, options: LiteDramaInfoRequest) => void;
|
|
285
327
|
videoSecurityModule?: unknown;
|
|
@@ -428,6 +470,7 @@ export interface LitePlayerConfig<MediaUrl extends LiteMediaUrl = LiteMediaUrl,
|
|
|
428
470
|
vid?: string;
|
|
429
471
|
albumId?: string;
|
|
430
472
|
episodeId?: string;
|
|
473
|
+
transcodeParam?: LiteTranscodeParam;
|
|
431
474
|
onGetMediaInfo?: (...args: unknown[]) => void;
|
|
432
475
|
onGetDramaInfoPerf?: (...args: unknown[]) => void;
|
|
433
476
|
autoSubtitle?: boolean;
|
|
@@ -624,6 +667,7 @@ export interface LiteVePlayerConstructor {
|
|
|
624
667
|
setMediaInfoCacheConfig(config: LiteMediaInfoCacheConfig): void;
|
|
625
668
|
getMediaInfoCacheConfig(): LiteMediaInfoCacheState;
|
|
626
669
|
clearMediaInfoCache(): void;
|
|
670
|
+
getPlayerPlaybackState(): LitePlayerPlaybackStateSnapshot | null;
|
|
627
671
|
generateEncryptInfo(unionId: string, streamType: "hls" | "mp4" | "dash"): Promise<LiteEncryptInfo | undefined>;
|
|
628
672
|
}
|
|
629
673
|
declare const LiteVePlayer: LiteVePlayerConstructor;
|