@volcengine/veplayer 1.7.7-rc.0 → 1.8.1-rc.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 +71 -9
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import VodLogger from '@byted/xgplayer-app-logger/es/logger.js';
|
|
2
|
+
import VeStrategy from '@volcengine/vestrategy';
|
|
3
|
+
import { StrategyRecommendation, VeStrategyInitOptions } from '@volcengine/vestrategy';
|
|
4
|
+
import { VeStrategyH265Config } from '@volcengine/vestrategy-h265';
|
|
2
5
|
import { Property } from 'dom-helpers/esm/types';
|
|
3
6
|
import EventEmitter from 'eventemitter3';
|
|
4
7
|
import Player from 'xgplayer';
|
|
@@ -2124,10 +2127,47 @@ export interface ApiMapConfig {
|
|
|
2124
2127
|
playDomain: string;
|
|
2125
2128
|
backupPlayDomain?: string;
|
|
2126
2129
|
}
|
|
2130
|
+
declare enum StrategyNames {
|
|
2131
|
+
H265 = "h265"
|
|
2132
|
+
}
|
|
2133
|
+
export declare type StrategyConfigOptions = {
|
|
2134
|
+
[StrategyNames.H265]?: boolean | {
|
|
2135
|
+
Strategy?: any;
|
|
2136
|
+
disabled?: boolean;
|
|
2137
|
+
config?: VeStrategyH265Config;
|
|
2138
|
+
};
|
|
2139
|
+
};
|
|
2140
|
+
export declare type StrategyInitOptions = Omit<VeStrategyInitOptions, "strategies"> & {
|
|
2141
|
+
Module: typeof VeStrategy;
|
|
2142
|
+
strategies: StrategyConfigOptions;
|
|
2143
|
+
};
|
|
2144
|
+
declare class VeStrategyWrapper {
|
|
2145
|
+
private static mapStrategyNameToUmdKey;
|
|
2146
|
+
private static TEA_ID;
|
|
2147
|
+
private sdkUmdLoader;
|
|
2148
|
+
private webId;
|
|
2149
|
+
private config;
|
|
2150
|
+
private status;
|
|
2151
|
+
private initPromise;
|
|
2152
|
+
constructor();
|
|
2153
|
+
private initUmdLoader;
|
|
2154
|
+
private fetchWebId;
|
|
2155
|
+
private fetchVeStrategy;
|
|
2156
|
+
private fetchStrategies;
|
|
2157
|
+
private initOnce;
|
|
2158
|
+
init(config: StrategyInitOptions): Promise<boolean>;
|
|
2159
|
+
prepare(): Promise<boolean>;
|
|
2160
|
+
getDeviceId(): string;
|
|
2161
|
+
isReady(): boolean;
|
|
2162
|
+
getStrategyRecommendations(): StrategyRecommendation;
|
|
2163
|
+
isHevcRecommended(): boolean;
|
|
2164
|
+
}
|
|
2165
|
+
declare const _default: VeStrategyWrapper;
|
|
2127
2166
|
declare class PlayerData {
|
|
2128
2167
|
id?: string;
|
|
2129
2168
|
root?: HTMLElement;
|
|
2130
2169
|
configs: any;
|
|
2170
|
+
strategyConfig?: StrategyConfigOptions;
|
|
2131
2171
|
type: string;
|
|
2132
2172
|
isLive: boolean;
|
|
2133
2173
|
options: any;
|
|
@@ -2156,6 +2196,8 @@ declare class PlayerData {
|
|
|
2156
2196
|
enableMenu: boolean;
|
|
2157
2197
|
region: TRegionType;
|
|
2158
2198
|
playDomainDegrade: boolean;
|
|
2199
|
+
strategiesPlugins: any[];
|
|
2200
|
+
strategiesPluginConfigs: any;
|
|
2159
2201
|
constructor(configs: IPlayerConfig);
|
|
2160
2202
|
initPlayData(configs: any): void;
|
|
2161
2203
|
initPlaylistAndGetCurrent(configs: IPlayerConfig): any;
|
|
@@ -2246,17 +2288,33 @@ declare class MobilePlayerPanel {
|
|
|
2246
2288
|
bind(event: string, eventHandle: any, isBubble?: boolean): void;
|
|
2247
2289
|
destroy(): void;
|
|
2248
2290
|
}
|
|
2291
|
+
declare enum UmdKeys {
|
|
2292
|
+
HLS = "hls",
|
|
2293
|
+
FLV = "flv",
|
|
2294
|
+
XGVideo = "XGVideo",
|
|
2295
|
+
HLSEncrypt = "hlsEncrypt",
|
|
2296
|
+
DASH = "dash",
|
|
2297
|
+
MP4Encrypt = "mp4Encrypt",
|
|
2298
|
+
DanmuJS = "danmujs",
|
|
2299
|
+
DanmuMask = "danmuMask",
|
|
2300
|
+
StreamProbe = "streamprobe",
|
|
2301
|
+
VeStrategy = "vestrategy",
|
|
2302
|
+
VeStrategyH265 = "vestrategy_h265"
|
|
2303
|
+
}
|
|
2304
|
+
export declare type UMDMap = Record<UmdKeys, {
|
|
2305
|
+
name: string;
|
|
2306
|
+
pluginName?: string;
|
|
2307
|
+
packageName: string;
|
|
2308
|
+
devPath: string;
|
|
2309
|
+
}>;
|
|
2249
2310
|
declare class umdLoader {
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
packageName: string;
|
|
2253
|
-
devPath: string;
|
|
2254
|
-
}>;
|
|
2311
|
+
private static jsLoadMap;
|
|
2312
|
+
umdMap: UMDMap;
|
|
2255
2313
|
backupUmdUrlMap: Record<string, string>;
|
|
2256
|
-
jsLoadMap: Record<string, any>;
|
|
2257
2314
|
failCallback: (umdName: string, err: any) => any;
|
|
2258
|
-
region:
|
|
2315
|
+
region: string;
|
|
2259
2316
|
customPluginPublicPath: string;
|
|
2317
|
+
importedPlugins: any[];
|
|
2260
2318
|
constructor();
|
|
2261
2319
|
/**
|
|
2262
2320
|
* @return { string } 插件加载的公共路径
|
|
@@ -2281,7 +2339,7 @@ declare class umdLoader {
|
|
|
2281
2339
|
* @param successCallback 加载完成后执行的回调
|
|
2282
2340
|
* @return Promise<any>
|
|
2283
2341
|
*/
|
|
2284
|
-
loadPlugins(pluginName:
|
|
2342
|
+
loadPlugins(pluginName: UmdKeys, successCallback?: () => void): Promise<any>;
|
|
2285
2343
|
}
|
|
2286
2344
|
declare class VePlayer {
|
|
2287
2345
|
/**
|
|
@@ -2403,16 +2461,18 @@ declare class VePlayer {
|
|
|
2403
2461
|
sdkUmdLoader: umdLoader;
|
|
2404
2462
|
static isMSESupported: typeof isMSESupport;
|
|
2405
2463
|
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
2464
|
+
static veStrategy: typeof VeStrategy;
|
|
2406
2465
|
static sdkVersion: string;
|
|
2407
2466
|
static isRTMSupportCodec: (codec: RTMCodec, options: {
|
|
2408
2467
|
targetProfileLevel?: string;
|
|
2409
2468
|
}) => Promise<boolean>;
|
|
2469
|
+
private vodLogCommon;
|
|
2410
2470
|
constructor(configs: IPlayerConfig);
|
|
2411
2471
|
/**
|
|
2412
2472
|
*
|
|
2413
2473
|
*
|
|
2414
2474
|
* @private
|
|
2415
|
-
* @param {IPlayerConfig} configs
|
|
2475
|
+
* @param {IPlayerConfig} configs 播放器配置
|
|
2416
2476
|
* @memberof VePlayer
|
|
2417
2477
|
*/
|
|
2418
2478
|
private _init;
|
|
@@ -2572,6 +2632,8 @@ declare class VePlayer {
|
|
|
2572
2632
|
* @memberof VePlayer
|
|
2573
2633
|
*/
|
|
2574
2634
|
beforePlayerCreate(): Promise<void>;
|
|
2635
|
+
private prepareStrategies;
|
|
2636
|
+
updateConfigByStrategy(): void;
|
|
2575
2637
|
/**
|
|
2576
2638
|
* @hidden
|
|
2577
2639
|
*
|