@volcengine/veplayer 1.12.0-rc.1 → 1.12.0-rc.3
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 +569 -174
- package/index.min.js +2 -2
- package/package.json +1 -1
- package/plugin/dash.js +2 -2
- package/plugin/hls.js +1 -1
- package/plugin/hlsEncrypt.js +2 -2
- package/plugin/mp4Encrypt.js +2 -2
package/index.d.ts
CHANGED
|
@@ -194,6 +194,224 @@ export interface IRtmConfig {
|
|
|
194
194
|
*/
|
|
195
195
|
backupStreamType: "hls" | "flv";
|
|
196
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* @brief 弹幕配置。
|
|
199
|
+
* @list Options
|
|
200
|
+
* @kind property
|
|
201
|
+
*/
|
|
202
|
+
/** {en}
|
|
203
|
+
* @list Options
|
|
204
|
+
* @kind property
|
|
205
|
+
*/
|
|
206
|
+
export interface IDanmuConfig {
|
|
207
|
+
/**
|
|
208
|
+
* @brief 弹幕透明度。取值如下:
|
|
209
|
+
*
|
|
210
|
+
* - `0`:透明度 0。
|
|
211
|
+
* - `33`:透明度 33%。
|
|
212
|
+
* - `66`:透明度 66%。
|
|
213
|
+
* - `99`:透明度 100%。
|
|
214
|
+
* @default 99
|
|
215
|
+
*/
|
|
216
|
+
/** {en}
|
|
217
|
+
* @brief 透明度, 枚举值[0, 33, 66, 99], 实际对应0, 0.33, 0.66, 1
|
|
218
|
+
*/
|
|
219
|
+
opacity?: number;
|
|
220
|
+
/**
|
|
221
|
+
* @brief 弹幕区域大小。取值如下:
|
|
222
|
+
*
|
|
223
|
+
* - `0`:弹幕区域占全屏的 1/4。
|
|
224
|
+
* - `33`:弹幕区域占全屏的 1/2。
|
|
225
|
+
* - `66`:弹幕区域占全屏的 3/4。
|
|
226
|
+
* - `99`:弹幕区域占满全屏。
|
|
227
|
+
* @default 99
|
|
228
|
+
*/
|
|
229
|
+
/** {en}
|
|
230
|
+
* @brief 枚举值[0, 33, 66, 99] 实际对应1/4, 1/2, 3/4, 1
|
|
231
|
+
*/
|
|
232
|
+
area?: number;
|
|
233
|
+
/**
|
|
234
|
+
* @brief 弹幕滚动速度。取值如下:
|
|
235
|
+
*
|
|
236
|
+
* - `0`:弹幕速度为 1/4。
|
|
237
|
+
* - `20`:弹幕速度为 1/2。
|
|
238
|
+
* - `40`:弹幕速度为 1。
|
|
239
|
+
* - `60`:弹幕速度为 5/4。
|
|
240
|
+
* - `80`:弹幕速度为 3/2。
|
|
241
|
+
* - `100`:弹幕速度为 2。
|
|
242
|
+
* @default 40
|
|
243
|
+
*/
|
|
244
|
+
/** {en}
|
|
245
|
+
* @brief 速度, 枚举值[0, 20, 40, 60, 80, 100], 实际对应1/4, 1/2,1,5/4,3/2,2
|
|
246
|
+
*/
|
|
247
|
+
speed?: number;
|
|
248
|
+
/**
|
|
249
|
+
* @brief 弹幕字体大小。取值如下:
|
|
250
|
+
*
|
|
251
|
+
* - `0`:字体大小为 14 px。
|
|
252
|
+
* - `50`:字体大小为 16 px。
|
|
253
|
+
* - `100`:字体大小为 20 px。
|
|
254
|
+
* @default 50
|
|
255
|
+
*/
|
|
256
|
+
/** {en}
|
|
257
|
+
* @brief 字体大小, 枚举值[0, 50, 100],实际对应14px 16px 20px
|
|
258
|
+
*/
|
|
259
|
+
fontSize?: number;
|
|
260
|
+
/**
|
|
261
|
+
* @brief 是否默认开启弹幕。取值如下:
|
|
262
|
+
*
|
|
263
|
+
* - `false`:关闭。
|
|
264
|
+
* - `true`:开启。
|
|
265
|
+
* @default false
|
|
266
|
+
*/
|
|
267
|
+
/** {en}
|
|
268
|
+
* @brief 是否默认开启弹幕
|
|
269
|
+
*/
|
|
270
|
+
active?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* @brief 是否展示弹幕设置面板。取值如下:
|
|
273
|
+
*
|
|
274
|
+
* - `false`:不展示弹幕设置面板。
|
|
275
|
+
* - `true`:展示弹幕设置面板。
|
|
276
|
+
* @default true
|
|
277
|
+
* @hidden
|
|
278
|
+
*/
|
|
279
|
+
/** {en}
|
|
280
|
+
* @brief Whether to enable barrage by default
|
|
281
|
+
*/
|
|
282
|
+
usePanel?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* @brief 弹幕列表。
|
|
285
|
+
* @default -
|
|
286
|
+
*/
|
|
287
|
+
/** {en}
|
|
288
|
+
* @brief 弹幕列表
|
|
289
|
+
*/
|
|
290
|
+
danmuItems?: DanmuItem[];
|
|
291
|
+
/**
|
|
292
|
+
* @hidden
|
|
293
|
+
* @type {ExternalItem[]}
|
|
294
|
+
* @memberof IDanmuConfig
|
|
295
|
+
*/
|
|
296
|
+
external?: ExternalItem[];
|
|
297
|
+
/**
|
|
298
|
+
* @brief 蒙版弹幕配置
|
|
299
|
+
* @default -
|
|
300
|
+
*/
|
|
301
|
+
maskConfig?: IMaskConfig;
|
|
302
|
+
/**
|
|
303
|
+
* @brief 是否开启蒙版弹幕,即对应智能挡板开关
|
|
304
|
+
* @default false
|
|
305
|
+
*/
|
|
306
|
+
maskActive?: boolean;
|
|
307
|
+
}
|
|
308
|
+
export interface IMaskConfig {
|
|
309
|
+
maskUrl: string;
|
|
310
|
+
maskOffset?: number;
|
|
311
|
+
interval?: number;
|
|
312
|
+
}
|
|
313
|
+
/** {zh}
|
|
314
|
+
* @hidden
|
|
315
|
+
* @brief 语言类型
|
|
316
|
+
*/
|
|
317
|
+
/** {en}
|
|
318
|
+
* @hidden
|
|
319
|
+
* @brief 语言类型
|
|
320
|
+
*/
|
|
321
|
+
export interface Lang {
|
|
322
|
+
zh: string;
|
|
323
|
+
en: string;
|
|
324
|
+
[props: string]: string;
|
|
325
|
+
}
|
|
326
|
+
/** {zh}
|
|
327
|
+
* @brief 弹幕项
|
|
328
|
+
* @list Options
|
|
329
|
+
* @kind property
|
|
330
|
+
* @export
|
|
331
|
+
* @interface DanmuItem
|
|
332
|
+
*/
|
|
333
|
+
/** {en}
|
|
334
|
+
* @list Options
|
|
335
|
+
* @kind property
|
|
336
|
+
* @export
|
|
337
|
+
* @interface DanmuItem
|
|
338
|
+
* @brief 弹幕项
|
|
339
|
+
*/
|
|
340
|
+
export interface DanmuItem {
|
|
341
|
+
/**
|
|
342
|
+
* 弹幕唯一id
|
|
343
|
+
*
|
|
344
|
+
* @type {string}
|
|
345
|
+
* @memberof DanmuItem
|
|
346
|
+
* @brief 弹幕唯一 ID。
|
|
347
|
+
*/
|
|
348
|
+
/** {en}
|
|
349
|
+
* @brief 弹幕唯一id
|
|
350
|
+
*/
|
|
351
|
+
id: string;
|
|
352
|
+
/**
|
|
353
|
+
* 弹幕文案
|
|
354
|
+
*
|
|
355
|
+
* @type {string}
|
|
356
|
+
* @memberof DanmuItem
|
|
357
|
+
* @brief 弹幕文案。
|
|
358
|
+
*/
|
|
359
|
+
/** {en}
|
|
360
|
+
* @brief 弹幕文案
|
|
361
|
+
*/
|
|
362
|
+
txt: string;
|
|
363
|
+
/**
|
|
364
|
+
* 弹幕出现时间, 单位为ms
|
|
365
|
+
* @default 0
|
|
366
|
+
* @brief 弹幕出现时间,单位为毫秒。
|
|
367
|
+
*/
|
|
368
|
+
/** {en}
|
|
369
|
+
* @brief 弹幕出现时间, 单位为ms
|
|
370
|
+
*/
|
|
371
|
+
start?: number;
|
|
372
|
+
/**
|
|
373
|
+
* 是否优先显示
|
|
374
|
+
* @hidden
|
|
375
|
+
* @type {boolean}
|
|
376
|
+
* @memberof DanmuItem
|
|
377
|
+
*/
|
|
378
|
+
prior?: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* 弹幕持续显示时间, 单位为ms
|
|
381
|
+
* @default 5000
|
|
382
|
+
*
|
|
383
|
+
* @type {number}
|
|
384
|
+
* @memberof DanmuItem
|
|
385
|
+
* @brief 弹幕持续显示时长,单位为毫秒。
|
|
386
|
+
*/
|
|
387
|
+
/** {en}
|
|
388
|
+
* @brief 弹幕持续显示时间, 单位为ms
|
|
389
|
+
*/
|
|
390
|
+
duration?: number;
|
|
391
|
+
/**
|
|
392
|
+
* @brief 弹幕样式。示例如下:`style : { color: '#ff9500', fontSize: '20px', padding: '2px 11px'}`
|
|
393
|
+
* @example
|
|
394
|
+
* ``` javascript
|
|
395
|
+
* {
|
|
396
|
+
* color: '#ff9500',
|
|
397
|
+
* fontSize: '20px',
|
|
398
|
+
* padding: '2px 11px'
|
|
399
|
+
* }
|
|
400
|
+
*```
|
|
401
|
+
* @type {Partial<Record<Property, string>>}
|
|
402
|
+
* @memberof DanmuItem
|
|
403
|
+
*/
|
|
404
|
+
/** {en}
|
|
405
|
+
* @brief 弹幕样式
|
|
406
|
+
*/
|
|
407
|
+
style?: CSSStyleDeclaration;
|
|
408
|
+
}
|
|
409
|
+
export interface ExternalItem {
|
|
410
|
+
key: string;
|
|
411
|
+
name: string;
|
|
412
|
+
value: boolean;
|
|
413
|
+
lang?: Lang;
|
|
414
|
+
}
|
|
197
415
|
/**
|
|
198
416
|
* @brief 外挂字幕配置。
|
|
199
417
|
* @list Options
|
|
@@ -1358,6 +1576,11 @@ export interface IStartConfig {
|
|
|
1358
1576
|
*/
|
|
1359
1577
|
mode?: "hide" | "show" | "auto";
|
|
1360
1578
|
}
|
|
1579
|
+
/**
|
|
1580
|
+
* @hidden
|
|
1581
|
+
* @brief 西瓜插件
|
|
1582
|
+
*/
|
|
1583
|
+
export declare type XGPlugin = typeof Plugin | typeof BasePlugin;
|
|
1361
1584
|
/**
|
|
1362
1585
|
* @brief 自动播放配置。
|
|
1363
1586
|
* @list Options
|
|
@@ -1902,14 +2125,9 @@ export declare class MemoryPlay extends Plugin {
|
|
|
1902
2125
|
getTimeByStorage(memoryId: string): string | 0;
|
|
1903
2126
|
destroy(): void;
|
|
1904
2127
|
}
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
export declare const enum EDRMTYPE {
|
|
1909
|
-
DRM_ENCRYPT = "drm_encrypt",
|
|
1910
|
-
PRIVATE_ENCRYPT = "private_encrypt",
|
|
1911
|
-
PRIVATE_ENCRYPT_UPGRADE = "private_encrypt_upgrade",
|
|
1912
|
-
STANDARD_ENCRYPT = "standard_encrypt"
|
|
2128
|
+
export interface IVolume {
|
|
2129
|
+
Loudness: number;
|
|
2130
|
+
Peak: number;
|
|
1913
2131
|
}
|
|
1914
2132
|
/** {zh}
|
|
1915
2133
|
* @hidden
|
|
@@ -1920,7 +2138,7 @@ export interface IPlayInfoListItem {
|
|
|
1920
2138
|
BarrageMaskOffset: string;
|
|
1921
2139
|
Bitrate: number;
|
|
1922
2140
|
CheckInfo: string;
|
|
1923
|
-
Codec:
|
|
2141
|
+
Codec: ICodecType;
|
|
1924
2142
|
Definition: string;
|
|
1925
2143
|
Duration: number;
|
|
1926
2144
|
FileId: string;
|
|
@@ -2025,55 +2243,62 @@ export interface IGetPlayInfoRes {
|
|
|
2025
2243
|
TotalCount: number;
|
|
2026
2244
|
Version: number;
|
|
2027
2245
|
}
|
|
2028
|
-
/**
|
|
2029
|
-
* @author bytedance
|
|
2030
|
-
* @version 1.0
|
|
2031
|
-
* @Description
|
|
2032
|
-
* @date 2024/5/17 15:53
|
|
2033
|
-
*/
|
|
2034
2246
|
/** {zh}
|
|
2035
2247
|
* @list Options
|
|
2036
2248
|
* @brief 视频编码格式。
|
|
2037
2249
|
*/
|
|
2038
|
-
export declare const
|
|
2250
|
+
export declare const CodecType: {
|
|
2039
2251
|
/** {zh}
|
|
2040
2252
|
* @brief H.264
|
|
2041
2253
|
*/
|
|
2042
|
-
H264
|
|
2254
|
+
readonly H264: "h264";
|
|
2043
2255
|
/** {zh}
|
|
2044
2256
|
* @brief H.265
|
|
2045
2257
|
*/
|
|
2046
|
-
H265
|
|
2258
|
+
readonly H265: "h265";
|
|
2047
2259
|
/** {zh}
|
|
2048
2260
|
* @brief H.266
|
|
2049
2261
|
*/
|
|
2050
|
-
H266
|
|
2262
|
+
readonly H266: "h266";
|
|
2051
2263
|
/** {zh}
|
|
2052
2264
|
* @brief 音频 AAC,含 heaacv2
|
|
2053
2265
|
*/
|
|
2054
|
-
AAC
|
|
2266
|
+
readonly AAC: "aac";
|
|
2055
2267
|
/** {zh}
|
|
2056
2268
|
* @brief 音频 MP3
|
|
2057
2269
|
*/
|
|
2058
|
-
MP3
|
|
2270
|
+
readonly MP3: "mp3";
|
|
2059
2271
|
/** {zh}
|
|
2060
2272
|
* @brief 音频 OPUS
|
|
2061
2273
|
*/
|
|
2062
|
-
OPUS
|
|
2274
|
+
readonly OPUS: "opus";
|
|
2063
2275
|
/** {zh}
|
|
2064
2276
|
* @brief 未知编码格式
|
|
2065
2277
|
*/
|
|
2066
|
-
UNKNOWN
|
|
2067
|
-
}
|
|
2068
|
-
declare
|
|
2278
|
+
readonly UNKNOWN: "unknown";
|
|
2279
|
+
};
|
|
2280
|
+
export declare type ICodecType = (typeof CodecType)[keyof typeof CodecType];
|
|
2281
|
+
export declare const ContentType: {
|
|
2282
|
+
h265: string;
|
|
2283
|
+
h264: string;
|
|
2284
|
+
};
|
|
2285
|
+
export declare enum RTMCodec {
|
|
2069
2286
|
H264 = "h264"
|
|
2070
2287
|
}
|
|
2071
|
-
|
|
2288
|
+
/** {zh}
|
|
2289
|
+
* @hidden
|
|
2290
|
+
* @brief 音频封装格式
|
|
2291
|
+
*/
|
|
2292
|
+
export declare enum EVideoFormat {
|
|
2072
2293
|
MP4 = "mp4",
|
|
2073
2294
|
DASH = "dash",
|
|
2074
2295
|
HLS = "hls"
|
|
2075
2296
|
}
|
|
2076
|
-
|
|
2297
|
+
/** {zh}
|
|
2298
|
+
* @hidden
|
|
2299
|
+
* @brief 视频封装格式
|
|
2300
|
+
*/
|
|
2301
|
+
export declare enum EAudioFormat {
|
|
2077
2302
|
M4A = "m4a",
|
|
2078
2303
|
MP4 = "mp4",
|
|
2079
2304
|
MP3 = "mp3",
|
|
@@ -2081,6 +2306,45 @@ declare enum EAudioFormat {
|
|
|
2081
2306
|
HLS = "hls",
|
|
2082
2307
|
OGG = "ogg"
|
|
2083
2308
|
}
|
|
2309
|
+
/** {zh}
|
|
2310
|
+
* @brief 加密播放类型
|
|
2311
|
+
*/
|
|
2312
|
+
export declare const enum EDRMTYPE {
|
|
2313
|
+
/**
|
|
2314
|
+
* @brief 商业DRM
|
|
2315
|
+
*/
|
|
2316
|
+
DRM_ENCRYPT = "drm_encrypt",
|
|
2317
|
+
/**
|
|
2318
|
+
* @brief 旧私有加密
|
|
2319
|
+
*/
|
|
2320
|
+
PRIVATE_ENCRYPT = "private_encrypt",
|
|
2321
|
+
/**
|
|
2322
|
+
* @brief 新私有加密
|
|
2323
|
+
*/
|
|
2324
|
+
PRIVATE_ENCRYPT_UPGRADE = "private_encrypt_upgrade",
|
|
2325
|
+
/**
|
|
2326
|
+
* @brief HLS标准加密
|
|
2327
|
+
*/
|
|
2328
|
+
STANDARD_ENCRYPT = "standard_encrypt"
|
|
2329
|
+
}
|
|
2330
|
+
export interface IVideoInfo {
|
|
2331
|
+
playList: Stream[];
|
|
2332
|
+
vid: string;
|
|
2333
|
+
defaultDefinitionData: Stream;
|
|
2334
|
+
codec: ICodecType;
|
|
2335
|
+
dashOpts?: {
|
|
2336
|
+
Data: IGetPlayInfoRes;
|
|
2337
|
+
};
|
|
2338
|
+
}
|
|
2339
|
+
export declare type TRegionConfig = {
|
|
2340
|
+
__PLAY_DOMAIN__: string;
|
|
2341
|
+
__BACKUP_PLAY_DOMAIN__?: string;
|
|
2342
|
+
__LOG_TEA_ID__: number;
|
|
2343
|
+
__LOG_CHANNEL__: TLogChannel;
|
|
2344
|
+
__LOG_CUSTOM_REGION__?: string;
|
|
2345
|
+
__UMD_PRE_PATH__: string;
|
|
2346
|
+
};
|
|
2347
|
+
export declare type TLogChannel = "cn" | "va" | "sg";
|
|
2084
2348
|
/** {zh}
|
|
2085
2349
|
* @brief 区域类型:
|
|
2086
2350
|
* - `'cn'`:中国内地
|
|
@@ -2276,7 +2540,7 @@ export interface Stream extends Partial<IPlayInfoListItem> {
|
|
|
2276
2540
|
* @brief 编码格式
|
|
2277
2541
|
* @default unknown
|
|
2278
2542
|
*/
|
|
2279
|
-
codec?:
|
|
2543
|
+
codec?: ICodecType;
|
|
2280
2544
|
/** {zh}
|
|
2281
2545
|
* @brief 线路唯一 ID
|
|
2282
2546
|
*/
|
|
@@ -2322,6 +2586,20 @@ export interface Stream extends Partial<IPlayInfoListItem> {
|
|
|
2322
2586
|
* @default -
|
|
2323
2587
|
*/
|
|
2324
2588
|
urlExpireTimestamp?: number;
|
|
2589
|
+
/**
|
|
2590
|
+
* @brief 视频为加密视频时的密钥KeyId,对应{@link https://www.volcengine.com/docs/4/2918 GetPlayInfo} 接口返回的PlayInfoList项中的 PlayAuthId
|
|
2591
|
+
* @default -
|
|
2592
|
+
*/
|
|
2593
|
+
kid?: string;
|
|
2594
|
+
/** {zh}
|
|
2595
|
+
* @brief 私有加密播放的加密密钥,对应{@link https://www.volcengine.com/docs/4/2918 GetPlayInfo} 接口返回的PlayInfoList项中的 PlayAuth
|
|
2596
|
+
*/
|
|
2597
|
+
secretKey?: string;
|
|
2598
|
+
/**
|
|
2599
|
+
* @brief 视频为加密视频时的加密类型
|
|
2600
|
+
* @default -
|
|
2601
|
+
*/
|
|
2602
|
+
drmType?: EDRMTYPE;
|
|
2325
2603
|
/** {zh}
|
|
2326
2604
|
* @hidden
|
|
2327
2605
|
*/
|
|
@@ -2365,21 +2643,6 @@ export interface Current extends Partial<Stream> {
|
|
|
2365
2643
|
* @default -
|
|
2366
2644
|
*/
|
|
2367
2645
|
lineId?: number | string;
|
|
2368
|
-
/**
|
|
2369
|
-
* @brief 视频编码格式
|
|
2370
|
-
* @default unknown
|
|
2371
|
-
*/
|
|
2372
|
-
codec?: CodecType;
|
|
2373
|
-
/**
|
|
2374
|
-
* @brief 视频为加密视频时的密钥KeyId
|
|
2375
|
-
* @default -
|
|
2376
|
-
*/
|
|
2377
|
-
kid?: string;
|
|
2378
|
-
/**
|
|
2379
|
-
* @brief 视频为加密视频时的加密类型
|
|
2380
|
-
* @default -
|
|
2381
|
-
*/
|
|
2382
|
-
drmType?: EDRMTYPE;
|
|
2383
2646
|
/**
|
|
2384
2647
|
* @brief 地址的过期时间戳,vid模式下不用输入,播放器自动获取。如果是火山引擎的CDN分发地址,在不传入过期时间戳时,则需指定urlType,支持{@link https://www.volcengine.com/docs/4/177191 A-E类型},其他云厂商或者业务服务器存储的地址不支持。
|
|
2385
2648
|
* @default -
|
|
@@ -2454,6 +2717,24 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2454
2717
|
* @memberof IPlayerConfig
|
|
2455
2718
|
*/
|
|
2456
2719
|
getVideoByToken?: IPlayAuthTokenConfig;
|
|
2720
|
+
/** {zh}
|
|
2721
|
+
* @brief 视频加密类型
|
|
2722
|
+
* @default -
|
|
2723
|
+
*/
|
|
2724
|
+
drmType?: EDRMTYPE;
|
|
2725
|
+
/** {zh}
|
|
2726
|
+
* @brief 私有加密会话id
|
|
2727
|
+
*/
|
|
2728
|
+
encryptSessionId?: string;
|
|
2729
|
+
/**
|
|
2730
|
+
* @brief 视频为加密视频时的密钥KeyId,对应{@link https://www.volcengine.com/docs/4/2918 GetPlayInfo} 接口返回的PlayInfoList项中的 PlayAuthId
|
|
2731
|
+
* @default -
|
|
2732
|
+
*/
|
|
2733
|
+
playAuthId?: string;
|
|
2734
|
+
/** {zh}
|
|
2735
|
+
* @brief 私有加密播放的加密密钥,对应{@link https://www.volcengine.com/docs/4/2918 GetPlayInfo} 接口返回的PlayInfoList项中的 PlayAuth
|
|
2736
|
+
*/
|
|
2737
|
+
playAuth?: string;
|
|
2457
2738
|
/** {zh}
|
|
2458
2739
|
* @brief 视频格式。取值如下:
|
|
2459
2740
|
* - `mp4`
|
|
@@ -2593,7 +2874,7 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2593
2874
|
* @listtip - 在已知视频编码方式的情况下推荐传入,以便日志分析。
|
|
2594
2875
|
* - 在 `useSoftDecoding` 参数为 `true`(开启 H.265 兼容降级模式)时,建议传入,可提升软解初始效率。
|
|
2595
2876
|
*/
|
|
2596
|
-
codec?:
|
|
2877
|
+
codec?: ICodecType;
|
|
2597
2878
|
/** {zh}
|
|
2598
2879
|
* @brief 点播服务所在区域,影响服务接口和日志上报
|
|
2599
2880
|
* @default cn
|
|
@@ -3312,6 +3593,27 @@ export interface definitionItem {
|
|
|
3312
3593
|
*/
|
|
3313
3594
|
definitionTextKey?: string;
|
|
3314
3595
|
}
|
|
3596
|
+
/** {zh}
|
|
3597
|
+
* @brief 可扩展插件结构
|
|
3598
|
+
*/
|
|
3599
|
+
export interface EventPlugin {
|
|
3600
|
+
pluginName: string;
|
|
3601
|
+
type?: "inner" | "normal" | string;
|
|
3602
|
+
position?: string;
|
|
3603
|
+
icon?: string;
|
|
3604
|
+
index?: number;
|
|
3605
|
+
tips?: Transition;
|
|
3606
|
+
hideAtFullScreen?: boolean;
|
|
3607
|
+
}
|
|
3608
|
+
/** {zh}
|
|
3609
|
+
* @brief 多语言翻译结构体
|
|
3610
|
+
*/
|
|
3611
|
+
export interface Transition {
|
|
3612
|
+
jp?: string;
|
|
3613
|
+
en?: string;
|
|
3614
|
+
zh?: string;
|
|
3615
|
+
"zh-hk"?: string;
|
|
3616
|
+
}
|
|
3315
3617
|
/** {zh}
|
|
3316
3618
|
* @brief 插件按钮位置
|
|
3317
3619
|
*/
|
|
@@ -3358,7 +3660,7 @@ export declare const enum POSITIONS {
|
|
|
3358
3660
|
* @brief Plugin类插件基础配置
|
|
3359
3661
|
*/
|
|
3360
3662
|
export interface IPluginConfig {
|
|
3361
|
-
position?: typeof Plugin.POSITIONS[keyof typeof Plugin.POSITIONS];
|
|
3663
|
+
position?: (typeof Plugin.POSITIONS)[keyof typeof Plugin.POSITIONS];
|
|
3362
3664
|
index?: number;
|
|
3363
3665
|
disable?: boolean;
|
|
3364
3666
|
}
|
|
@@ -3587,6 +3889,11 @@ export interface IThumbnailConfig {
|
|
|
3587
3889
|
*/
|
|
3588
3890
|
hidePortrait?: false;
|
|
3589
3891
|
}
|
|
3892
|
+
export interface ISourceConfig {
|
|
3893
|
+
url?: string;
|
|
3894
|
+
playList?: Stream[];
|
|
3895
|
+
getVideByToken?: IPlayAuthTokenConfig;
|
|
3896
|
+
}
|
|
3590
3897
|
/**
|
|
3591
3898
|
* @brief api map
|
|
3592
3899
|
* @hidden
|
|
@@ -3935,6 +4242,166 @@ declare class VeStrategyWrapper {
|
|
|
3935
4242
|
private initPreloaderConfig;
|
|
3936
4243
|
}
|
|
3937
4244
|
declare const _default: VeStrategyWrapper;
|
|
4245
|
+
declare enum UmdKeys {
|
|
4246
|
+
HLS = "hls",
|
|
4247
|
+
FLV = "flv",
|
|
4248
|
+
XGVideo = "XGVideo",
|
|
4249
|
+
HLSEncrypt = "hlsEncrypt",
|
|
4250
|
+
DASH = "dash",
|
|
4251
|
+
MP4Encrypt = "mp4Encrypt",
|
|
4252
|
+
DanmuJS = "danmujs",
|
|
4253
|
+
DanmuMask = "danmuMask",
|
|
4254
|
+
StreamProbe = "streamprobe",
|
|
4255
|
+
VeStrategy = "vestrategy",
|
|
4256
|
+
VeStrategyH265 = "vestrategy_h265",
|
|
4257
|
+
VeStrategyPreload = "vestrategy_preload",
|
|
4258
|
+
VeStrategyAdaptRange = "vestrategy_adapt_range",
|
|
4259
|
+
DashAbralgo = "DashAbralgo",
|
|
4260
|
+
Preloader = "preloader"
|
|
4261
|
+
}
|
|
4262
|
+
/**
|
|
4263
|
+
* @hidden
|
|
4264
|
+
* @breif umdmap 配置
|
|
4265
|
+
*/
|
|
4266
|
+
export declare type UMDMap = Record<UmdKeys, {
|
|
4267
|
+
/**
|
|
4268
|
+
* umd Module 的名称,即在window下暴露的接口名称
|
|
4269
|
+
*/
|
|
4270
|
+
name: string;
|
|
4271
|
+
/**
|
|
4272
|
+
* 对应umd文件名,只用来标记,实际不使用
|
|
4273
|
+
*/
|
|
4274
|
+
pluginName?: string;
|
|
4275
|
+
/**
|
|
4276
|
+
* 对应npm包的名称,在打包文件时,会在libd.config.js中onPostBuild的钩子中会用于寻找对应npm包
|
|
4277
|
+
*/
|
|
4278
|
+
packageName: string;
|
|
4279
|
+
/**
|
|
4280
|
+
* npm包中umd入口文件路径,用于打包上传到cdn目录
|
|
4281
|
+
*/
|
|
4282
|
+
devPath: string;
|
|
4283
|
+
}>;
|
|
4284
|
+
declare class UMDLoader {
|
|
4285
|
+
private static jsLoadMap;
|
|
4286
|
+
private static jsLoadPromiseMap;
|
|
4287
|
+
umdMap: UMDMap;
|
|
4288
|
+
backupUmdUrlMap: Record<string, string>;
|
|
4289
|
+
failCallback: (umdName: string, err: any) => any;
|
|
4290
|
+
region: TRegionType;
|
|
4291
|
+
customPluginPublicPath: string;
|
|
4292
|
+
importedPlugins: any[];
|
|
4293
|
+
constructor();
|
|
4294
|
+
/**
|
|
4295
|
+
* @return { string } 插件加载的公共路径
|
|
4296
|
+
*/
|
|
4297
|
+
get pluginPublicPath(): string;
|
|
4298
|
+
/**
|
|
4299
|
+
* 更新umd的备用地址
|
|
4300
|
+
* @param {Record<string, string>} map 备用地址map
|
|
4301
|
+
*/
|
|
4302
|
+
updateBackupMap(map: Record<string, string>): void;
|
|
4303
|
+
/**
|
|
4304
|
+
* 加载额外的js-sdk
|
|
4305
|
+
* 适用 umd 模块
|
|
4306
|
+
* 只能浏览器环境下使用
|
|
4307
|
+
* @param url 额外加载JS 的 CDN 地址
|
|
4308
|
+
* @param isJs 是否js文件
|
|
4309
|
+
*/
|
|
4310
|
+
loadExtraCdn(url: string, isJs?: boolean): Promise<void>;
|
|
4311
|
+
/**
|
|
4312
|
+
* @description 加载xgplayer插件
|
|
4313
|
+
* @param pluginName 插件名称
|
|
4314
|
+
* @param successCallback 加载完成后执行的回调
|
|
4315
|
+
* @return Promise<any>
|
|
4316
|
+
*/
|
|
4317
|
+
loadPlugins(pluginName: UmdKeys, successCallback?: () => void): Promise<any>;
|
|
4318
|
+
}
|
|
4319
|
+
export declare class SdkPlugin {
|
|
4320
|
+
pluginName: string;
|
|
4321
|
+
__args: any;
|
|
4322
|
+
sdk: VePlayer;
|
|
4323
|
+
playerData: PlayerData;
|
|
4324
|
+
player: Player;
|
|
4325
|
+
_emitter: EventEmitter;
|
|
4326
|
+
static defineGetterOrSetter(Obj: any, map: any): void;
|
|
4327
|
+
/**
|
|
4328
|
+
* @type { string }
|
|
4329
|
+
*/
|
|
4330
|
+
static get pluginName(): string;
|
|
4331
|
+
/**
|
|
4332
|
+
* @constructor
|
|
4333
|
+
* @param { { sdk: object, pluginName: string, [propName: string]: any;} } args
|
|
4334
|
+
*/
|
|
4335
|
+
constructor(args: any);
|
|
4336
|
+
/**
|
|
4337
|
+
* @description sdk实例创建,挂载插件实例时首先执行
|
|
4338
|
+
*/
|
|
4339
|
+
beforeCreate(): void;
|
|
4340
|
+
/**
|
|
4341
|
+
* @description sdk实例创建,挂载插件实例完后执行
|
|
4342
|
+
*/
|
|
4343
|
+
afterCreate(): void;
|
|
4344
|
+
/**
|
|
4345
|
+
* @description sdk创建播放器前执行,只有这里能保证异步操作在creatPlayer之前同步完成
|
|
4346
|
+
*/
|
|
4347
|
+
beforePlayerCreate(): void;
|
|
4348
|
+
/**
|
|
4349
|
+
* @description sdk创建播放器完执行
|
|
4350
|
+
*/
|
|
4351
|
+
afterPlayerCreate(): void;
|
|
4352
|
+
/**
|
|
4353
|
+
* @description sdk销毁时执行
|
|
4354
|
+
*/
|
|
4355
|
+
destroy(): void;
|
|
4356
|
+
/**
|
|
4357
|
+
* @private
|
|
4358
|
+
* @param { any } args
|
|
4359
|
+
*/
|
|
4360
|
+
__init(args: any): void;
|
|
4361
|
+
/**
|
|
4362
|
+
* @description 插件销毁
|
|
4363
|
+
* @private
|
|
4364
|
+
*/
|
|
4365
|
+
__destroy(): void;
|
|
4366
|
+
}
|
|
4367
|
+
declare class AuthToken extends SdkPlugin {
|
|
4368
|
+
static get pluginName(): string;
|
|
4369
|
+
isPlayByToken: boolean;
|
|
4370
|
+
isEncrypt: boolean;
|
|
4371
|
+
tokenInfo: ITokenInfo;
|
|
4372
|
+
keyTokenInfo: ITokenInfo;
|
|
4373
|
+
thirdPartyDrmAuthTokenInfo: ITokenInfo;
|
|
4374
|
+
config: IPlayAuthTokenConfig;
|
|
4375
|
+
privateDrmAuthToken: string;
|
|
4376
|
+
useUnionInfoDRM: boolean;
|
|
4377
|
+
sessionId: string;
|
|
4378
|
+
retryCount: number;
|
|
4379
|
+
playInfo?: VideoInfoRes;
|
|
4380
|
+
constructor(args: any);
|
|
4381
|
+
beforePlayerCreate(): Promise<void>;
|
|
4382
|
+
getVideoInfo(): Promise<{
|
|
4383
|
+
vid: string;
|
|
4384
|
+
playList: Stream[];
|
|
4385
|
+
codec: ICodecType;
|
|
4386
|
+
defaultDefinition: string;
|
|
4387
|
+
}>;
|
|
4388
|
+
getVideos(): Promise<any>;
|
|
4389
|
+
getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
|
|
4390
|
+
getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
|
|
4391
|
+
getBarrageMaskUrl(url: string): void;
|
|
4392
|
+
getDrmConfig(videoInfo: IVideoInfo): void;
|
|
4393
|
+
init(): void;
|
|
4394
|
+
initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
|
|
4395
|
+
/**
|
|
4396
|
+
* @description 更新playAuthToken
|
|
4397
|
+
* @param {IPlayAuthTokenConfig} getVideoByToken token信息
|
|
4398
|
+
* @param {boolean} isNewVideo 是否新视频,即是否为切换视频
|
|
4399
|
+
*/
|
|
4400
|
+
updateAuthToken(getVideoByToken: IPlayAuthTokenConfig, isNewVideo: boolean): Promise<void>;
|
|
4401
|
+
checkPlayAuthTokenValid(): boolean;
|
|
4402
|
+
checkKeyTokenValid(): boolean;
|
|
4403
|
+
checkDrmAuthTokenValid(): boolean;
|
|
4404
|
+
}
|
|
3938
4405
|
/** {zh}
|
|
3939
4406
|
* @hidden
|
|
3940
4407
|
*/
|
|
@@ -3976,6 +4443,8 @@ declare abstract class AbstractBaseAdapter {
|
|
|
3976
4443
|
abstract adaptRangeDefaultOptions(): IAdaptRangeDefaultOptions | undefined;
|
|
3977
4444
|
abstract applyAdaptRangePluginConfig(_finalOptions: any, _adaptRangeOptions: any): void;
|
|
3978
4445
|
abstract applyAdaptRangeStrategy(_finalOptions: any, _adaptRangeOptions: any): void;
|
|
4446
|
+
abstract getPlugins(umdLoader: UMDLoader): Promise<XGPlugin[]>;
|
|
4447
|
+
abstract setPluginConfigInVid(videoInfo: IVideoInfo, context: AuthToken): void;
|
|
3979
4448
|
}
|
|
3980
4449
|
declare class PlayerData {
|
|
3981
4450
|
id?: string;
|
|
@@ -3991,7 +4460,7 @@ declare class PlayerData {
|
|
|
3991
4460
|
openSoftDecoding: boolean;
|
|
3992
4461
|
defaultConfig: IDefaultConfig | undefined;
|
|
3993
4462
|
isHitDefault: boolean;
|
|
3994
|
-
codec?:
|
|
4463
|
+
codec?: ICodecType;
|
|
3995
4464
|
enableH265Degrade: boolean;
|
|
3996
4465
|
languageData: {
|
|
3997
4466
|
extraLangList: IXGI18nText[];
|
|
@@ -4022,12 +4491,25 @@ declare class PlayerData {
|
|
|
4022
4491
|
};
|
|
4023
4492
|
private isAutoBitrateEnable;
|
|
4024
4493
|
adapter: AbstractBaseAdapter;
|
|
4025
|
-
|
|
4026
|
-
|
|
4494
|
+
/**
|
|
4495
|
+
* @breif 是否vid模式的加密播放
|
|
4496
|
+
*/
|
|
4497
|
+
isVidEncrypt: boolean;
|
|
4027
4498
|
dashOpts: {
|
|
4028
4499
|
Data: IGetPlayInfoRes;
|
|
4029
4500
|
};
|
|
4501
|
+
/**
|
|
4502
|
+
* @brief 播放器sdk实例
|
|
4503
|
+
*/
|
|
4030
4504
|
sdk: VePlayer;
|
|
4505
|
+
/**
|
|
4506
|
+
* @brief 当前加密播放类型,为空则表示非加密
|
|
4507
|
+
*/
|
|
4508
|
+
drmType?: EDRMTYPE;
|
|
4509
|
+
/**
|
|
4510
|
+
* @brief 私有加密会话id
|
|
4511
|
+
*/
|
|
4512
|
+
encryptSessionId?: string;
|
|
4031
4513
|
constructor(configs: IPlayerConfig & {
|
|
4032
4514
|
licensSupportModuleList: string[];
|
|
4033
4515
|
}, sdk: VePlayer);
|
|
@@ -4044,6 +4526,7 @@ declare class PlayerData {
|
|
|
4044
4526
|
playList: Stream[];
|
|
4045
4527
|
};
|
|
4046
4528
|
isCurrentH265(): boolean;
|
|
4529
|
+
setDrmType(drmType: EDRMTYPE): void;
|
|
4047
4530
|
getCurrentByDefaultConfig(): Stream;
|
|
4048
4531
|
initCurrent(currentStreams: Stream): void;
|
|
4049
4532
|
initCheckExpireData(): void;
|
|
@@ -4156,80 +4639,6 @@ declare class MobilePlayerPanel {
|
|
|
4156
4639
|
bind(event: string, eventHandle: any, isBubble?: boolean): void;
|
|
4157
4640
|
destroy(): void;
|
|
4158
4641
|
}
|
|
4159
|
-
declare enum UmdKeys {
|
|
4160
|
-
HLS = "hls",
|
|
4161
|
-
FLV = "flv",
|
|
4162
|
-
XGVideo = "XGVideo",
|
|
4163
|
-
HLSEncrypt = "hlsEncrypt",
|
|
4164
|
-
DASH = "dash",
|
|
4165
|
-
MP4Encrypt = "mp4Encrypt",
|
|
4166
|
-
DanmuJS = "danmujs",
|
|
4167
|
-
DanmuMask = "danmuMask",
|
|
4168
|
-
StreamProbe = "streamprobe",
|
|
4169
|
-
VeStrategy = "vestrategy",
|
|
4170
|
-
VeStrategyH265 = "vestrategy_h265",
|
|
4171
|
-
VeStrategyPreload = "vestrategy_preload",
|
|
4172
|
-
VeStrategyAdaptRange = "vestrategy_adapt_range",
|
|
4173
|
-
DashAbralgo = "DashAbralgo",
|
|
4174
|
-
Preloader = "preloader"
|
|
4175
|
-
}
|
|
4176
|
-
/**
|
|
4177
|
-
* @hidden
|
|
4178
|
-
* @breif umdmap 配置
|
|
4179
|
-
*/
|
|
4180
|
-
export declare type UMDMap = Record<UmdKeys, {
|
|
4181
|
-
/**
|
|
4182
|
-
* umd Module 的名称,即在window下暴露的接口名称
|
|
4183
|
-
*/
|
|
4184
|
-
name: string;
|
|
4185
|
-
/**
|
|
4186
|
-
* 对应umd文件名,只用来标记,实际不使用
|
|
4187
|
-
*/
|
|
4188
|
-
pluginName?: string;
|
|
4189
|
-
/**
|
|
4190
|
-
* 对应npm包的名称,在打包文件时,会在libd.config.js中onPostBuild的钩子中会用于寻找对应npm包
|
|
4191
|
-
*/
|
|
4192
|
-
packageName: string;
|
|
4193
|
-
/**
|
|
4194
|
-
* npm包中umd入口文件路径,用于打包上传到cdn目录
|
|
4195
|
-
*/
|
|
4196
|
-
devPath: string;
|
|
4197
|
-
}>;
|
|
4198
|
-
declare class umdLoader {
|
|
4199
|
-
private static jsLoadMap;
|
|
4200
|
-
private static jsLoadPromiseMap;
|
|
4201
|
-
umdMap: UMDMap;
|
|
4202
|
-
backupUmdUrlMap: Record<string, string>;
|
|
4203
|
-
failCallback: (umdName: string, err: any) => any;
|
|
4204
|
-
region: TRegionType;
|
|
4205
|
-
customPluginPublicPath: string;
|
|
4206
|
-
importedPlugins: any[];
|
|
4207
|
-
constructor();
|
|
4208
|
-
/**
|
|
4209
|
-
* @return { string } 插件加载的公共路径
|
|
4210
|
-
*/
|
|
4211
|
-
get pluginPublicPath(): string;
|
|
4212
|
-
/**
|
|
4213
|
-
* 更新umd的备用地址
|
|
4214
|
-
* @param {Record<string, string>} map 备用地址map
|
|
4215
|
-
*/
|
|
4216
|
-
updateBackupMap(map: Record<string, string>): void;
|
|
4217
|
-
/**
|
|
4218
|
-
* 加载额外的js-sdk
|
|
4219
|
-
* 适用 umd 模块
|
|
4220
|
-
* 只能浏览器环境下使用
|
|
4221
|
-
* @param url 额外加载JS 的 CDN 地址
|
|
4222
|
-
* @param isJs 是否js文件
|
|
4223
|
-
*/
|
|
4224
|
-
loadExtraCdn(url: string, isJs?: boolean): Promise<void>;
|
|
4225
|
-
/**
|
|
4226
|
-
* @description 加载xgplayer插件
|
|
4227
|
-
* @param pluginName 插件名称
|
|
4228
|
-
* @param successCallback 加载完成后执行的回调
|
|
4229
|
-
* @return Promise<any>
|
|
4230
|
-
*/
|
|
4231
|
-
loadPlugins(pluginName: UmdKeys, successCallback?: () => void): Promise<any>;
|
|
4232
|
-
}
|
|
4233
4642
|
export interface IlicenseContent {
|
|
4234
4643
|
content: string;
|
|
4235
4644
|
sign: string;
|
|
@@ -4278,6 +4687,23 @@ export declare type PlayerCore = Player & {
|
|
|
4278
4687
|
licenseType: LicenseEdition;
|
|
4279
4688
|
};
|
|
4280
4689
|
};
|
|
4690
|
+
/**
|
|
4691
|
+
* @brief 加密混淆信息
|
|
4692
|
+
*/
|
|
4693
|
+
export interface EncryptInfo {
|
|
4694
|
+
/**
|
|
4695
|
+
* @breif 会话ID
|
|
4696
|
+
*/
|
|
4697
|
+
sessionId: string;
|
|
4698
|
+
/**
|
|
4699
|
+
* @brief 混淆后的公钥
|
|
4700
|
+
*/
|
|
4701
|
+
drmKeK: string;
|
|
4702
|
+
/**
|
|
4703
|
+
* @breif 唯一身份信息
|
|
4704
|
+
*/
|
|
4705
|
+
unionInfo: string;
|
|
4706
|
+
}
|
|
4281
4707
|
declare class VePlayer {
|
|
4282
4708
|
/** {zh}
|
|
4283
4709
|
* @brief 播放相关配置数据
|
|
@@ -4380,7 +4806,7 @@ declare class VePlayer {
|
|
|
4380
4806
|
* @type {*}
|
|
4381
4807
|
* @memberof VePlayer
|
|
4382
4808
|
*/
|
|
4383
|
-
sdkUmdLoader:
|
|
4809
|
+
sdkUmdLoader: UMDLoader;
|
|
4384
4810
|
private adapter;
|
|
4385
4811
|
/**
|
|
4386
4812
|
* @hidden
|
|
@@ -4400,10 +4826,16 @@ declare class VePlayer {
|
|
|
4400
4826
|
* @memberof VePlayer
|
|
4401
4827
|
*/
|
|
4402
4828
|
static sdkVersion: string;
|
|
4829
|
+
/**
|
|
4830
|
+
* @hidden
|
|
4831
|
+
* @private 私有加密会话id
|
|
4832
|
+
*/
|
|
4833
|
+
private static privateEncryptSessionId;
|
|
4403
4834
|
/**
|
|
4404
4835
|
* @hidden
|
|
4405
4836
|
*/
|
|
4406
4837
|
private veErrorIns;
|
|
4838
|
+
private vodLogCommon;
|
|
4407
4839
|
/** {zh}
|
|
4408
4840
|
* @brief 播放策略预初始化配置
|
|
4409
4841
|
* @param options 初始化配置,详情见{@link StrategyInitOptions}
|
|
@@ -4450,7 +4882,12 @@ declare class VePlayer {
|
|
|
4450
4882
|
static checkModuleList(): Promise<string[]>;
|
|
4451
4883
|
static checkLicenseStatus(): Promise<LicenseStatus>;
|
|
4452
4884
|
static checkLicenseModuleAuth(module: string, featureName: LicenseFeature): Promise<boolean>;
|
|
4453
|
-
|
|
4885
|
+
/**
|
|
4886
|
+
* @breif 生成加密混淆的数据信息
|
|
4887
|
+
* @param unionId 用户唯一id
|
|
4888
|
+
* @param streamType 私有加密视频的格式/协议,取值有:hls、mp4、dash。
|
|
4889
|
+
*/
|
|
4890
|
+
static generateEncryptInfo(unionId: string, streamType: "hls" | "mp4" | "dash"): Promise<EncryptInfo | undefined>;
|
|
4454
4891
|
private static hasInitVeStrategy;
|
|
4455
4892
|
/**
|
|
4456
4893
|
* @hidden
|
|
@@ -4493,10 +4930,16 @@ declare class VePlayer {
|
|
|
4493
4930
|
private _initCheckExpire;
|
|
4494
4931
|
/**
|
|
4495
4932
|
* @hidden
|
|
4496
|
-
* @description
|
|
4933
|
+
* @description 初始化umdLoader 的配置
|
|
4497
4934
|
* @memberof VePlayer
|
|
4498
4935
|
*/
|
|
4499
4936
|
private initUmdLoader;
|
|
4937
|
+
/**
|
|
4938
|
+
* @hidden
|
|
4939
|
+
* @description 更新umdLoader 的配置
|
|
4940
|
+
* @memberof VePlayer
|
|
4941
|
+
*/
|
|
4942
|
+
private updateUmdLoader;
|
|
4500
4943
|
/**
|
|
4501
4944
|
* @hidden
|
|
4502
4945
|
* @private
|
|
@@ -4843,7 +5286,7 @@ declare class VePlayer {
|
|
|
4843
5286
|
getSoftDecodingOption(isOpenSoftDecoding: boolean, url: string, type: string): Promise<{
|
|
4844
5287
|
mediaType?: string;
|
|
4845
5288
|
innerDegrade?: number;
|
|
4846
|
-
codecType?:
|
|
5289
|
+
codecType?: ICodecType;
|
|
4847
5290
|
plugins?: any[];
|
|
4848
5291
|
}>;
|
|
4849
5292
|
/** {zh}
|
|
@@ -5511,54 +5954,6 @@ export declare class LiveInfoPanel extends Plugin {
|
|
|
5511
5954
|
close(): void;
|
|
5512
5955
|
render(): string;
|
|
5513
5956
|
}
|
|
5514
|
-
export declare class SdkPlugin {
|
|
5515
|
-
pluginName: string;
|
|
5516
|
-
__args: any;
|
|
5517
|
-
sdk: VePlayer;
|
|
5518
|
-
playerData: PlayerData;
|
|
5519
|
-
player: Player;
|
|
5520
|
-
_emitter: EventEmitter;
|
|
5521
|
-
static defineGetterOrSetter(Obj: any, map: any): void;
|
|
5522
|
-
/**
|
|
5523
|
-
* @type { string }
|
|
5524
|
-
*/
|
|
5525
|
-
static get pluginName(): string;
|
|
5526
|
-
/**
|
|
5527
|
-
* @constructor
|
|
5528
|
-
* @param { { sdk: object, pluginName: string, [propName: string]: any;} } args
|
|
5529
|
-
*/
|
|
5530
|
-
constructor(args: any);
|
|
5531
|
-
/**
|
|
5532
|
-
* @description sdk实例创建,挂载插件实例时首先执行
|
|
5533
|
-
*/
|
|
5534
|
-
beforeCreate(): void;
|
|
5535
|
-
/**
|
|
5536
|
-
* @description sdk实例创建,挂载插件实例完后执行
|
|
5537
|
-
*/
|
|
5538
|
-
afterCreate(): void;
|
|
5539
|
-
/**
|
|
5540
|
-
* @description sdk创建播放器前执行,只有这里能保证异步操作在creatPlayer之前同步完成
|
|
5541
|
-
*/
|
|
5542
|
-
beforePlayerCreate(): void;
|
|
5543
|
-
/**
|
|
5544
|
-
* @description sdk创建播放器完执行
|
|
5545
|
-
*/
|
|
5546
|
-
afterPlayerCreate(): void;
|
|
5547
|
-
/**
|
|
5548
|
-
* @description sdk销毁时执行
|
|
5549
|
-
*/
|
|
5550
|
-
destroy(): void;
|
|
5551
|
-
/**
|
|
5552
|
-
* @private
|
|
5553
|
-
* @param { any } args
|
|
5554
|
-
*/
|
|
5555
|
-
__init(args: any): void;
|
|
5556
|
-
/**
|
|
5557
|
-
* @description 插件销毁
|
|
5558
|
-
* @private
|
|
5559
|
-
*/
|
|
5560
|
-
__destroy(): void;
|
|
5561
|
-
}
|
|
5562
5957
|
export declare const Events: {
|
|
5563
5958
|
/** {zh}
|
|
5564
5959
|
* @brief 弹幕配置发生变化。
|