@byteplus/veplayer 1.18.0-rc.8 → 1.18.0
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 +161 -0
- package/index.min.js +2 -2
- package/lite.cjs +2 -2
- package/lite.d.ts +7 -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 +2 -2
- package/plugin/modules/vestrategy_adapt_range.mjs +2 -2
- package/plugin/modules/vestrategy_h265.mjs +2 -2
- package/plugin/modules/vestrategy_preload.mjs +2 -2
- package/plugin/vestrategy.js +1 -1
- package/plugin/vestrategy_preload.js +1 -1
package/index.d.ts
CHANGED
|
@@ -7000,6 +7000,54 @@ export declare type IPreloadAuthTokenStream = {
|
|
|
7000
7000
|
defaultDefinition?: string;
|
|
7001
7001
|
getVideoByToken: IPlayAuthTokenConfig;
|
|
7002
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;
|
|
7003
7051
|
export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
|
|
7004
7052
|
/** {zh}
|
|
7005
7053
|
* @list Options
|
|
@@ -7842,6 +7890,33 @@ declare class VePlayer {
|
|
|
7842
7890
|
* @brief Clear media info cache from both memory cache and localStorage cache.
|
|
7843
7891
|
*/
|
|
7844
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[]>;
|
|
7845
7920
|
/** {zh}
|
|
7846
7921
|
* @brief 设置全局日志开关。开启后会输出 VE_DEBUG.log 级别日志。
|
|
7847
7922
|
* @param enable 是否开启详细日志
|
|
@@ -9165,6 +9240,91 @@ export declare class Subtitle extends Plugin {
|
|
|
9165
9240
|
destroy(): void;
|
|
9166
9241
|
render(): string;
|
|
9167
9242
|
}
|
|
9243
|
+
export declare type InfoItem = {
|
|
9244
|
+
key: string;
|
|
9245
|
+
label: string;
|
|
9246
|
+
labelTextKey?: string;
|
|
9247
|
+
value?: any;
|
|
9248
|
+
render?: (key: any) => string;
|
|
9249
|
+
type?: string;
|
|
9250
|
+
dom?: Element;
|
|
9251
|
+
};
|
|
9252
|
+
/**
|
|
9253
|
+
* 直播信息面板
|
|
9254
|
+
*/
|
|
9255
|
+
export declare class LiveInfoPanel extends Plugin {
|
|
9256
|
+
private _pollTimer;
|
|
9257
|
+
private _infoItems;
|
|
9258
|
+
static get pluginName(): string;
|
|
9259
|
+
static get defaultConfig(): {
|
|
9260
|
+
visible: boolean;
|
|
9261
|
+
showH265Info: boolean;
|
|
9262
|
+
};
|
|
9263
|
+
get streamType(): any;
|
|
9264
|
+
afterCreate(): void;
|
|
9265
|
+
registerLanguageTexts(): {
|
|
9266
|
+
DECODEFPS: {
|
|
9267
|
+
en: string;
|
|
9268
|
+
zh: string;
|
|
9269
|
+
};
|
|
9270
|
+
DECODECOST: {
|
|
9271
|
+
en: string;
|
|
9272
|
+
zh: string;
|
|
9273
|
+
};
|
|
9274
|
+
FORMAT: {
|
|
9275
|
+
en: string;
|
|
9276
|
+
zh: string;
|
|
9277
|
+
};
|
|
9278
|
+
FPS: {
|
|
9279
|
+
en: string;
|
|
9280
|
+
zh: string;
|
|
9281
|
+
};
|
|
9282
|
+
BITRATE: {
|
|
9283
|
+
en: string;
|
|
9284
|
+
zh: string;
|
|
9285
|
+
};
|
|
9286
|
+
GOP: {
|
|
9287
|
+
en: string;
|
|
9288
|
+
zh: string;
|
|
9289
|
+
};
|
|
9290
|
+
RESOLUTION: {
|
|
9291
|
+
en: string;
|
|
9292
|
+
zh: string;
|
|
9293
|
+
};
|
|
9294
|
+
ENCODETYPE: {
|
|
9295
|
+
en: string;
|
|
9296
|
+
zh: string;
|
|
9297
|
+
};
|
|
9298
|
+
BUFFEREND: {
|
|
9299
|
+
en: string;
|
|
9300
|
+
zh: string;
|
|
9301
|
+
};
|
|
9302
|
+
CURRENTTIME: {
|
|
9303
|
+
en: string;
|
|
9304
|
+
zh: string;
|
|
9305
|
+
};
|
|
9306
|
+
};
|
|
9307
|
+
_getDefaultInfo(data: any): Record<string, InfoItem>;
|
|
9308
|
+
_init(): void;
|
|
9309
|
+
_getStats(): any;
|
|
9310
|
+
_getInfoListData(): Record<string, InfoItem>;
|
|
9311
|
+
_initDom(infoItems: any): any;
|
|
9312
|
+
_updateTitle(rowDom: Element, item: InfoItem): void;
|
|
9313
|
+
_updateDom(rowdom: Element, newItem: InfoItem): void;
|
|
9314
|
+
_renderLabel(item: InfoItem): any;
|
|
9315
|
+
_renderValue(item: InfoItem): any;
|
|
9316
|
+
_handleDataChange(): void;
|
|
9317
|
+
_tick(): void;
|
|
9318
|
+
_poll(): void;
|
|
9319
|
+
destroy(): void;
|
|
9320
|
+
_handleError(): void;
|
|
9321
|
+
_handleLoadedData(): void;
|
|
9322
|
+
_open(): void;
|
|
9323
|
+
_close(): void;
|
|
9324
|
+
open(): void;
|
|
9325
|
+
close(): void;
|
|
9326
|
+
render(): string;
|
|
9327
|
+
}
|
|
9168
9328
|
export declare class TimeShiftPlugin extends Plugin {
|
|
9169
9329
|
static get pluginName(): string;
|
|
9170
9330
|
static get defaultConfig(): {
|
|
@@ -10479,6 +10639,7 @@ export declare const Event: {
|
|
|
10479
10639
|
export * from "xgplayer";
|
|
10480
10640
|
|
|
10481
10641
|
export {
|
|
10642
|
+
LiveSubTitlesPlugin as LiveSubtitlesPlugin,
|
|
10482
10643
|
MusicPreset as Music,
|
|
10483
10644
|
VePlayer as default,
|
|
10484
10645
|
};
|