@volcengine/veplayer 2.5.0-rc.1 → 2.6.0-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/esm/index.d.ts +79 -83
- package/esm/veplayer.biz.live.development.js +65 -18
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +1360 -316
- package/esm/veplayer.development.js +162 -74
- package/esm/veplayer.live.d.ts +1360 -316
- package/esm/veplayer.live.development.js +162 -74
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +79 -83
- package/esm/veplayer.vod.development.js +96 -55
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +79 -83
- package/umd/veplayer.biz.live.development.js +65 -18
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +1360 -316
- package/umd/veplayer.development.js +162 -74
- package/umd/veplayer.live.d.ts +1360 -316
- package/umd/veplayer.live.development.js +162 -74
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +79 -83
- package/umd/veplayer.vod.development.js +96 -55
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +1360 -316
- package/veplayer.live.d.ts +1360 -316
- package/veplayer.vod.d.ts +79 -83
package/esm/veplayer.d.ts
CHANGED
|
@@ -359,7 +359,7 @@ import MobilePanel = MobilePlayerPanelWrapper.MobilePlayerPanel;
|
|
|
359
359
|
*/
|
|
360
360
|
declare enum ListType {
|
|
361
361
|
/** {zh}
|
|
362
|
-
* @brief
|
|
362
|
+
* @brief 全屏布局。
|
|
363
363
|
* @hidden
|
|
364
364
|
*/
|
|
365
365
|
/** {en}
|
|
@@ -368,21 +368,21 @@ declare enum ListType {
|
|
|
368
368
|
*/
|
|
369
369
|
Middle = "middle",
|
|
370
370
|
/** {zh}
|
|
371
|
-
* @brief
|
|
371
|
+
* @brief 底部抽屉。
|
|
372
372
|
*/
|
|
373
373
|
/** {en}
|
|
374
374
|
* @brief Bottom navigation drawer.
|
|
375
375
|
*/
|
|
376
376
|
Bottom = "bottom",
|
|
377
377
|
/** {zh}
|
|
378
|
-
* @brief
|
|
378
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
379
379
|
*/
|
|
380
380
|
/** {en}
|
|
381
381
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
382
382
|
*/
|
|
383
383
|
Fullscreen = "fullscreen",
|
|
384
384
|
/** {zh}
|
|
385
|
-
* @brief
|
|
385
|
+
* @brief 窗口蒙层展示。
|
|
386
386
|
*/
|
|
387
387
|
/** {en}
|
|
388
388
|
* @brief Overlay.
|
|
@@ -470,14 +470,15 @@ declare class OptionsIcon extends Plugin {
|
|
|
470
470
|
}
|
|
471
471
|
/** {zh}
|
|
472
472
|
* @detail error
|
|
473
|
+
* @brief 错误等级。
|
|
473
474
|
*/
|
|
474
475
|
/** {en}
|
|
475
476
|
* @detail error
|
|
477
|
+
* @brief Error level.
|
|
476
478
|
*/
|
|
477
479
|
declare enum Level {
|
|
478
480
|
/** {zh}
|
|
479
|
-
* @brief
|
|
480
|
-
*
|
|
481
|
+
* @brief 严重。
|
|
481
482
|
*/
|
|
482
483
|
/** {en}
|
|
483
484
|
* @brief Fatal.
|
|
@@ -485,7 +486,7 @@ declare enum Level {
|
|
|
485
486
|
*/
|
|
486
487
|
Fatal = "Fatal",
|
|
487
488
|
/** {zh}
|
|
488
|
-
* @brief
|
|
489
|
+
* @brief 报错。
|
|
489
490
|
*/
|
|
490
491
|
/** {en}
|
|
491
492
|
* @brief Error.
|
|
@@ -851,7 +852,7 @@ interface ErrorInfo<T = TextKey> {
|
|
|
851
852
|
/** {zh}
|
|
852
853
|
* @list error
|
|
853
854
|
* @detail error
|
|
854
|
-
* @brief
|
|
855
|
+
* @brief 错误对象。
|
|
855
856
|
* @name VeError
|
|
856
857
|
* @id VeError
|
|
857
858
|
*/
|
|
@@ -863,11 +864,11 @@ interface ErrorInfo<T = TextKey> {
|
|
|
863
864
|
* @id VeError
|
|
864
865
|
*/
|
|
865
866
|
declare class VeError<T extends string = TextKey> extends Error {
|
|
866
|
-
/**
|
|
867
|
+
/** {zh}
|
|
867
868
|
* @brief 错误码。
|
|
868
869
|
*/
|
|
869
870
|
/** {en}
|
|
870
|
-
* @brief
|
|
871
|
+
* @brief Error code.
|
|
871
872
|
*/
|
|
872
873
|
readonly errorCode: ErrorCode;
|
|
873
874
|
/** {zh}
|
|
@@ -1230,11 +1231,9 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1230
1231
|
poster?: string;
|
|
1231
1232
|
/** {zh}
|
|
1232
1233
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
1233
|
-
* @default -
|
|
1234
1234
|
*/
|
|
1235
1235
|
/** {en}
|
|
1236
1236
|
* @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
|
|
1237
|
-
* @default -
|
|
1238
1237
|
*/
|
|
1239
1238
|
lang?: Lang;
|
|
1240
1239
|
/** {zh}
|
|
@@ -1293,25 +1292,20 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1293
1292
|
* @brief Whether to display the full-screen button.
|
|
1294
1293
|
* - `true`: Display;
|
|
1295
1294
|
* - `false`: Do not display.
|
|
1296
|
-
* @default -
|
|
1297
1295
|
*/
|
|
1298
1296
|
fullscreen?: boolean | Fullscreen;
|
|
1299
1297
|
/** {zh}
|
|
1300
1298
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
1301
|
-
* @default -
|
|
1302
1299
|
*/
|
|
1303
1300
|
/** {en}
|
|
1304
1301
|
* @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
|
|
1305
|
-
* @default -
|
|
1306
1302
|
*/
|
|
1307
1303
|
error?: ErrorConfig;
|
|
1308
1304
|
/** {zh}
|
|
1309
1305
|
* @brief 为播放器设置清晰度的相关配置。
|
|
1310
|
-
* @default -
|
|
1311
1306
|
*/
|
|
1312
1307
|
/** {en}
|
|
1313
1308
|
* @brief Resolution-related configurations.
|
|
1314
|
-
* @default -
|
|
1315
1309
|
*/
|
|
1316
1310
|
definition?: DefinitionConfig;
|
|
1317
1311
|
/** {zh}
|
|
@@ -1572,8 +1566,7 @@ interface Fullscreen {
|
|
|
1572
1566
|
* `true`: Display;
|
|
1573
1567
|
* `false`: Do not display.
|
|
1574
1568
|
* @default false
|
|
1575
|
-
* @brief
|
|
1576
|
-
* Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
1569
|
+
* @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
1577
1570
|
* - `true`: Display;
|
|
1578
1571
|
* - `false`: Do not display.
|
|
1579
1572
|
*/
|
|
@@ -1591,7 +1584,7 @@ interface Fullscreen {
|
|
|
1591
1584
|
*/
|
|
1592
1585
|
interface CommonStyle {
|
|
1593
1586
|
/** {zh}
|
|
1594
|
-
* @brief
|
|
1587
|
+
* @brief 进度条底色。
|
|
1595
1588
|
* @default 无
|
|
1596
1589
|
*/
|
|
1597
1590
|
/** {en}
|
|
@@ -1599,7 +1592,7 @@ interface CommonStyle {
|
|
|
1599
1592
|
*/
|
|
1600
1593
|
progressColor?: string;
|
|
1601
1594
|
/** {zh}
|
|
1602
|
-
* @brief
|
|
1595
|
+
* @brief 播放完成部分进度条底色。
|
|
1603
1596
|
* @default 无
|
|
1604
1597
|
*/
|
|
1605
1598
|
/** {en}
|
|
@@ -1607,7 +1600,7 @@ interface CommonStyle {
|
|
|
1607
1600
|
*/
|
|
1608
1601
|
playedColor?: string;
|
|
1609
1602
|
/** {zh}
|
|
1610
|
-
* @brief
|
|
1603
|
+
* @brief 缓存部分进度条底色。
|
|
1611
1604
|
* @default 无
|
|
1612
1605
|
*/
|
|
1613
1606
|
/** {en}
|
|
@@ -1616,7 +1609,7 @@ interface CommonStyle {
|
|
|
1616
1609
|
*/
|
|
1617
1610
|
cachedColor?: string;
|
|
1618
1611
|
/** {zh}
|
|
1619
|
-
* @brief
|
|
1612
|
+
* @brief 进度条滑块样式。
|
|
1620
1613
|
* @default 无
|
|
1621
1614
|
*/
|
|
1622
1615
|
/** {en}
|
|
@@ -1627,7 +1620,7 @@ interface CommonStyle {
|
|
|
1627
1620
|
[propName: string]: any;
|
|
1628
1621
|
};
|
|
1629
1622
|
/** {zh}
|
|
1630
|
-
* @brief
|
|
1623
|
+
* @brief 音量颜色。
|
|
1631
1624
|
* @default 无
|
|
1632
1625
|
*/
|
|
1633
1626
|
/** {en}
|
|
@@ -1651,14 +1644,14 @@ type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
|
|
|
1651
1644
|
*/
|
|
1652
1645
|
declare enum Codec {
|
|
1653
1646
|
/** {zh}
|
|
1654
|
-
* @brief H.265
|
|
1647
|
+
* @brief H.265 编码格式。
|
|
1655
1648
|
*/
|
|
1656
1649
|
/** {en}
|
|
1657
1650
|
* @brief H.265.
|
|
1658
1651
|
*/
|
|
1659
1652
|
H265 = "h265",
|
|
1660
1653
|
/** {zh}
|
|
1661
|
-
* @brief H.264
|
|
1654
|
+
* @brief H.264 编码格式。
|
|
1662
1655
|
*/
|
|
1663
1656
|
/** {en}
|
|
1664
1657
|
* @brief H.264.
|
|
@@ -1675,18 +1668,18 @@ declare enum Codec {
|
|
|
1675
1668
|
*/
|
|
1676
1669
|
declare enum Degradation {
|
|
1677
1670
|
/** {zh}
|
|
1678
|
-
* @brief
|
|
1671
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
1679
1672
|
*/
|
|
1680
1673
|
/** {en}
|
|
1681
|
-
* @brief
|
|
1674
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
1682
1675
|
*/
|
|
1683
1676
|
SoftFirst = "soft-first",
|
|
1684
1677
|
/** {zh}
|
|
1685
|
-
* @brief
|
|
1678
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
1686
1679
|
* @hidden
|
|
1687
1680
|
*/
|
|
1688
1681
|
/** {en}
|
|
1689
|
-
* @brief
|
|
1682
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
1690
1683
|
* @hidden
|
|
1691
1684
|
*/
|
|
1692
1685
|
H264First = "h264-first"
|
|
@@ -1703,14 +1696,14 @@ declare enum Degradation {
|
|
|
1703
1696
|
*/
|
|
1704
1697
|
declare enum DecodeType {
|
|
1705
1698
|
/** {zh}
|
|
1706
|
-
* @brief
|
|
1699
|
+
* @brief 软解。
|
|
1707
1700
|
*/
|
|
1708
1701
|
/** {en}
|
|
1709
1702
|
* @brief Software decoding.
|
|
1710
1703
|
*/
|
|
1711
1704
|
Software = "software",
|
|
1712
1705
|
/** {zh}
|
|
1713
|
-
* @brief
|
|
1706
|
+
* @brief 硬解。
|
|
1714
1707
|
*/
|
|
1715
1708
|
/** {en}
|
|
1716
1709
|
* @brief Hardware decoding.
|
|
@@ -1900,6 +1893,11 @@ declare class VePlayerBase {
|
|
|
1900
1893
|
/** {zh}
|
|
1901
1894
|
* 获取播放器版本号
|
|
1902
1895
|
* @returns
|
|
1896
|
+
* @brief
|
|
1897
|
+
* 获取播放器 SDK 版本号。
|
|
1898
|
+
*/
|
|
1899
|
+
/** {en}
|
|
1900
|
+
* @brief Retrieve the player SDK version number.
|
|
1903
1901
|
*/
|
|
1904
1902
|
get playerVersion(): string;
|
|
1905
1903
|
/** {zh}
|
|
@@ -1987,8 +1985,8 @@ declare class VePlayerBase {
|
|
|
1987
1985
|
static create<T extends VePlayerBase>(options?: VePlayerBaseOptions, Constructor?: Constructor<T>): Promise<T>;
|
|
1988
1986
|
/** {zh}
|
|
1989
1987
|
* @brief 调用此方法切换拉流地址、线路、清晰度。
|
|
1990
|
-
* @param target
|
|
1991
|
-
* @param options
|
|
1988
|
+
* @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
|
|
1989
|
+
* @param options 更多配置信息。
|
|
1992
1990
|
*/
|
|
1993
1991
|
/** {en}
|
|
1994
1992
|
* @brief Switches the pull stream address, playback source, or resolution.
|
|
@@ -2025,11 +2023,12 @@ declare class VePlayerBase {
|
|
|
2025
2023
|
*/
|
|
2026
2024
|
fallbackToFirstDefinition?: boolean;
|
|
2027
2025
|
/** {zh}
|
|
2028
|
-
* @brief
|
|
2029
|
-
* - true: 无缝切换
|
|
2030
|
-
* - false: 非无缝切换
|
|
2026
|
+
* @brief 是否无缝切换,true 为无缝切换,false 为非无缝切换。
|
|
2031
2027
|
* @default false
|
|
2032
2028
|
*/
|
|
2029
|
+
/** {en}
|
|
2030
|
+
* @brief Whether seamless switching or not. True means seamless switching and false means non-seamless switching.
|
|
2031
|
+
*/
|
|
2033
2032
|
seamless?: boolean;
|
|
2034
2033
|
}): Promise<ExposedDefinition>;
|
|
2035
2034
|
/** {zh}
|
|
@@ -2065,16 +2064,15 @@ declare class VePlayerBase {
|
|
|
2065
2064
|
source?: string;
|
|
2066
2065
|
}): Promise<void>;
|
|
2067
2066
|
// TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
|
|
2068
|
-
/**
|
|
2069
2067
|
/** {zh}
|
|
2070
2068
|
* @brief 调用此方法监听指定事件,事件处理函数只执行一次。
|
|
2071
2069
|
* @param event 表示事件的名称。
|
|
2072
2070
|
* @param callback 表示事件的回调函数。
|
|
2073
2071
|
*/
|
|
2074
2072
|
/** {en}
|
|
2075
|
-
* @brief
|
|
2076
|
-
* @param event The event
|
|
2077
|
-
* @param callback
|
|
2073
|
+
* @brief Call this method to listen for the specified event. The event handler is executed only once.
|
|
2074
|
+
* @param event The name representing the event.
|
|
2075
|
+
* @param callback Callback functions representing events.
|
|
2078
2076
|
*/
|
|
2079
2077
|
once(event: string, callback: (data?: any) => any): void;
|
|
2080
2078
|
/** {zh}
|
|
@@ -2200,10 +2198,14 @@ declare class VePlayerBase {
|
|
|
2200
2198
|
ignorePaused?: boolean;
|
|
2201
2199
|
}): void;
|
|
2202
2200
|
/** {zh}
|
|
2203
|
-
* @brief
|
|
2204
|
-
* @param type
|
|
2201
|
+
* @brief 判断浏览器是否支持播放格式。
|
|
2202
|
+
* @param type 播放格式。
|
|
2205
2203
|
* @returns
|
|
2206
2204
|
*/
|
|
2205
|
+
/** {en}
|
|
2206
|
+
* @brief Determine whether the browser supports the playback format.
|
|
2207
|
+
* @param type The playback format.
|
|
2208
|
+
*/
|
|
2207
2209
|
canPlayType(type: string): boolean;
|
|
2208
2210
|
/** {zh}
|
|
2209
2211
|
* @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
|
|
@@ -2283,7 +2285,7 @@ declare class VePlayerBase {
|
|
|
2283
2285
|
unRegisterPlugin(plugin: any): void;
|
|
2284
2286
|
/** {zh}
|
|
2285
2287
|
* @brief 调用此接口显示指定插件图标。
|
|
2286
|
-
* @param pluginNames
|
|
2288
|
+
* @param pluginNames 插件名称。
|
|
2287
2289
|
*/
|
|
2288
2290
|
/** {en}
|
|
2289
2291
|
* @brief Displays the icon of a specified plugin.
|
|
@@ -2292,7 +2294,7 @@ declare class VePlayerBase {
|
|
|
2292
2294
|
showIcon(pluginNames: string[]): void;
|
|
2293
2295
|
/** {zh}
|
|
2294
2296
|
* @brief 调用此接口隐藏指定插件图标。
|
|
2295
|
-
* @param pluginNames
|
|
2297
|
+
* @param pluginNames 插件名称。
|
|
2296
2298
|
*/
|
|
2297
2299
|
/** {en}
|
|
2298
2300
|
* @brief Hides the icon of a specified plugin.
|
|
@@ -2718,7 +2720,7 @@ declare namespace strategy {
|
|
|
2718
2720
|
*/
|
|
2719
2721
|
enum ListType {
|
|
2720
2722
|
/** {zh}
|
|
2721
|
-
* @brief
|
|
2723
|
+
* @brief 全屏布局。
|
|
2722
2724
|
* @hidden
|
|
2723
2725
|
*/
|
|
2724
2726
|
/** {en}
|
|
@@ -2727,21 +2729,21 @@ declare namespace strategy {
|
|
|
2727
2729
|
*/
|
|
2728
2730
|
Middle = "middle",
|
|
2729
2731
|
/** {zh}
|
|
2730
|
-
* @brief
|
|
2732
|
+
* @brief 底部抽屉。
|
|
2731
2733
|
*/
|
|
2732
2734
|
/** {en}
|
|
2733
2735
|
* @brief Bottom navigation drawer.
|
|
2734
2736
|
*/
|
|
2735
2737
|
Bottom = "bottom",
|
|
2736
2738
|
/** {zh}
|
|
2737
|
-
* @brief
|
|
2739
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
2738
2740
|
*/
|
|
2739
2741
|
/** {en}
|
|
2740
2742
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
2741
2743
|
*/
|
|
2742
2744
|
Fullscreen = "fullscreen",
|
|
2743
2745
|
/** {zh}
|
|
2744
|
-
* @brief
|
|
2746
|
+
* @brief 窗口蒙层展示。
|
|
2745
2747
|
*/
|
|
2746
2748
|
/** {en}
|
|
2747
2749
|
* @brief Overlay.
|
|
@@ -2829,14 +2831,15 @@ declare namespace strategy {
|
|
|
2829
2831
|
}
|
|
2830
2832
|
/** {zh}
|
|
2831
2833
|
* @detail error
|
|
2834
|
+
* @brief 错误等级。
|
|
2832
2835
|
*/
|
|
2833
2836
|
/** {en}
|
|
2834
2837
|
* @detail error
|
|
2838
|
+
* @brief Error level.
|
|
2835
2839
|
*/
|
|
2836
2840
|
enum Level {
|
|
2837
2841
|
/** {zh}
|
|
2838
|
-
* @brief
|
|
2839
|
-
*
|
|
2842
|
+
* @brief 严重。
|
|
2840
2843
|
*/
|
|
2841
2844
|
/** {en}
|
|
2842
2845
|
* @brief Fatal.
|
|
@@ -2844,7 +2847,7 @@ declare namespace strategy {
|
|
|
2844
2847
|
*/
|
|
2845
2848
|
Fatal = "Fatal",
|
|
2846
2849
|
/** {zh}
|
|
2847
|
-
* @brief
|
|
2850
|
+
* @brief 报错。
|
|
2848
2851
|
*/
|
|
2849
2852
|
/** {en}
|
|
2850
2853
|
* @brief Error.
|
|
@@ -3212,7 +3215,7 @@ declare namespace strategy {
|
|
|
3212
3215
|
/** {zh}
|
|
3213
3216
|
* @list error
|
|
3214
3217
|
* @detail error
|
|
3215
|
-
* @brief
|
|
3218
|
+
* @brief 错误对象。
|
|
3216
3219
|
* @name VeError
|
|
3217
3220
|
* @id VeError
|
|
3218
3221
|
*/
|
|
@@ -3224,11 +3227,11 @@ declare namespace strategy {
|
|
|
3224
3227
|
* @id VeError
|
|
3225
3228
|
*/
|
|
3226
3229
|
class VeError<T extends string = TextKey> extends Error {
|
|
3227
|
-
/**
|
|
3230
|
+
/** {zh}
|
|
3228
3231
|
* @brief 错误码。
|
|
3229
3232
|
*/
|
|
3230
3233
|
/** {en}
|
|
3231
|
-
* @brief
|
|
3234
|
+
* @brief Error code.
|
|
3232
3235
|
*/
|
|
3233
3236
|
readonly errorCode: ErrorCode;
|
|
3234
3237
|
/** {zh}
|
|
@@ -3593,11 +3596,9 @@ declare namespace strategy {
|
|
|
3593
3596
|
poster?: string;
|
|
3594
3597
|
/** {zh}
|
|
3595
3598
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
3596
|
-
* @default -
|
|
3597
3599
|
*/
|
|
3598
3600
|
/** {en}
|
|
3599
3601
|
* @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
|
|
3600
|
-
* @default -
|
|
3601
3602
|
*/
|
|
3602
3603
|
lang?: Lang;
|
|
3603
3604
|
/** {zh}
|
|
@@ -3656,25 +3657,20 @@ declare namespace strategy {
|
|
|
3656
3657
|
* @brief Whether to display the full-screen button.
|
|
3657
3658
|
* - `true`: Display;
|
|
3658
3659
|
* - `false`: Do not display.
|
|
3659
|
-
* @default -
|
|
3660
3660
|
*/
|
|
3661
3661
|
fullscreen?: boolean | Fullscreen;
|
|
3662
3662
|
/** {zh}
|
|
3663
3663
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
3664
|
-
* @default -
|
|
3665
3664
|
*/
|
|
3666
3665
|
/** {en}
|
|
3667
3666
|
* @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
|
|
3668
|
-
* @default -
|
|
3669
3667
|
*/
|
|
3670
3668
|
error?: ErrorConfig;
|
|
3671
3669
|
/** {zh}
|
|
3672
3670
|
* @brief 为播放器设置清晰度的相关配置。
|
|
3673
|
-
* @default -
|
|
3674
3671
|
*/
|
|
3675
3672
|
/** {en}
|
|
3676
3673
|
* @brief Resolution-related configurations.
|
|
3677
|
-
* @default -
|
|
3678
3674
|
*/
|
|
3679
3675
|
definition?: DefinitionConfig;
|
|
3680
3676
|
/** {zh}
|
|
@@ -3935,8 +3931,7 @@ declare namespace strategy {
|
|
|
3935
3931
|
* `true`: Display;
|
|
3936
3932
|
* `false`: Do not display.
|
|
3937
3933
|
* @default false
|
|
3938
|
-
* @brief
|
|
3939
|
-
* Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
3934
|
+
* @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
3940
3935
|
* - `true`: Display;
|
|
3941
3936
|
* - `false`: Do not display.
|
|
3942
3937
|
*/
|
|
@@ -3954,7 +3949,7 @@ declare namespace strategy {
|
|
|
3954
3949
|
*/
|
|
3955
3950
|
interface CommonStyle {
|
|
3956
3951
|
/** {zh}
|
|
3957
|
-
* @brief
|
|
3952
|
+
* @brief 进度条底色。
|
|
3958
3953
|
* @default 无
|
|
3959
3954
|
*/
|
|
3960
3955
|
/** {en}
|
|
@@ -3962,7 +3957,7 @@ declare namespace strategy {
|
|
|
3962
3957
|
*/
|
|
3963
3958
|
progressColor?: string;
|
|
3964
3959
|
/** {zh}
|
|
3965
|
-
* @brief
|
|
3960
|
+
* @brief 播放完成部分进度条底色。
|
|
3966
3961
|
* @default 无
|
|
3967
3962
|
*/
|
|
3968
3963
|
/** {en}
|
|
@@ -3970,7 +3965,7 @@ declare namespace strategy {
|
|
|
3970
3965
|
*/
|
|
3971
3966
|
playedColor?: string;
|
|
3972
3967
|
/** {zh}
|
|
3973
|
-
* @brief
|
|
3968
|
+
* @brief 缓存部分进度条底色。
|
|
3974
3969
|
* @default 无
|
|
3975
3970
|
*/
|
|
3976
3971
|
/** {en}
|
|
@@ -3979,7 +3974,7 @@ declare namespace strategy {
|
|
|
3979
3974
|
*/
|
|
3980
3975
|
cachedColor?: string;
|
|
3981
3976
|
/** {zh}
|
|
3982
|
-
* @brief
|
|
3977
|
+
* @brief 进度条滑块样式。
|
|
3983
3978
|
* @default 无
|
|
3984
3979
|
*/
|
|
3985
3980
|
/** {en}
|
|
@@ -3990,7 +3985,7 @@ declare namespace strategy {
|
|
|
3990
3985
|
[propName: string]: any;
|
|
3991
3986
|
};
|
|
3992
3987
|
/** {zh}
|
|
3993
|
-
* @brief
|
|
3988
|
+
* @brief 音量颜色。
|
|
3994
3989
|
* @default 无
|
|
3995
3990
|
*/
|
|
3996
3991
|
/** {en}
|
|
@@ -4014,14 +4009,14 @@ declare namespace strategy {
|
|
|
4014
4009
|
*/
|
|
4015
4010
|
enum Codec {
|
|
4016
4011
|
/** {zh}
|
|
4017
|
-
* @brief H.265
|
|
4012
|
+
* @brief H.265 编码格式。
|
|
4018
4013
|
*/
|
|
4019
4014
|
/** {en}
|
|
4020
4015
|
* @brief H.265.
|
|
4021
4016
|
*/
|
|
4022
4017
|
H265 = "h265",
|
|
4023
4018
|
/** {zh}
|
|
4024
|
-
* @brief H.264
|
|
4019
|
+
* @brief H.264 编码格式。
|
|
4025
4020
|
*/
|
|
4026
4021
|
/** {en}
|
|
4027
4022
|
* @brief H.264.
|
|
@@ -4038,18 +4033,18 @@ declare namespace strategy {
|
|
|
4038
4033
|
*/
|
|
4039
4034
|
enum Degradation {
|
|
4040
4035
|
/** {zh}
|
|
4041
|
-
* @brief
|
|
4036
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
4042
4037
|
*/
|
|
4043
4038
|
/** {en}
|
|
4044
|
-
* @brief
|
|
4039
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
4045
4040
|
*/
|
|
4046
4041
|
SoftFirst = "soft-first",
|
|
4047
4042
|
/** {zh}
|
|
4048
|
-
* @brief
|
|
4043
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
4049
4044
|
* @hidden
|
|
4050
4045
|
*/
|
|
4051
4046
|
/** {en}
|
|
4052
|
-
* @brief
|
|
4047
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
4053
4048
|
* @hidden
|
|
4054
4049
|
*/
|
|
4055
4050
|
H264First = "h264-first"
|
|
@@ -4066,14 +4061,14 @@ declare namespace strategy {
|
|
|
4066
4061
|
*/
|
|
4067
4062
|
enum DecodeType {
|
|
4068
4063
|
/** {zh}
|
|
4069
|
-
* @brief
|
|
4064
|
+
* @brief 软解。
|
|
4070
4065
|
*/
|
|
4071
4066
|
/** {en}
|
|
4072
4067
|
* @brief Software decoding.
|
|
4073
4068
|
*/
|
|
4074
4069
|
Software = "software",
|
|
4075
4070
|
/** {zh}
|
|
4076
|
-
* @brief
|
|
4071
|
+
* @brief 硬解。
|
|
4077
4072
|
*/
|
|
4078
4073
|
/** {en}
|
|
4079
4074
|
* @brief Hardware decoding.
|
|
@@ -4199,22 +4194,22 @@ declare function getStreamType(url: string): "unknown" | "hls" | "flv" | "rtm" |
|
|
|
4199
4194
|
* @detail api
|
|
4200
4195
|
* @brief 当前浏览器是否支持播放编码格式。
|
|
4201
4196
|
* @param codec 编码格式。
|
|
4202
|
-
* `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
|
|
4203
|
-
* `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
4197
|
+
* - `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends。
|
|
4198
|
+
* - `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
4204
4199
|
* @returns
|
|
4205
4200
|
*/
|
|
4206
4201
|
/** {en}
|
|
4207
4202
|
* @detail api
|
|
4208
4203
|
* @brief Checkes whether the current browser supports the specified encoding format.
|
|
4209
4204
|
* @param codec The encoding format.
|
|
4210
|
-
* `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
|
|
4211
|
-
* `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
|
|
4205
|
+
* - `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
|
|
4206
|
+
* - `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
|
|
4212
4207
|
* @returns
|
|
4213
4208
|
*/
|
|
4214
4209
|
declare function isMseSupported(codec?: string): boolean;
|
|
4215
4210
|
/** {zh}
|
|
4216
4211
|
* @detail api
|
|
4217
|
-
* @brief
|
|
4212
|
+
* @brief 当前浏览器是否支持软解。
|
|
4218
4213
|
* @returns
|
|
4219
4214
|
*/
|
|
4220
4215
|
/** {en}
|
|
@@ -4448,14 +4443,15 @@ declare namespace error {
|
|
|
4448
4443
|
}
|
|
4449
4444
|
/** {zh}
|
|
4450
4445
|
* @detail error
|
|
4446
|
+
* @brief 错误等级。
|
|
4451
4447
|
*/
|
|
4452
4448
|
/** {en}
|
|
4453
4449
|
* @detail error
|
|
4450
|
+
* @brief Error level.
|
|
4454
4451
|
*/
|
|
4455
4452
|
enum Level {
|
|
4456
4453
|
/** {zh}
|
|
4457
|
-
* @brief
|
|
4458
|
-
*
|
|
4454
|
+
* @brief 严重。
|
|
4459
4455
|
*/
|
|
4460
4456
|
/** {en}
|
|
4461
4457
|
* @brief Fatal.
|
|
@@ -4463,7 +4459,7 @@ declare namespace error {
|
|
|
4463
4459
|
*/
|
|
4464
4460
|
Fatal = "Fatal",
|
|
4465
4461
|
/** {zh}
|
|
4466
|
-
* @brief
|
|
4462
|
+
* @brief 报错。
|
|
4467
4463
|
*/
|
|
4468
4464
|
/** {en}
|
|
4469
4465
|
* @brief Error.
|
|
@@ -4831,7 +4827,7 @@ declare namespace error {
|
|
|
4831
4827
|
/** {zh}
|
|
4832
4828
|
* @list error
|
|
4833
4829
|
* @detail error
|
|
4834
|
-
* @brief
|
|
4830
|
+
* @brief 错误对象。
|
|
4835
4831
|
* @name VeError
|
|
4836
4832
|
* @id VeError
|
|
4837
4833
|
*/
|
|
@@ -4843,11 +4839,11 @@ declare namespace error {
|
|
|
4843
4839
|
* @id VeError
|
|
4844
4840
|
*/
|
|
4845
4841
|
class VeError<T extends string = TextKey> extends Error {
|
|
4846
|
-
/**
|
|
4842
|
+
/** {zh}
|
|
4847
4843
|
* @brief 错误码。
|
|
4848
4844
|
*/
|
|
4849
4845
|
/** {en}
|
|
4850
|
-
* @brief
|
|
4846
|
+
* @brief Error code.
|
|
4851
4847
|
*/
|
|
4852
4848
|
readonly errorCode: ErrorCode;
|
|
4853
4849
|
/** {zh}
|
|
@@ -5234,20 +5230,16 @@ interface LoggerConfig {
|
|
|
5234
5230
|
interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
5235
5231
|
/** {zh}
|
|
5236
5232
|
* @brief 为播放器设置 RTM 拉流配置。
|
|
5237
|
-
* @default -
|
|
5238
5233
|
*/
|
|
5239
5234
|
/** {en}
|
|
5240
5235
|
* @brief Configurations for playing an RTM stream.
|
|
5241
|
-
* @default -
|
|
5242
5236
|
*/
|
|
5243
5237
|
rtm?: Rtm;
|
|
5244
5238
|
/** {zh}
|
|
5245
5239
|
* @brief 为播放器设置 FLV 拉流配置。FLV 格式流相关配置仅适用于支持 MSE 播放的 PC 端浏览器和安卓端浏览器。
|
|
5246
|
-
* @default -
|
|
5247
5240
|
*/
|
|
5248
5241
|
/** {en}
|
|
5249
5242
|
* @brief Configurations for playing an FLV stream. You can only play FLV streams with web browsers on PC and Android devices, and the browsers need to support Media Source Extensions (MSE) playback.
|
|
5250
|
-
* @default -
|
|
5251
5243
|
*/
|
|
5252
5244
|
flv?: Flv;
|
|
5253
5245
|
/** {zh}
|
|
@@ -5265,29 +5257,30 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5265
5257
|
hls?: Hls;
|
|
5266
5258
|
/** {zh}
|
|
5267
5259
|
* @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
|
|
5268
|
-
* @default -
|
|
5269
5260
|
*/
|
|
5270
5261
|
/** {en}
|
|
5271
5262
|
* @brief Configures the information panel for the player, including options to show/hide the panel and the time interval between each information update. The panel supports displaying information for HLS and FLV addresses. If you opt for software decoding, additional information related to software decoding will be displayed.
|
|
5272
|
-
* @default -
|
|
5273
5263
|
*/
|
|
5274
5264
|
infoPanel?: InfoPanelConfig;
|
|
5265
|
+
/** {zh}
|
|
5266
|
+
* @hidden
|
|
5267
|
+
*/
|
|
5268
|
+
/** {en}
|
|
5269
|
+
* @brief Configurations for advertising
|
|
5270
|
+
*/
|
|
5271
|
+
ad?: AdConfig;
|
|
5275
5272
|
/** {zh}
|
|
5276
5273
|
* @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
|
|
5277
|
-
* @default -
|
|
5278
5274
|
*/
|
|
5279
5275
|
/** {en}
|
|
5280
5276
|
* @brief Configurations for time shifting.
|
|
5281
|
-
* @default -
|
|
5282
5277
|
*/
|
|
5283
5278
|
timeShift?: TimeShiftConfig;
|
|
5284
5279
|
/** {zh}
|
|
5285
5280
|
* @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
|
|
5286
|
-
* @default -
|
|
5287
5281
|
*/
|
|
5288
5282
|
/** {en}
|
|
5289
5283
|
* @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
|
|
5290
|
-
* @default -
|
|
5291
5284
|
*/
|
|
5292
5285
|
logger?: LoggerConfig;
|
|
5293
5286
|
/** {zh}
|
|
@@ -5307,13 +5300,10 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5307
5300
|
*/
|
|
5308
5301
|
icons?: any;
|
|
5309
5302
|
/** {zh}
|
|
5310
|
-
* @hidden
|
|
5311
5303
|
* @brief 商业 DRM 播放配置。
|
|
5312
|
-
* @default -
|
|
5313
5304
|
*/
|
|
5314
5305
|
/** {en}
|
|
5315
5306
|
* @brief Digital Rights Management (DRM) configurations.
|
|
5316
|
-
* @default -
|
|
5317
5307
|
*/
|
|
5318
5308
|
drm?: Drm;
|
|
5319
5309
|
}
|
|
@@ -5327,31 +5317,56 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5327
5317
|
*/
|
|
5328
5318
|
interface Abr {
|
|
5329
5319
|
/** {zh}
|
|
5330
|
-
* @brief 是否开启
|
|
5331
|
-
*
|
|
5332
|
-
*
|
|
5320
|
+
* @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
|
|
5321
|
+
* - true: 开启
|
|
5322
|
+
* - false: 关闭
|
|
5333
5323
|
* @default true
|
|
5334
5324
|
*/
|
|
5325
|
+
/** {en}
|
|
5326
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
5327
|
+
* - true: Enable;
|
|
5328
|
+
* - false: Disable.
|
|
5329
|
+
*/
|
|
5335
5330
|
enable?: boolean;
|
|
5336
5331
|
/** {zh}
|
|
5337
|
-
* @brief 未开启
|
|
5338
|
-
*
|
|
5339
|
-
*
|
|
5332
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
5333
|
+
* - true: 开启;
|
|
5334
|
+
* - false: 关闭。
|
|
5340
5335
|
* @default false
|
|
5336
|
+
* @hidden
|
|
5337
|
+
*/
|
|
5338
|
+
/** {en}
|
|
5339
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
5340
|
+
* - true: Enable;
|
|
5341
|
+
* - false: Disable.
|
|
5342
|
+
* @hidden
|
|
5341
5343
|
*/
|
|
5342
5344
|
downTip?: boolean;
|
|
5343
5345
|
/** {zh}
|
|
5344
|
-
* @brief
|
|
5345
|
-
*
|
|
5346
|
-
*
|
|
5346
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
5347
|
+
* - true: 开启;
|
|
5348
|
+
* - false: 关闭。
|
|
5349
|
+
* @default false
|
|
5350
|
+
*/
|
|
5351
|
+
/** {en}
|
|
5352
|
+
* @brief Whether to start debug mode, default is false.
|
|
5353
|
+
* - true: Enable,
|
|
5354
|
+
* - false: Disable.
|
|
5355
|
+
* @default false
|
|
5347
5356
|
*/
|
|
5348
5357
|
debug?: boolean;
|
|
5349
5358
|
/** {zh}
|
|
5350
|
-
* @brief
|
|
5359
|
+
* @brief 当前拉流地址 URL 对应的码率。
|
|
5360
|
+
*/
|
|
5361
|
+
/** {en}
|
|
5362
|
+
* @brief The bitrate corresponding to the current pull-stream address URL.
|
|
5351
5363
|
*/
|
|
5352
5364
|
bitrate?: number;
|
|
5353
5365
|
/** {zh}
|
|
5354
|
-
* @brief
|
|
5366
|
+
* @brief 自适应码率流信息。
|
|
5367
|
+
*/
|
|
5368
|
+
/** {en}
|
|
5369
|
+
* @brief Adaptive bitrate (ABR) stream information.
|
|
5355
5370
|
*/
|
|
5356
5371
|
urls?: {
|
|
5357
5372
|
[bitrate: number]: string;
|
|
@@ -5360,35 +5375,53 @@ interface Abr {
|
|
|
5360
5375
|
/** {zh}
|
|
5361
5376
|
* @list option
|
|
5362
5377
|
* @kind property
|
|
5378
|
+
* @hidden
|
|
5363
5379
|
*/
|
|
5364
5380
|
/** {en}
|
|
5365
5381
|
* @list option
|
|
5366
5382
|
* @kind property
|
|
5383
|
+
* @hidden
|
|
5367
5384
|
*/
|
|
5368
5385
|
interface HlsAbr {
|
|
5369
5386
|
/** {zh}
|
|
5370
|
-
* @brief 是否开启
|
|
5371
|
-
*
|
|
5372
|
-
*
|
|
5387
|
+
* @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
|
|
5388
|
+
* - true: 开启;
|
|
5389
|
+
* - false: 关闭。
|
|
5373
5390
|
* @default true
|
|
5374
5391
|
*/
|
|
5392
|
+
/** {en}
|
|
5393
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
5394
|
+
* - true: Enable;
|
|
5395
|
+
* - false: Disable.
|
|
5396
|
+
*/
|
|
5375
5397
|
enable?: boolean;
|
|
5376
5398
|
/** {zh}
|
|
5377
|
-
* @brief 未开启
|
|
5378
|
-
*
|
|
5379
|
-
*
|
|
5399
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
5400
|
+
* - true: 开启;
|
|
5401
|
+
* - false: 关闭。
|
|
5380
5402
|
* @default false
|
|
5381
5403
|
*/
|
|
5404
|
+
/** {en}
|
|
5405
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
5406
|
+
* - true: Enable;
|
|
5407
|
+
* - false: Disable.
|
|
5408
|
+
*/
|
|
5382
5409
|
downTip?: boolean;
|
|
5383
5410
|
/** {zh}
|
|
5384
|
-
* @brief
|
|
5385
|
-
*
|
|
5386
|
-
*
|
|
5411
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
5412
|
+
* - true: 开启;
|
|
5413
|
+
* - false: 关闭。
|
|
5414
|
+
* @default false
|
|
5415
|
+
*/
|
|
5416
|
+
/** {en}
|
|
5417
|
+
* @brief Whether to start debug mode, default is false.
|
|
5418
|
+
* - true: Enable,
|
|
5419
|
+
* - false: Disable.
|
|
5420
|
+
* @default false
|
|
5387
5421
|
*/
|
|
5388
5422
|
debug?: boolean;
|
|
5389
5423
|
}
|
|
5390
5424
|
/** {zh}
|
|
5391
|
-
* @hidden
|
|
5392
5425
|
* @list option
|
|
5393
5426
|
* @kind property
|
|
5394
5427
|
*/
|
|
@@ -5398,15 +5431,14 @@ interface HlsAbr {
|
|
|
5398
5431
|
*/
|
|
5399
5432
|
interface Drm {
|
|
5400
5433
|
/** {zh}
|
|
5401
|
-
* @brief FairPlay DRM
|
|
5434
|
+
* @brief FairPlay DRM 配置。
|
|
5402
5435
|
*/
|
|
5403
5436
|
/** {en}
|
|
5404
|
-
* @brief FairPlay DRM configurations
|
|
5437
|
+
* @brief FairPlay DRM configurations.
|
|
5405
5438
|
*/
|
|
5406
5439
|
fairplay?: FairplayDrm;
|
|
5407
5440
|
}
|
|
5408
5441
|
/** {zh}
|
|
5409
|
-
* @hidden
|
|
5410
5442
|
* @list option
|
|
5411
5443
|
* @kind property
|
|
5412
5444
|
*/
|
|
@@ -5416,7 +5448,6 @@ interface Drm {
|
|
|
5416
5448
|
*/
|
|
5417
5449
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
5418
5450
|
/** {zh}
|
|
5419
|
-
* @hidden
|
|
5420
5451
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
5421
5452
|
* @param config
|
|
5422
5453
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -5431,7 +5462,6 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5431
5462
|
}) => Promise<FairplayDrmConfig>;
|
|
5432
5463
|
}
|
|
5433
5464
|
/** {zh}
|
|
5434
|
-
* @hidden
|
|
5435
5465
|
* @list option
|
|
5436
5466
|
* @kind property
|
|
5437
5467
|
*/
|
|
@@ -5441,17 +5471,17 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5441
5471
|
*/
|
|
5442
5472
|
interface FairplayDrmConfig {
|
|
5443
5473
|
/** {zh}
|
|
5444
|
-
* @brief
|
|
5474
|
+
* @brief 获取证书的请求地址。
|
|
5445
5475
|
*/
|
|
5446
5476
|
/** {en}
|
|
5447
|
-
* @brief URL used to acquire the FairPlay certificate
|
|
5477
|
+
* @brief URL used to acquire the FairPlay certificate.
|
|
5448
5478
|
*/
|
|
5449
5479
|
serverCertificatePath?: string;
|
|
5450
5480
|
/** {zh}
|
|
5451
|
-
* @brief
|
|
5481
|
+
* @brief 获取内容密钥许可证的请求地址。
|
|
5452
5482
|
*/
|
|
5453
5483
|
/** {en}
|
|
5454
|
-
* @brief URL used to acquire the DRM license
|
|
5484
|
+
* @brief URL used to acquire the DRM license.
|
|
5455
5485
|
*/
|
|
5456
5486
|
serverProcessSPCPath?: string;
|
|
5457
5487
|
}
|
|
@@ -5500,6 +5530,76 @@ interface TimeShiftConfig {
|
|
|
5500
5530
|
*/
|
|
5501
5531
|
position?: string;
|
|
5502
5532
|
}
|
|
5533
|
+
/** {zh}
|
|
5534
|
+
* @hidden
|
|
5535
|
+
*/
|
|
5536
|
+
/** {en}
|
|
5537
|
+
* @list option
|
|
5538
|
+
* @kind property
|
|
5539
|
+
* @brief Advertising schedule for a single ad break
|
|
5540
|
+
*/
|
|
5541
|
+
interface AdRule {
|
|
5542
|
+
/** {en}
|
|
5543
|
+
* @brief When to play the configured ad tag
|
|
5544
|
+
* - `pre`: Ad plays as a preroll
|
|
5545
|
+
* - `post`: Ad plays as a postroll
|
|
5546
|
+
* - (timecode): Ad plays at a specific time, in HH:MM:SS or HH:MM:SS.sss format
|
|
5547
|
+
*/
|
|
5548
|
+
offset: string;
|
|
5549
|
+
/** {en}
|
|
5550
|
+
* @brief URL of the ad tag for IMA plugins, must be a VAST xml
|
|
5551
|
+
*/
|
|
5552
|
+
tag: string;
|
|
5553
|
+
}
|
|
5554
|
+
/** {zh}
|
|
5555
|
+
* @hidden
|
|
5556
|
+
*/
|
|
5557
|
+
/** {en}
|
|
5558
|
+
* @list option
|
|
5559
|
+
* @kind property
|
|
5560
|
+
* @brief Configurations for Google IMA SDK
|
|
5561
|
+
*/
|
|
5562
|
+
interface ImaConfig {
|
|
5563
|
+
/** {en}
|
|
5564
|
+
* @brief URL of the ad tag for IMA plugins
|
|
5565
|
+
*/
|
|
5566
|
+
adTagUrl?: string;
|
|
5567
|
+
/** {en}
|
|
5568
|
+
* @brief URL of the ad tag for IMA plugins when enableSCTE35 is `true`, must be a VAST xml
|
|
5569
|
+
*/
|
|
5570
|
+
adTagUrlForSCTE35?: string;
|
|
5571
|
+
/** {en}
|
|
5572
|
+
* @brief The entire advertising schedule, containing multiple ad breaks
|
|
5573
|
+
*/
|
|
5574
|
+
schedule?: AdRule[];
|
|
5575
|
+
}
|
|
5576
|
+
/** {zh}
|
|
5577
|
+
* @hidden
|
|
5578
|
+
*/
|
|
5579
|
+
/** {en}
|
|
5580
|
+
* @list option
|
|
5581
|
+
* @kind property
|
|
5582
|
+
* @brief Configurations for advertising
|
|
5583
|
+
*/
|
|
5584
|
+
interface AdConfig {
|
|
5585
|
+
/** {en}
|
|
5586
|
+
* @brief Ad client that will be used to display advertisements
|
|
5587
|
+
* - `google-ima`:Use the Google IMA SDK
|
|
5588
|
+
*/
|
|
5589
|
+
adType: "google-ima";
|
|
5590
|
+
/** {en}
|
|
5591
|
+
* @brief Property enabling SCTE-35 tag in hls manifest
|
|
5592
|
+
* - false: SCTE-35 disabled
|
|
5593
|
+
* - true: SCTE-35 enabled
|
|
5594
|
+
* @default false
|
|
5595
|
+
*/
|
|
5596
|
+
enableSCTE35?: boolean;
|
|
5597
|
+
/** {en}
|
|
5598
|
+
* @brief Configurations for Google IMA SDK
|
|
5599
|
+
* @listtip Required when adType is `google-ima`
|
|
5600
|
+
*/
|
|
5601
|
+
ima?: ImaConfig;
|
|
5602
|
+
}
|
|
5503
5603
|
/** {zh}
|
|
5504
5604
|
* @list option
|
|
5505
5605
|
* @kind property
|
|
@@ -5575,9 +5675,12 @@ interface Rtm {
|
|
|
5575
5675
|
*/
|
|
5576
5676
|
enableRTMAutoTranscode?: boolean;
|
|
5577
5677
|
/** {zh}
|
|
5578
|
-
* @brief
|
|
5678
|
+
* @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
|
|
5579
5679
|
* @default 1000
|
|
5580
5680
|
*/
|
|
5681
|
+
/** {en}
|
|
5682
|
+
* @brief Specify the recent time length for network evaluation in milliseconds. The default is 1000, which means evaluating the network conditions over the last 1000 milliseconds.
|
|
5683
|
+
*/
|
|
5581
5684
|
networkEvaluateInterval?: number;
|
|
5582
5685
|
}
|
|
5583
5686
|
/** {zh}
|
|
@@ -5630,28 +5733,55 @@ interface Flv {
|
|
|
5630
5733
|
*/
|
|
5631
5734
|
enableLowLatency?: boolean;
|
|
5632
5735
|
/** {zh}
|
|
5633
|
-
* @brief
|
|
5634
|
-
* @default -
|
|
5736
|
+
* @brief 低延时的详细配置。
|
|
5635
5737
|
*/
|
|
5636
5738
|
/** {en}
|
|
5637
|
-
* @brief
|
|
5638
|
-
* @default -
|
|
5739
|
+
* @brief Detailed configuration for low latency.
|
|
5639
5740
|
*/
|
|
5640
5741
|
lowLatency?: LowLatency;
|
|
5641
5742
|
/** {zh}
|
|
5642
|
-
* @brief 为播放器设置 FLV
|
|
5643
|
-
|
|
5743
|
+
* @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
|
|
5744
|
+
*/
|
|
5745
|
+
/** {en}
|
|
5746
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
|
|
5644
5747
|
*/
|
|
5645
5748
|
abr?: Abr;
|
|
5646
5749
|
/** {zh}
|
|
5647
5750
|
* @hidden
|
|
5648
5751
|
*/
|
|
5752
|
+
/** {en}
|
|
5753
|
+
* @hidden
|
|
5754
|
+
*/
|
|
5649
5755
|
mseLowLatency?: boolean;
|
|
5650
5756
|
/** {zh}
|
|
5651
|
-
* @brief
|
|
5652
|
-
* @default
|
|
5757
|
+
* @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
|
|
5758
|
+
* @default 5000
|
|
5759
|
+
*/
|
|
5760
|
+
/** {en}
|
|
5761
|
+
* @brief Set the maximum duration for no data return in milliseconds. The default value is 5. If this duration is exceeded, it will be considered a stream interruption and trigger an ended event.
|
|
5653
5762
|
*/
|
|
5654
5763
|
maxReaderInterval?: number;
|
|
5764
|
+
/** {zh}
|
|
5765
|
+
* @brief
|
|
5766
|
+
* 直播暂停时的断流等待时间,单位为秒,默认值为 0,表示直播暂停时即断流。
|
|
5767
|
+
* @default 0
|
|
5768
|
+
*/
|
|
5769
|
+
/** {en}
|
|
5770
|
+
* @brief The waiting time for disconnection during live streaming suspension, measured in seconds. The default value is 0, indicating immediate disconnection when live streaming is suspended.
|
|
5771
|
+
* @default 0
|
|
5772
|
+
*/
|
|
5773
|
+
disconnectTime?: number;
|
|
5774
|
+
/** {zh}
|
|
5775
|
+
* @brief 断流后重新拉流是否无缝,无缝拉流时重新拉流不会出现黑帧。
|
|
5776
|
+
* - `true`:是;
|
|
5777
|
+
* - `false`:否。
|
|
5778
|
+
* @default false
|
|
5779
|
+
*/
|
|
5780
|
+
/** {en}
|
|
5781
|
+
* @brief Whether re-pulling the stream after disconnection is seamless. When seamless stream pulling, there will be no black frames during re-pulling. - `true`: Yes; - `false`: No.
|
|
5782
|
+
* @default false
|
|
5783
|
+
*/
|
|
5784
|
+
seamlesslyReload?: boolean;
|
|
5655
5785
|
}
|
|
5656
5786
|
/** {zh}
|
|
5657
5787
|
* @list option
|
|
@@ -5670,15 +5800,15 @@ interface LowLatency {
|
|
|
5670
5800
|
*/
|
|
5671
5801
|
abrPts?: string | number;
|
|
5672
5802
|
/** {zh}
|
|
5673
|
-
* @brief FLV
|
|
5674
|
-
*
|
|
5675
|
-
*
|
|
5803
|
+
* @brief FLV 低延时模式下,是否开启倍速追帧。
|
|
5804
|
+
* - true:开启;
|
|
5805
|
+
* - false:关闭。
|
|
5676
5806
|
* @default true
|
|
5677
5807
|
*/
|
|
5678
5808
|
/** {en}
|
|
5679
|
-
* @brief
|
|
5680
|
-
*
|
|
5681
|
-
*
|
|
5809
|
+
* @brief Whether to enable speed-up frame chasing in FLV low latency mode.
|
|
5810
|
+
* - true: enabled;
|
|
5811
|
+
* - false: disabled.
|
|
5682
5812
|
* @default true
|
|
5683
5813
|
*/
|
|
5684
5814
|
enableFrameChasing?: boolean;
|
|
@@ -5733,8 +5863,12 @@ interface Hls {
|
|
|
5733
5863
|
*/
|
|
5734
5864
|
enableMSE?: boolean;
|
|
5735
5865
|
/** {zh}
|
|
5736
|
-
* @brief 为播放器设置 HLS
|
|
5737
|
-
* @
|
|
5866
|
+
* @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
|
|
5867
|
+
* @hidden
|
|
5868
|
+
*/
|
|
5869
|
+
/** {en}
|
|
5870
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
|
|
5871
|
+
* @hidden
|
|
5738
5872
|
*/
|
|
5739
5873
|
abr?: HlsAbr;
|
|
5740
5874
|
/**
|
|
@@ -5742,83 +5876,415 @@ interface Hls {
|
|
|
5742
5876
|
*/
|
|
5743
5877
|
mseLowLatency?: boolean;
|
|
5744
5878
|
}
|
|
5879
|
+
/** {zh}
|
|
5880
|
+
* @list option
|
|
5881
|
+
* @kind property
|
|
5882
|
+
* @brief 在 RTM 拉流场景下,获取到的网络情况。
|
|
5883
|
+
*/
|
|
5884
|
+
/** {en}
|
|
5885
|
+
* @list option
|
|
5886
|
+
* @kind property
|
|
5887
|
+
* @brief Network conditions obtained in the RTM pull stream scenario.
|
|
5888
|
+
*/
|
|
5745
5889
|
interface RTMNetWorkInfo {
|
|
5746
5890
|
/** {zh}
|
|
5747
|
-
* @brief
|
|
5891
|
+
* @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
|
|
5892
|
+
*/
|
|
5893
|
+
/** {en}
|
|
5894
|
+
* @brief The download speed within the latest network evaluation period, in units of bps.
|
|
5748
5895
|
*/
|
|
5749
5896
|
speed?: number;
|
|
5750
5897
|
/** {zh}
|
|
5751
|
-
* @brief
|
|
5898
|
+
* @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
|
|
5899
|
+
*/
|
|
5900
|
+
/** {en}
|
|
5901
|
+
* @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
|
|
5752
5902
|
*/
|
|
5753
5903
|
avgSpeed?: number;
|
|
5754
5904
|
/** {zh}
|
|
5755
|
-
* @brief
|
|
5905
|
+
* @brief 最近一次网络评估周期内的网络丢包率。
|
|
5906
|
+
*/
|
|
5907
|
+
/** {en}
|
|
5908
|
+
* @brief The packet loss rate of the network within the latest network evaluation cycle.
|
|
5756
5909
|
*/
|
|
5757
5910
|
lostRate?: number;
|
|
5758
5911
|
/** {zh}
|
|
5759
|
-
* @brief
|
|
5912
|
+
* @brief 最近 5 次网络评估周期内的网络丢包率平均值。
|
|
5913
|
+
*/
|
|
5914
|
+
/** {en}
|
|
5915
|
+
* @brief The average network packet loss rate within the recent 5 network evaluation cycles.
|
|
5760
5916
|
*/
|
|
5761
5917
|
avgLostRate?: number;
|
|
5762
5918
|
}
|
|
5763
5919
|
/** {zh}
|
|
5764
|
-
* @
|
|
5920
|
+
* @list option
|
|
5921
|
+
* @kind property
|
|
5922
|
+
* @brief RTM 直播流播放信息。
|
|
5923
|
+
*/
|
|
5924
|
+
/** {en}
|
|
5925
|
+
* @list option
|
|
5926
|
+
* @kind property
|
|
5927
|
+
* @brief RTM live stream information.
|
|
5765
5928
|
*/
|
|
5766
5929
|
interface StatsSnapShoot {
|
|
5930
|
+
/** {en}
|
|
5931
|
+
* @brief Video information.
|
|
5932
|
+
*/
|
|
5933
|
+
/** {zh}
|
|
5934
|
+
* @brief 视频信息。
|
|
5935
|
+
*/
|
|
5767
5936
|
video?: {
|
|
5937
|
+
/** {zh}
|
|
5938
|
+
* @hidden
|
|
5939
|
+
*/
|
|
5940
|
+
/** {en}
|
|
5941
|
+
* @hidden
|
|
5942
|
+
*/
|
|
5768
5943
|
codec: string;
|
|
5944
|
+
/** {zh}
|
|
5945
|
+
* @hidden
|
|
5946
|
+
*/
|
|
5947
|
+
/** {en}
|
|
5948
|
+
* @hidden
|
|
5949
|
+
*/
|
|
5769
5950
|
payloadType: string;
|
|
5951
|
+
/** {zh}
|
|
5952
|
+
* @hidden
|
|
5953
|
+
*/
|
|
5954
|
+
/** {en}
|
|
5955
|
+
* @hidden
|
|
5956
|
+
*/
|
|
5770
5957
|
sdpFmtpLine: string;
|
|
5958
|
+
/** {zh}
|
|
5959
|
+
* @hidden
|
|
5960
|
+
*/
|
|
5961
|
+
/** {en}
|
|
5962
|
+
* @hidden
|
|
5963
|
+
*/
|
|
5771
5964
|
bytesReceived: number;
|
|
5965
|
+
/** {zh}
|
|
5966
|
+
* @hidden
|
|
5967
|
+
*/
|
|
5968
|
+
/** {en}
|
|
5969
|
+
* @hidden
|
|
5970
|
+
*/
|
|
5772
5971
|
firCount: number;
|
|
5972
|
+
/** {zh}
|
|
5973
|
+
* @hidden
|
|
5974
|
+
*/
|
|
5975
|
+
/** {en}
|
|
5976
|
+
* @hidden
|
|
5977
|
+
*/
|
|
5773
5978
|
pliCount: number;
|
|
5979
|
+
/** {zh}
|
|
5980
|
+
* @brief 视频高度
|
|
5981
|
+
*/
|
|
5982
|
+
/** {en}
|
|
5983
|
+
* @brief 视频高度
|
|
5984
|
+
*/
|
|
5774
5985
|
frameHeight: number;
|
|
5986
|
+
/** {zh}
|
|
5987
|
+
* @brief 视频宽度
|
|
5988
|
+
*/
|
|
5989
|
+
/** {en}
|
|
5990
|
+
* @brief 视频宽度
|
|
5991
|
+
*/
|
|
5775
5992
|
frameWidth: number;
|
|
5993
|
+
/** {zh}
|
|
5994
|
+
* @hidden
|
|
5995
|
+
*/
|
|
5996
|
+
/** {en}
|
|
5997
|
+
* @hidden
|
|
5998
|
+
*/
|
|
5776
5999
|
framesDecoded: number;
|
|
6000
|
+
/** {zh}
|
|
6001
|
+
* @hidden
|
|
6002
|
+
*/
|
|
6003
|
+
/** {en}
|
|
6004
|
+
* @hidden
|
|
6005
|
+
*/
|
|
5777
6006
|
framesDropped: number;
|
|
6007
|
+
/** {zh}
|
|
6008
|
+
* @brief 视频帧率
|
|
6009
|
+
*/
|
|
6010
|
+
/** {en}
|
|
6011
|
+
* @brief 视频帧率
|
|
6012
|
+
*/
|
|
5778
6013
|
framesPerSecond: number;
|
|
6014
|
+
/** {zh}
|
|
6015
|
+
* @hidden
|
|
6016
|
+
*/
|
|
6017
|
+
/** {en}
|
|
6018
|
+
* @hidden
|
|
6019
|
+
*/
|
|
5779
6020
|
framesReceived: number;
|
|
6021
|
+
/** {zh}
|
|
6022
|
+
* @hidden
|
|
6023
|
+
*/
|
|
6024
|
+
/** {en}
|
|
6025
|
+
* @hidden
|
|
6026
|
+
*/
|
|
5780
6027
|
jitter: number;
|
|
6028
|
+
/** {zh}
|
|
6029
|
+
* @hidden
|
|
6030
|
+
*/
|
|
6031
|
+
/** {en}
|
|
6032
|
+
* @hidden
|
|
6033
|
+
*/
|
|
5781
6034
|
jitterBufferDelay: number;
|
|
6035
|
+
/** {zh}
|
|
6036
|
+
* @hidden
|
|
6037
|
+
*/
|
|
6038
|
+
/** {en}
|
|
6039
|
+
* @hidden
|
|
6040
|
+
*/
|
|
5782
6041
|
keyFramesDecoded: number;
|
|
6042
|
+
/** {zh}
|
|
6043
|
+
* @hidden
|
|
6044
|
+
*/
|
|
6045
|
+
/** {en}
|
|
6046
|
+
* @hidden
|
|
6047
|
+
*/
|
|
5783
6048
|
nackCount: number;
|
|
5784
|
-
|
|
5785
|
-
|
|
6049
|
+
/** {zh}
|
|
6050
|
+
* @brief 视频丢包总数
|
|
6051
|
+
*/
|
|
6052
|
+
/** {en}
|
|
6053
|
+
* @brief 视频丢包总数
|
|
6054
|
+
*/
|
|
6055
|
+
packetsLost: number;
|
|
6056
|
+
/** {zh}
|
|
6057
|
+
* @brief 视频收包总数
|
|
6058
|
+
*/
|
|
6059
|
+
/** {en}
|
|
6060
|
+
* @brief 视频收包总数
|
|
6061
|
+
*/
|
|
6062
|
+
packetsReceived: number;
|
|
5786
6063
|
};
|
|
6064
|
+
/** {en}
|
|
6065
|
+
* @brief Audio information.
|
|
6066
|
+
*/
|
|
6067
|
+
/** {zh}
|
|
6068
|
+
* @brief 音频信息。
|
|
6069
|
+
*/
|
|
5787
6070
|
audio?: {
|
|
6071
|
+
/** {zh}
|
|
6072
|
+
* @hidden
|
|
6073
|
+
*/
|
|
6074
|
+
/** {en}
|
|
6075
|
+
* @hidden
|
|
6076
|
+
*/
|
|
5788
6077
|
codec: string;
|
|
6078
|
+
/** {zh}
|
|
6079
|
+
* @hidden
|
|
6080
|
+
*/
|
|
6081
|
+
/** {en}
|
|
6082
|
+
* @hidden
|
|
6083
|
+
*/
|
|
5789
6084
|
payloadType: string;
|
|
6085
|
+
/** {zh}
|
|
6086
|
+
* @hidden
|
|
6087
|
+
*/
|
|
6088
|
+
/** {en}
|
|
6089
|
+
* @hidden
|
|
6090
|
+
*/
|
|
5790
6091
|
sdpFmtpLine: string;
|
|
6092
|
+
/** {zh}
|
|
6093
|
+
* @hidden
|
|
6094
|
+
*/
|
|
6095
|
+
/** {en}
|
|
6096
|
+
* @hidden
|
|
6097
|
+
*/
|
|
5791
6098
|
audioLevel: number;
|
|
6099
|
+
/** {zh}
|
|
6100
|
+
* @hidden
|
|
6101
|
+
*/
|
|
6102
|
+
/** {en}
|
|
6103
|
+
* @hidden
|
|
6104
|
+
*/
|
|
5792
6105
|
bytesReceived: number;
|
|
6106
|
+
/** {zh}
|
|
6107
|
+
* @hidden
|
|
6108
|
+
*/
|
|
6109
|
+
/** {en}
|
|
6110
|
+
* @hidden
|
|
6111
|
+
*/
|
|
5793
6112
|
jitter: number;
|
|
6113
|
+
/** {zh}
|
|
6114
|
+
* @hidden
|
|
6115
|
+
*/
|
|
6116
|
+
/** {en}
|
|
6117
|
+
* @hidden
|
|
6118
|
+
*/
|
|
5794
6119
|
jitterBufferDelay: number;
|
|
6120
|
+
/** {zh}
|
|
6121
|
+
* @brief 音频丢包总数
|
|
6122
|
+
*/
|
|
6123
|
+
/** {en}
|
|
6124
|
+
* @brief 音频丢包总数
|
|
6125
|
+
*/
|
|
5795
6126
|
packetsLost: number;
|
|
6127
|
+
/** {zh}
|
|
6128
|
+
* @brief 音频收包总数
|
|
6129
|
+
*/
|
|
6130
|
+
/** {en}
|
|
6131
|
+
* @brief 音频收包总数
|
|
6132
|
+
*/
|
|
5796
6133
|
packetsReceived: number;
|
|
6134
|
+
/** {zh}
|
|
6135
|
+
* @hidden
|
|
6136
|
+
*/
|
|
6137
|
+
/** {en}
|
|
6138
|
+
* @hidden
|
|
6139
|
+
*/
|
|
5797
6140
|
totalSamplesDuration: number;
|
|
6141
|
+
/** {zh}
|
|
6142
|
+
* @hidden
|
|
6143
|
+
*/
|
|
6144
|
+
/** {en}
|
|
6145
|
+
* @hidden
|
|
6146
|
+
*/
|
|
5798
6147
|
totalSamplesReceived: number;
|
|
5799
6148
|
};
|
|
5800
6149
|
}
|
|
5801
6150
|
/** {zh}
|
|
5802
|
-
* @
|
|
6151
|
+
* @list option
|
|
6152
|
+
* @kind property
|
|
6153
|
+
* @brief FLV 直播流播放信息。
|
|
6154
|
+
*/
|
|
6155
|
+
/** {en}
|
|
6156
|
+
* @list option
|
|
6157
|
+
* @kind property
|
|
6158
|
+
* @brief FLV live stream information.
|
|
5803
6159
|
*/
|
|
5804
6160
|
interface FlvStats {
|
|
6161
|
+
/** {zh}
|
|
6162
|
+
* @brief 音频格式。
|
|
6163
|
+
* @hidden
|
|
6164
|
+
*/
|
|
6165
|
+
/** {en}
|
|
6166
|
+
* @brief Audio format.
|
|
6167
|
+
* @hidden
|
|
6168
|
+
*/
|
|
5805
6169
|
audioCodec: string;
|
|
6170
|
+
/** {zh}
|
|
6171
|
+
* @brief 平均下载速度。
|
|
6172
|
+
*/
|
|
6173
|
+
/** {en}
|
|
6174
|
+
* @brief Average download speed.
|
|
6175
|
+
*/
|
|
5806
6176
|
avgSpeed: number;
|
|
6177
|
+
/** {zh}
|
|
6178
|
+
* @brief 码率。
|
|
6179
|
+
*/
|
|
6180
|
+
/** {en}
|
|
6181
|
+
* @brief bitrate.
|
|
6182
|
+
*/
|
|
5807
6183
|
bitrate: number;
|
|
6184
|
+
/** {zh}
|
|
6185
|
+
* @brief 剩余缓冲时间。
|
|
6186
|
+
*/
|
|
6187
|
+
/** {en}
|
|
6188
|
+
* @brief Remaining buffer time.
|
|
6189
|
+
*/
|
|
5808
6190
|
bufferEnd: number;
|
|
6191
|
+
/** {zh}
|
|
6192
|
+
* @hidden
|
|
6193
|
+
*/
|
|
6194
|
+
/** {en}
|
|
6195
|
+
* @hidden
|
|
6196
|
+
*/
|
|
5809
6197
|
channelCount: number;
|
|
6198
|
+
/** {zh}
|
|
6199
|
+
* @brief 当前播放时间。
|
|
6200
|
+
*/
|
|
6201
|
+
/** {en}
|
|
6202
|
+
* @brief The current playing time.
|
|
6203
|
+
*/
|
|
5810
6204
|
currentTime: number;
|
|
6205
|
+
/** {zh}
|
|
6206
|
+
* @hidden
|
|
6207
|
+
*/
|
|
6208
|
+
/** {en}
|
|
6209
|
+
* @hidden
|
|
6210
|
+
*/
|
|
5811
6211
|
decodeFps: number;
|
|
6212
|
+
/** {zh}
|
|
6213
|
+
* @hidden
|
|
6214
|
+
*/
|
|
6215
|
+
/** {en}
|
|
6216
|
+
* @hidden
|
|
6217
|
+
*/
|
|
5812
6218
|
domain: string;
|
|
6219
|
+
/** {zh}
|
|
6220
|
+
* @brief 当前下载速度。
|
|
6221
|
+
*/
|
|
6222
|
+
/** {en}
|
|
6223
|
+
* @brief Current download speed.
|
|
6224
|
+
*/
|
|
5813
6225
|
downloadSpeed: number;
|
|
6226
|
+
/** {zh}
|
|
6227
|
+
* @brief 编码方式。
|
|
6228
|
+
*/
|
|
6229
|
+
/** {en}
|
|
6230
|
+
* @brief Encoding method.
|
|
6231
|
+
*/
|
|
5814
6232
|
encodeType: string;
|
|
6233
|
+
/** {zh}
|
|
6234
|
+
* @brief 帧率。
|
|
6235
|
+
*/
|
|
6236
|
+
/** {en}
|
|
6237
|
+
* @brief Frame rate.
|
|
6238
|
+
*/
|
|
5815
6239
|
fps: number;
|
|
6240
|
+
/** {zh}
|
|
6241
|
+
* @hidden
|
|
6242
|
+
*/
|
|
6243
|
+
/** {en}
|
|
6244
|
+
* @hidden
|
|
6245
|
+
*/
|
|
5816
6246
|
gop: number;
|
|
6247
|
+
/** {zh}
|
|
6248
|
+
* @brief 视频高度。
|
|
6249
|
+
*/
|
|
6250
|
+
/** {en}
|
|
6251
|
+
* @brief Video height.
|
|
6252
|
+
*/
|
|
5817
6253
|
height: number;
|
|
6254
|
+
/** {zh}
|
|
6255
|
+
* @hidden
|
|
6256
|
+
*/
|
|
6257
|
+
/** {en}
|
|
6258
|
+
* @hidden
|
|
6259
|
+
*/
|
|
5818
6260
|
samplerate: number;
|
|
6261
|
+
/** {zh}
|
|
6262
|
+
* @brief 总共收到的字节数。
|
|
6263
|
+
*/
|
|
6264
|
+
/** {en}
|
|
6265
|
+
* @brief The total number of bytes received.
|
|
6266
|
+
*/
|
|
5819
6267
|
totalReceivedByte: number;
|
|
6268
|
+
/** {zh}
|
|
6269
|
+
* @brief 接收所有字节消耗时长。
|
|
6270
|
+
*/
|
|
6271
|
+
/** {en}
|
|
6272
|
+
* @brief The time consumed for receiving all bytes.
|
|
6273
|
+
*/
|
|
5820
6274
|
totalReceivedCost: number;
|
|
6275
|
+
/** {zh}
|
|
6276
|
+
* @hidden
|
|
6277
|
+
*/
|
|
6278
|
+
/** {en}
|
|
6279
|
+
* @hidden
|
|
6280
|
+
*/
|
|
5821
6281
|
videoCodec: string;
|
|
6282
|
+
/** {zh}
|
|
6283
|
+
* @brief 视频宽度。
|
|
6284
|
+
*/
|
|
6285
|
+
/** {en}
|
|
6286
|
+
* @brief Video wight.
|
|
6287
|
+
*/
|
|
5822
6288
|
width: number;
|
|
5823
6289
|
}
|
|
5824
6290
|
/** {zh}
|
|
@@ -5842,7 +6308,10 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5842
6308
|
*/
|
|
5843
6309
|
constructor(options: LiveVePlayerOptions);
|
|
5844
6310
|
/** {zh}
|
|
5845
|
-
* @brief
|
|
6311
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
6312
|
+
*/
|
|
6313
|
+
/** {en}
|
|
6314
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
5846
6315
|
*/
|
|
5847
6316
|
get playTime(): number;
|
|
5848
6317
|
/** {zh}
|
|
@@ -5876,49 +6345,80 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5876
6345
|
*/
|
|
5877
6346
|
closeInfoPanel(): void;
|
|
5878
6347
|
/** {zh}
|
|
5879
|
-
* @brief
|
|
6348
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
6349
|
+
*/
|
|
6350
|
+
/** {en}
|
|
6351
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
5880
6352
|
*/
|
|
5881
6353
|
openAbr(): void;
|
|
5882
6354
|
/** {zh}
|
|
5883
|
-
* @brief
|
|
6355
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
6356
|
+
*/
|
|
6357
|
+
/** {en}
|
|
6358
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
5884
6359
|
*/
|
|
5885
6360
|
closeAbr(): void;
|
|
5886
6361
|
/** {zh}
|
|
5887
|
-
* @brief 调用此方法更新 DRM
|
|
5888
|
-
|
|
6362
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
6363
|
+
*/
|
|
6364
|
+
/** {en}
|
|
6365
|
+
* @brief Use this method to update DRM configuration.
|
|
6366
|
+
* @param config
|
|
5889
6367
|
*/
|
|
5890
6368
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5891
6369
|
/** {zh}
|
|
5892
|
-
* @brief
|
|
5893
|
-
* @param options
|
|
6370
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
6371
|
+
* @param options ABR 的配置。
|
|
5894
6372
|
* @returns
|
|
5895
6373
|
*/
|
|
6374
|
+
/** {en}
|
|
6375
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
6376
|
+
* @param options Configuration of ABR.
|
|
6377
|
+
*/
|
|
5896
6378
|
switchAbr(options: {
|
|
5897
6379
|
/** {zh}
|
|
5898
|
-
* @brief 是否开启
|
|
5899
|
-
*
|
|
5900
|
-
*
|
|
6380
|
+
* @brief 是否开启 ABR 功能。
|
|
6381
|
+
* - true:开启
|
|
6382
|
+
* - false:关闭
|
|
6383
|
+
*/
|
|
6384
|
+
/** {en}
|
|
6385
|
+
* @brief Whether to enable the ABR function.
|
|
6386
|
+
* - true: Enabled ;
|
|
6387
|
+
* - false: Disabled
|
|
6388
|
+
* @default -
|
|
5901
6389
|
*/
|
|
5902
6390
|
enable: boolean;
|
|
5903
6391
|
/** {zh}
|
|
5904
|
-
* @brief
|
|
6392
|
+
* @brief 切换自适应码率直播流对应的码率。
|
|
6393
|
+
*/
|
|
6394
|
+
/** {en}
|
|
6395
|
+
* @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
|
|
5905
6396
|
*/
|
|
5906
6397
|
bitrate: number;
|
|
5907
6398
|
}): void;
|
|
5908
6399
|
/** {zh}
|
|
5909
|
-
* @brief 获取 RTM
|
|
6400
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
5910
6401
|
* @returns
|
|
5911
6402
|
*/
|
|
6403
|
+
/** {en}
|
|
6404
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
6405
|
+
*/
|
|
5912
6406
|
getRTMNetWorkInfo(): RTMNetWorkInfo;
|
|
5913
6407
|
/** {zh}
|
|
5914
|
-
* @brief 获取 RTM
|
|
6408
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
5915
6409
|
* @returns
|
|
5916
6410
|
*/
|
|
6411
|
+
/** {en}
|
|
6412
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
6413
|
+
*/
|
|
5917
6414
|
getRTMStats(): Promise<StatsSnapShoot>;
|
|
5918
6415
|
/** {zh}
|
|
5919
|
-
* @brief 获取 FLV
|
|
6416
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
5920
6417
|
* @returns
|
|
5921
6418
|
*/
|
|
6419
|
+
/** {en}
|
|
6420
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
6421
|
+
*/
|
|
5922
6422
|
getFLVStats(): FlvStats;
|
|
5923
6423
|
}
|
|
5924
6424
|
/** {zh}
|
|
@@ -5976,7 +6476,7 @@ declare function isRTMSupported(): Promise<boolean>;
|
|
|
5976
6476
|
/** {zh}
|
|
5977
6477
|
* @detail api
|
|
5978
6478
|
* @brief 当前浏览器是否支持 H264 RTM 流播放。
|
|
5979
|
-
* @param codec 播放格式,目前只支持 `H264
|
|
6479
|
+
* @param codec 播放格式,目前只支持 `H264`。
|
|
5980
6480
|
* @returns
|
|
5981
6481
|
*/
|
|
5982
6482
|
/** {en}
|
|
@@ -6130,14 +6630,15 @@ declare namespace live {
|
|
|
6130
6630
|
}
|
|
6131
6631
|
/** {zh}
|
|
6132
6632
|
* @detail error
|
|
6633
|
+
* @brief 错误等级。
|
|
6133
6634
|
*/
|
|
6134
6635
|
/** {en}
|
|
6135
6636
|
* @detail error
|
|
6637
|
+
* @brief Error level.
|
|
6136
6638
|
*/
|
|
6137
6639
|
enum Level {
|
|
6138
6640
|
/** {zh}
|
|
6139
|
-
* @brief
|
|
6140
|
-
*
|
|
6641
|
+
* @brief 严重。
|
|
6141
6642
|
*/
|
|
6142
6643
|
/** {en}
|
|
6143
6644
|
* @brief Fatal.
|
|
@@ -6145,7 +6646,7 @@ declare namespace live {
|
|
|
6145
6646
|
*/
|
|
6146
6647
|
Fatal = "Fatal",
|
|
6147
6648
|
/** {zh}
|
|
6148
|
-
* @brief
|
|
6649
|
+
* @brief 报错。
|
|
6149
6650
|
*/
|
|
6150
6651
|
/** {en}
|
|
6151
6652
|
* @brief Error.
|
|
@@ -6513,7 +7014,7 @@ declare namespace live {
|
|
|
6513
7014
|
/** {zh}
|
|
6514
7015
|
* @list error
|
|
6515
7016
|
* @detail error
|
|
6516
|
-
* @brief
|
|
7017
|
+
* @brief 错误对象。
|
|
6517
7018
|
* @name VeError
|
|
6518
7019
|
* @id VeError
|
|
6519
7020
|
*/
|
|
@@ -6525,11 +7026,11 @@ declare namespace live {
|
|
|
6525
7026
|
* @id VeError
|
|
6526
7027
|
*/
|
|
6527
7028
|
class VeError<T extends string = TextKey> extends Error {
|
|
6528
|
-
/**
|
|
7029
|
+
/** {zh}
|
|
6529
7030
|
* @brief 错误码。
|
|
6530
7031
|
*/
|
|
6531
7032
|
/** {en}
|
|
6532
|
-
* @brief
|
|
7033
|
+
* @brief Error code.
|
|
6533
7034
|
*/
|
|
6534
7035
|
readonly errorCode: ErrorCode;
|
|
6535
7036
|
/** {zh}
|
|
@@ -7025,20 +7526,32 @@ declare namespace live {
|
|
|
7025
7526
|
REFRESH_CLICK = "refreshClick",
|
|
7026
7527
|
/** {zh}
|
|
7027
7528
|
* Abr 切换码率
|
|
7529
|
+
* @brief 切换自适应码率流
|
|
7530
|
+
*/
|
|
7531
|
+
/** {en}
|
|
7532
|
+
* @brief Event for switching Adaptive Bitrate (ABR) streams.
|
|
7028
7533
|
*/
|
|
7029
7534
|
ABR_SWITCH_START = "abrSwitchStart",
|
|
7030
7535
|
/** {zh}
|
|
7031
7536
|
* Abr 切换码率成功
|
|
7537
|
+
* @brief 成功切换自适应码率直播流
|
|
7538
|
+
*/
|
|
7539
|
+
/** {en}
|
|
7540
|
+
* @brief Event of successfully switching Adaptive Bitrate (ABR) live stream.
|
|
7032
7541
|
*/
|
|
7033
7542
|
ABR_SWITCH_SUCCESS = "abrSwitchedSuccess",
|
|
7034
7543
|
/** {zh}
|
|
7035
7544
|
* Abr 切换码率失败
|
|
7545
|
+
* @brief 切换自适应码率直播流失败
|
|
7546
|
+
*/
|
|
7547
|
+
/** {en}
|
|
7548
|
+
* @brief Event of failing to switch Adaptive Bitrate (ABR) live stream.
|
|
7036
7549
|
*/
|
|
7037
7550
|
ABR_SWITCH_FAILED = "abrSwitchFailed"
|
|
7038
7551
|
}
|
|
7039
7552
|
/** {zh}
|
|
7040
7553
|
* @detail events
|
|
7041
|
-
* @brief
|
|
7554
|
+
* @brief 事件回调。
|
|
7042
7555
|
* @hiddenDefault
|
|
7043
7556
|
* @example
|
|
7044
7557
|
* ```js
|
|
@@ -7181,6 +7694,8 @@ declare namespace live {
|
|
|
7181
7694
|
/** {en}
|
|
7182
7695
|
* The player has focus.
|
|
7183
7696
|
* @param data Information about the event.
|
|
7697
|
+
* @brief
|
|
7698
|
+
* The player has focus.
|
|
7184
7699
|
*/
|
|
7185
7700
|
[LiveEvents.PLAYER_FOCUS]: (data: {
|
|
7186
7701
|
/** {zh}
|
|
@@ -7568,53 +8083,77 @@ declare namespace live {
|
|
|
7568
8083
|
};
|
|
7569
8084
|
}) => void;
|
|
7570
8085
|
/** {zh}
|
|
7571
|
-
* 时移状态切换。
|
|
8086
|
+
* @brief 时移状态切换。
|
|
7572
8087
|
* @param isTimeShift 是否是时移状态。
|
|
7573
8088
|
*/
|
|
7574
8089
|
/** {en}
|
|
7575
|
-
* The time-shift state changes.
|
|
8090
|
+
* @brief The time-shift state changes.
|
|
7576
8091
|
* @param isTimeShift Whether the live stream is time-shifted.
|
|
7577
8092
|
*/
|
|
7578
8093
|
[LiveEvents.TIME_SHIFT_CHANGE]: (isTimeShift: boolean) => void;
|
|
7579
8094
|
/** {zh}
|
|
7580
|
-
* 点击刷新按钮。
|
|
8095
|
+
* @brief 点击刷新按钮。
|
|
7581
8096
|
*/
|
|
7582
8097
|
/** {en}
|
|
7583
|
-
* The user clicks the Refresh button.
|
|
8098
|
+
* @brief The user clicks the Refresh button.
|
|
7584
8099
|
*/
|
|
7585
8100
|
[LiveEvents.REFRESH_CLICK]: () => void;
|
|
7586
8101
|
/** {zh}
|
|
7587
|
-
*
|
|
8102
|
+
* @brief 切换自适应码率流的事件回调。
|
|
8103
|
+
*/
|
|
8104
|
+
/** {en}
|
|
8105
|
+
* @brief Event callback for switching Adaptive Bitrate (ABR) streams.
|
|
7588
8106
|
*/
|
|
7589
8107
|
[LiveEvents.ABR_SWITCH_START]: (data: {
|
|
7590
8108
|
/** {zh}
|
|
7591
|
-
*
|
|
8109
|
+
* @brief 切换后的码率。
|
|
8110
|
+
*/
|
|
8111
|
+
/** {en}
|
|
8112
|
+
* @brief Bitrate after switching.
|
|
7592
8113
|
*/
|
|
7593
8114
|
bitrate: number;
|
|
7594
8115
|
}) => void;
|
|
7595
8116
|
/** {zh}
|
|
7596
|
-
*
|
|
8117
|
+
* @brief 成功切换自适应码率流的事件回调。
|
|
8118
|
+
*/
|
|
8119
|
+
/** {en}
|
|
8120
|
+
* @brief Event callback of successfully switching Adaptive Bitrate (ABR) live stream.
|
|
7597
8121
|
*/
|
|
7598
8122
|
[LiveEvents.ABR_SWITCH_SUCCESS]: (data: {
|
|
7599
8123
|
/** {zh}
|
|
7600
|
-
*
|
|
8124
|
+
* @brief 切换后的码率。
|
|
8125
|
+
*/
|
|
8126
|
+
/** {en}
|
|
8127
|
+
* @brief Bitrate after switching.
|
|
7601
8128
|
*/
|
|
7602
8129
|
bitrate: number;
|
|
7603
|
-
/**
|
|
7604
|
-
*
|
|
8130
|
+
/** {zh}
|
|
8131
|
+
* @brief 切换后的播放地址。
|
|
8132
|
+
*/
|
|
8133
|
+
/** {en}
|
|
8134
|
+
* @brief The playback address after the switch.
|
|
7605
8135
|
*/
|
|
7606
8136
|
url: string;
|
|
7607
8137
|
}) => void;
|
|
7608
8138
|
/** {zh}
|
|
7609
|
-
*
|
|
8139
|
+
* @brief 切换自适应码率直播流失败的事件回调。
|
|
8140
|
+
*/
|
|
8141
|
+
/** {en}
|
|
8142
|
+
* @brief Event callback of failing to switch Adaptive Bitrate (ABR) live stream.
|
|
7610
8143
|
*/
|
|
7611
8144
|
[LiveEvents.ABR_SWITCH_FAILED]: (data: {
|
|
7612
8145
|
/** {zh}
|
|
7613
|
-
*
|
|
8146
|
+
* @brief 切换的码率。
|
|
8147
|
+
*/
|
|
8148
|
+
/** {en}
|
|
8149
|
+
* @brief Bitrate after switching.
|
|
7614
8150
|
*/
|
|
7615
8151
|
bitrate: number;
|
|
7616
|
-
/**
|
|
7617
|
-
*
|
|
8152
|
+
/** {zh}
|
|
8153
|
+
* @brief 切换后的播放地址。
|
|
8154
|
+
*/
|
|
8155
|
+
/** {en}
|
|
8156
|
+
* @brief The playback address after the switch.
|
|
7618
8157
|
*/
|
|
7619
8158
|
url: string;
|
|
7620
8159
|
}) => void;
|
|
@@ -7759,7 +8298,7 @@ declare namespace live {
|
|
|
7759
8298
|
*/
|
|
7760
8299
|
enum ListType {
|
|
7761
8300
|
/** {zh}
|
|
7762
|
-
* @brief
|
|
8301
|
+
* @brief 全屏布局。
|
|
7763
8302
|
* @hidden
|
|
7764
8303
|
*/
|
|
7765
8304
|
/** {en}
|
|
@@ -7768,21 +8307,21 @@ declare namespace live {
|
|
|
7768
8307
|
*/
|
|
7769
8308
|
Middle = "middle",
|
|
7770
8309
|
/** {zh}
|
|
7771
|
-
* @brief
|
|
8310
|
+
* @brief 底部抽屉。
|
|
7772
8311
|
*/
|
|
7773
8312
|
/** {en}
|
|
7774
8313
|
* @brief Bottom navigation drawer.
|
|
7775
8314
|
*/
|
|
7776
8315
|
Bottom = "bottom",
|
|
7777
8316
|
/** {zh}
|
|
7778
|
-
* @brief
|
|
8317
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
7779
8318
|
*/
|
|
7780
8319
|
/** {en}
|
|
7781
8320
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
7782
8321
|
*/
|
|
7783
8322
|
Fullscreen = "fullscreen",
|
|
7784
8323
|
/** {zh}
|
|
7785
|
-
* @brief
|
|
8324
|
+
* @brief 窗口蒙层展示。
|
|
7786
8325
|
*/
|
|
7787
8326
|
/** {en}
|
|
7788
8327
|
* @brief Overlay.
|
|
@@ -8195,11 +8734,9 @@ declare namespace live {
|
|
|
8195
8734
|
poster?: string;
|
|
8196
8735
|
/** {zh}
|
|
8197
8736
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
8198
|
-
* @default -
|
|
8199
8737
|
*/
|
|
8200
8738
|
/** {en}
|
|
8201
8739
|
* @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
|
|
8202
|
-
* @default -
|
|
8203
8740
|
*/
|
|
8204
8741
|
lang?: Lang;
|
|
8205
8742
|
/** {zh}
|
|
@@ -8258,25 +8795,20 @@ declare namespace live {
|
|
|
8258
8795
|
* @brief Whether to display the full-screen button.
|
|
8259
8796
|
* - `true`: Display;
|
|
8260
8797
|
* - `false`: Do not display.
|
|
8261
|
-
* @default -
|
|
8262
8798
|
*/
|
|
8263
8799
|
fullscreen?: boolean | Fullscreen;
|
|
8264
8800
|
/** {zh}
|
|
8265
8801
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
8266
|
-
* @default -
|
|
8267
8802
|
*/
|
|
8268
8803
|
/** {en}
|
|
8269
8804
|
* @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
|
|
8270
|
-
* @default -
|
|
8271
8805
|
*/
|
|
8272
8806
|
error?: ErrorConfig;
|
|
8273
8807
|
/** {zh}
|
|
8274
8808
|
* @brief 为播放器设置清晰度的相关配置。
|
|
8275
|
-
* @default -
|
|
8276
8809
|
*/
|
|
8277
8810
|
/** {en}
|
|
8278
8811
|
* @brief Resolution-related configurations.
|
|
8279
|
-
* @default -
|
|
8280
8812
|
*/
|
|
8281
8813
|
definition?: DefinitionConfig;
|
|
8282
8814
|
/** {zh}
|
|
@@ -8537,8 +9069,7 @@ declare namespace live {
|
|
|
8537
9069
|
* `true`: Display;
|
|
8538
9070
|
* `false`: Do not display.
|
|
8539
9071
|
* @default false
|
|
8540
|
-
* @brief
|
|
8541
|
-
* Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
9072
|
+
* @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
|
|
8542
9073
|
* - `true`: Display;
|
|
8543
9074
|
* - `false`: Do not display.
|
|
8544
9075
|
*/
|
|
@@ -8556,7 +9087,7 @@ declare namespace live {
|
|
|
8556
9087
|
*/
|
|
8557
9088
|
interface CommonStyle {
|
|
8558
9089
|
/** {zh}
|
|
8559
|
-
* @brief
|
|
9090
|
+
* @brief 进度条底色。
|
|
8560
9091
|
* @default 无
|
|
8561
9092
|
*/
|
|
8562
9093
|
/** {en}
|
|
@@ -8564,7 +9095,7 @@ declare namespace live {
|
|
|
8564
9095
|
*/
|
|
8565
9096
|
progressColor?: string;
|
|
8566
9097
|
/** {zh}
|
|
8567
|
-
* @brief
|
|
9098
|
+
* @brief 播放完成部分进度条底色。
|
|
8568
9099
|
* @default 无
|
|
8569
9100
|
*/
|
|
8570
9101
|
/** {en}
|
|
@@ -8572,7 +9103,7 @@ declare namespace live {
|
|
|
8572
9103
|
*/
|
|
8573
9104
|
playedColor?: string;
|
|
8574
9105
|
/** {zh}
|
|
8575
|
-
* @brief
|
|
9106
|
+
* @brief 缓存部分进度条底色。
|
|
8576
9107
|
* @default 无
|
|
8577
9108
|
*/
|
|
8578
9109
|
/** {en}
|
|
@@ -8581,7 +9112,7 @@ declare namespace live {
|
|
|
8581
9112
|
*/
|
|
8582
9113
|
cachedColor?: string;
|
|
8583
9114
|
/** {zh}
|
|
8584
|
-
* @brief
|
|
9115
|
+
* @brief 进度条滑块样式。
|
|
8585
9116
|
* @default 无
|
|
8586
9117
|
*/
|
|
8587
9118
|
/** {en}
|
|
@@ -8592,7 +9123,7 @@ declare namespace live {
|
|
|
8592
9123
|
[propName: string]: any;
|
|
8593
9124
|
};
|
|
8594
9125
|
/** {zh}
|
|
8595
|
-
* @brief
|
|
9126
|
+
* @brief 音量颜色。
|
|
8596
9127
|
* @default 无
|
|
8597
9128
|
*/
|
|
8598
9129
|
/** {en}
|
|
@@ -8616,14 +9147,14 @@ declare namespace live {
|
|
|
8616
9147
|
*/
|
|
8617
9148
|
enum Codec {
|
|
8618
9149
|
/** {zh}
|
|
8619
|
-
* @brief H.265
|
|
9150
|
+
* @brief H.265 编码格式。
|
|
8620
9151
|
*/
|
|
8621
9152
|
/** {en}
|
|
8622
9153
|
* @brief H.265.
|
|
8623
9154
|
*/
|
|
8624
9155
|
H265 = "h265",
|
|
8625
9156
|
/** {zh}
|
|
8626
|
-
* @brief H.264
|
|
9157
|
+
* @brief H.264 编码格式。
|
|
8627
9158
|
*/
|
|
8628
9159
|
/** {en}
|
|
8629
9160
|
* @brief H.264.
|
|
@@ -8640,18 +9171,18 @@ declare namespace live {
|
|
|
8640
9171
|
*/
|
|
8641
9172
|
enum Degradation {
|
|
8642
9173
|
/** {zh}
|
|
8643
|
-
* @brief
|
|
9174
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
8644
9175
|
*/
|
|
8645
9176
|
/** {en}
|
|
8646
|
-
* @brief
|
|
9177
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
8647
9178
|
*/
|
|
8648
9179
|
SoftFirst = "soft-first",
|
|
8649
9180
|
/** {zh}
|
|
8650
|
-
* @brief
|
|
9181
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
8651
9182
|
* @hidden
|
|
8652
9183
|
*/
|
|
8653
9184
|
/** {en}
|
|
8654
|
-
* @brief
|
|
9185
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
8655
9186
|
* @hidden
|
|
8656
9187
|
*/
|
|
8657
9188
|
H264First = "h264-first"
|
|
@@ -8668,14 +9199,14 @@ declare namespace live {
|
|
|
8668
9199
|
*/
|
|
8669
9200
|
enum DecodeType {
|
|
8670
9201
|
/** {zh}
|
|
8671
|
-
* @brief
|
|
9202
|
+
* @brief 软解。
|
|
8672
9203
|
*/
|
|
8673
9204
|
/** {en}
|
|
8674
9205
|
* @brief Software decoding.
|
|
8675
9206
|
*/
|
|
8676
9207
|
Software = "software",
|
|
8677
9208
|
/** {zh}
|
|
8678
|
-
* @brief
|
|
9209
|
+
* @brief 硬解。
|
|
8679
9210
|
*/
|
|
8680
9211
|
/** {en}
|
|
8681
9212
|
* @brief Hardware decoding.
|
|
@@ -8866,6 +9397,11 @@ declare namespace live {
|
|
|
8866
9397
|
/** {zh}
|
|
8867
9398
|
* 获取播放器版本号
|
|
8868
9399
|
* @returns
|
|
9400
|
+
* @brief
|
|
9401
|
+
* 获取播放器 SDK 版本号。
|
|
9402
|
+
*/
|
|
9403
|
+
/** {en}
|
|
9404
|
+
* @brief Retrieve the player SDK version number.
|
|
8869
9405
|
*/
|
|
8870
9406
|
get playerVersion(): string;
|
|
8871
9407
|
/** {zh}
|
|
@@ -8953,8 +9489,8 @@ declare namespace live {
|
|
|
8953
9489
|
static create<T extends VePlayerBase>(options?: VePlayerBaseOptions, Constructor?: Constructor<T>): Promise<T>;
|
|
8954
9490
|
/** {zh}
|
|
8955
9491
|
* @brief 调用此方法切换拉流地址、线路、清晰度。
|
|
8956
|
-
* @param target
|
|
8957
|
-
* @param options
|
|
9492
|
+
* @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
|
|
9493
|
+
* @param options 更多配置信息。
|
|
8958
9494
|
*/
|
|
8959
9495
|
/** {en}
|
|
8960
9496
|
* @brief Switches the pull stream address, playback source, or resolution.
|
|
@@ -8991,11 +9527,12 @@ declare namespace live {
|
|
|
8991
9527
|
*/
|
|
8992
9528
|
fallbackToFirstDefinition?: boolean;
|
|
8993
9529
|
/** {zh}
|
|
8994
|
-
* @brief
|
|
8995
|
-
* - true: 无缝切换
|
|
8996
|
-
* - false: 非无缝切换
|
|
9530
|
+
* @brief 是否无缝切换,true 为无缝切换,false 为非无缝切换。
|
|
8997
9531
|
* @default false
|
|
8998
9532
|
*/
|
|
9533
|
+
/** {en}
|
|
9534
|
+
* @brief Whether seamless switching or not. True means seamless switching and false means non-seamless switching.
|
|
9535
|
+
*/
|
|
8999
9536
|
seamless?: boolean;
|
|
9000
9537
|
}): Promise<ExposedDefinition>;
|
|
9001
9538
|
/** {zh}
|
|
@@ -9031,16 +9568,15 @@ declare namespace live {
|
|
|
9031
9568
|
source?: string;
|
|
9032
9569
|
}): Promise<void>;
|
|
9033
9570
|
// TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
|
|
9034
|
-
/**
|
|
9035
9571
|
/** {zh}
|
|
9036
9572
|
* @brief 调用此方法监听指定事件,事件处理函数只执行一次。
|
|
9037
9573
|
* @param event 表示事件的名称。
|
|
9038
9574
|
* @param callback 表示事件的回调函数。
|
|
9039
9575
|
*/
|
|
9040
9576
|
/** {en}
|
|
9041
|
-
* @brief
|
|
9042
|
-
* @param event The event
|
|
9043
|
-
* @param callback
|
|
9577
|
+
* @brief Call this method to listen for the specified event. The event handler is executed only once.
|
|
9578
|
+
* @param event The name representing the event.
|
|
9579
|
+
* @param callback Callback functions representing events.
|
|
9044
9580
|
*/
|
|
9045
9581
|
once(event: string, callback: (data?: any) => any): void;
|
|
9046
9582
|
/** {zh}
|
|
@@ -9166,10 +9702,14 @@ declare namespace live {
|
|
|
9166
9702
|
ignorePaused?: boolean;
|
|
9167
9703
|
}): void;
|
|
9168
9704
|
/** {zh}
|
|
9169
|
-
* @brief
|
|
9170
|
-
* @param type
|
|
9705
|
+
* @brief 判断浏览器是否支持播放格式。
|
|
9706
|
+
* @param type 播放格式。
|
|
9171
9707
|
* @returns
|
|
9172
9708
|
*/
|
|
9709
|
+
/** {en}
|
|
9710
|
+
* @brief Determine whether the browser supports the playback format.
|
|
9711
|
+
* @param type The playback format.
|
|
9712
|
+
*/
|
|
9173
9713
|
canPlayType(type: string): boolean;
|
|
9174
9714
|
/** {zh}
|
|
9175
9715
|
* @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
|
|
@@ -9249,7 +9789,7 @@ declare namespace live {
|
|
|
9249
9789
|
unRegisterPlugin(plugin: any): void;
|
|
9250
9790
|
/** {zh}
|
|
9251
9791
|
* @brief 调用此接口显示指定插件图标。
|
|
9252
|
-
* @param pluginNames
|
|
9792
|
+
* @param pluginNames 插件名称。
|
|
9253
9793
|
*/
|
|
9254
9794
|
/** {en}
|
|
9255
9795
|
* @brief Displays the icon of a specified plugin.
|
|
@@ -9258,7 +9798,7 @@ declare namespace live {
|
|
|
9258
9798
|
showIcon(pluginNames: string[]): void;
|
|
9259
9799
|
/** {zh}
|
|
9260
9800
|
* @brief 调用此接口隐藏指定插件图标。
|
|
9261
|
-
* @param pluginNames
|
|
9801
|
+
* @param pluginNames 插件名称。
|
|
9262
9802
|
*/
|
|
9263
9803
|
/** {en}
|
|
9264
9804
|
* @brief Hides the icon of a specified plugin.
|
|
@@ -9386,22 +9926,22 @@ declare namespace live {
|
|
|
9386
9926
|
* @detail api
|
|
9387
9927
|
* @brief 当前浏览器是否支持播放编码格式。
|
|
9388
9928
|
* @param codec 编码格式。
|
|
9389
|
-
* `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
|
|
9390
|
-
* `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
9929
|
+
* - `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends。
|
|
9930
|
+
* - `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
9391
9931
|
* @returns
|
|
9392
9932
|
*/
|
|
9393
9933
|
/** {en}
|
|
9394
9934
|
* @detail api
|
|
9395
9935
|
* @brief Checkes whether the current browser supports the specified encoding format.
|
|
9396
9936
|
* @param codec The encoding format.
|
|
9397
|
-
* `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
|
|
9398
|
-
* `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
|
|
9937
|
+
* - `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
|
|
9938
|
+
* - `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
|
|
9399
9939
|
* @returns
|
|
9400
9940
|
*/
|
|
9401
9941
|
function isMseSupported(codec?: string): boolean;
|
|
9402
9942
|
/** {zh}
|
|
9403
9943
|
* @detail api
|
|
9404
|
-
* @brief
|
|
9944
|
+
* @brief 当前浏览器是否支持软解。
|
|
9405
9945
|
* @returns
|
|
9406
9946
|
*/
|
|
9407
9947
|
/** {en}
|
|
@@ -10044,20 +10584,16 @@ declare namespace live {
|
|
|
10044
10584
|
interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
10045
10585
|
/** {zh}
|
|
10046
10586
|
* @brief 为播放器设置 RTM 拉流配置。
|
|
10047
|
-
* @default -
|
|
10048
10587
|
*/
|
|
10049
10588
|
/** {en}
|
|
10050
10589
|
* @brief Configurations for playing an RTM stream.
|
|
10051
|
-
* @default -
|
|
10052
10590
|
*/
|
|
10053
10591
|
rtm?: Rtm;
|
|
10054
10592
|
/** {zh}
|
|
10055
10593
|
* @brief 为播放器设置 FLV 拉流配置。FLV 格式流相关配置仅适用于支持 MSE 播放的 PC 端浏览器和安卓端浏览器。
|
|
10056
|
-
* @default -
|
|
10057
10594
|
*/
|
|
10058
10595
|
/** {en}
|
|
10059
10596
|
* @brief Configurations for playing an FLV stream. You can only play FLV streams with web browsers on PC and Android devices, and the browsers need to support Media Source Extensions (MSE) playback.
|
|
10060
|
-
* @default -
|
|
10061
10597
|
*/
|
|
10062
10598
|
flv?: Flv;
|
|
10063
10599
|
/** {zh}
|
|
@@ -10075,29 +10611,30 @@ declare namespace live {
|
|
|
10075
10611
|
hls?: Hls;
|
|
10076
10612
|
/** {zh}
|
|
10077
10613
|
* @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
|
|
10078
|
-
* @default -
|
|
10079
10614
|
*/
|
|
10080
10615
|
/** {en}
|
|
10081
10616
|
* @brief Configures the information panel for the player, including options to show/hide the panel and the time interval between each information update. The panel supports displaying information for HLS and FLV addresses. If you opt for software decoding, additional information related to software decoding will be displayed.
|
|
10082
|
-
* @default -
|
|
10083
10617
|
*/
|
|
10084
10618
|
infoPanel?: InfoPanelConfig;
|
|
10619
|
+
/** {zh}
|
|
10620
|
+
* @hidden
|
|
10621
|
+
*/
|
|
10622
|
+
/** {en}
|
|
10623
|
+
* @brief Configurations for advertising
|
|
10624
|
+
*/
|
|
10625
|
+
ad?: AdConfig;
|
|
10085
10626
|
/** {zh}
|
|
10086
10627
|
* @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
|
|
10087
|
-
* @default -
|
|
10088
10628
|
*/
|
|
10089
10629
|
/** {en}
|
|
10090
10630
|
* @brief Configurations for time shifting.
|
|
10091
|
-
* @default -
|
|
10092
10631
|
*/
|
|
10093
10632
|
timeShift?: TimeShiftConfig;
|
|
10094
10633
|
/** {zh}
|
|
10095
10634
|
* @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
|
|
10096
|
-
* @default -
|
|
10097
10635
|
*/
|
|
10098
10636
|
/** {en}
|
|
10099
10637
|
* @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
|
|
10100
|
-
* @default -
|
|
10101
10638
|
*/
|
|
10102
10639
|
logger?: LoggerConfig;
|
|
10103
10640
|
/** {zh}
|
|
@@ -10117,13 +10654,10 @@ declare namespace live {
|
|
|
10117
10654
|
*/
|
|
10118
10655
|
icons?: any;
|
|
10119
10656
|
/** {zh}
|
|
10120
|
-
* @hidden
|
|
10121
10657
|
* @brief 商业 DRM 播放配置。
|
|
10122
|
-
* @default -
|
|
10123
10658
|
*/
|
|
10124
10659
|
/** {en}
|
|
10125
10660
|
* @brief Digital Rights Management (DRM) configurations.
|
|
10126
|
-
* @default -
|
|
10127
10661
|
*/
|
|
10128
10662
|
drm?: Drm;
|
|
10129
10663
|
}
|
|
@@ -10137,31 +10671,56 @@ declare namespace live {
|
|
|
10137
10671
|
*/
|
|
10138
10672
|
interface Abr {
|
|
10139
10673
|
/** {zh}
|
|
10140
|
-
* @brief 是否开启
|
|
10141
|
-
*
|
|
10142
|
-
*
|
|
10674
|
+
* @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
|
|
10675
|
+
* - true: 开启
|
|
10676
|
+
* - false: 关闭
|
|
10143
10677
|
* @default true
|
|
10144
10678
|
*/
|
|
10679
|
+
/** {en}
|
|
10680
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
10681
|
+
* - true: Enable;
|
|
10682
|
+
* - false: Disable.
|
|
10683
|
+
*/
|
|
10145
10684
|
enable?: boolean;
|
|
10146
10685
|
/** {zh}
|
|
10147
|
-
* @brief 未开启
|
|
10148
|
-
*
|
|
10149
|
-
*
|
|
10686
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
10687
|
+
* - true: 开启;
|
|
10688
|
+
* - false: 关闭。
|
|
10150
10689
|
* @default false
|
|
10690
|
+
* @hidden
|
|
10691
|
+
*/
|
|
10692
|
+
/** {en}
|
|
10693
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
10694
|
+
* - true: Enable;
|
|
10695
|
+
* - false: Disable.
|
|
10696
|
+
* @hidden
|
|
10151
10697
|
*/
|
|
10152
10698
|
downTip?: boolean;
|
|
10153
10699
|
/** {zh}
|
|
10154
|
-
* @brief
|
|
10155
|
-
*
|
|
10156
|
-
*
|
|
10700
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
10701
|
+
* - true: 开启;
|
|
10702
|
+
* - false: 关闭。
|
|
10703
|
+
* @default false
|
|
10704
|
+
*/
|
|
10705
|
+
/** {en}
|
|
10706
|
+
* @brief Whether to start debug mode, default is false.
|
|
10707
|
+
* - true: Enable,
|
|
10708
|
+
* - false: Disable.
|
|
10709
|
+
* @default false
|
|
10157
10710
|
*/
|
|
10158
10711
|
debug?: boolean;
|
|
10159
10712
|
/** {zh}
|
|
10160
|
-
* @brief
|
|
10713
|
+
* @brief 当前拉流地址 URL 对应的码率。
|
|
10714
|
+
*/
|
|
10715
|
+
/** {en}
|
|
10716
|
+
* @brief The bitrate corresponding to the current pull-stream address URL.
|
|
10161
10717
|
*/
|
|
10162
10718
|
bitrate?: number;
|
|
10163
10719
|
/** {zh}
|
|
10164
|
-
* @brief
|
|
10720
|
+
* @brief 自适应码率流信息。
|
|
10721
|
+
*/
|
|
10722
|
+
/** {en}
|
|
10723
|
+
* @brief Adaptive bitrate (ABR) stream information.
|
|
10165
10724
|
*/
|
|
10166
10725
|
urls?: {
|
|
10167
10726
|
[bitrate: number]: string;
|
|
@@ -10170,35 +10729,53 @@ declare namespace live {
|
|
|
10170
10729
|
/** {zh}
|
|
10171
10730
|
* @list option
|
|
10172
10731
|
* @kind property
|
|
10732
|
+
* @hidden
|
|
10173
10733
|
*/
|
|
10174
10734
|
/** {en}
|
|
10175
10735
|
* @list option
|
|
10176
10736
|
* @kind property
|
|
10737
|
+
* @hidden
|
|
10177
10738
|
*/
|
|
10178
10739
|
interface HlsAbr {
|
|
10179
10740
|
/** {zh}
|
|
10180
|
-
* @brief 是否开启
|
|
10181
|
-
*
|
|
10182
|
-
*
|
|
10741
|
+
* @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
|
|
10742
|
+
* - true: 开启;
|
|
10743
|
+
* - false: 关闭。
|
|
10183
10744
|
* @default true
|
|
10184
10745
|
*/
|
|
10746
|
+
/** {en}
|
|
10747
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
10748
|
+
* - true: Enable;
|
|
10749
|
+
* - false: Disable.
|
|
10750
|
+
*/
|
|
10185
10751
|
enable?: boolean;
|
|
10186
10752
|
/** {zh}
|
|
10187
|
-
* @brief 未开启
|
|
10188
|
-
*
|
|
10189
|
-
*
|
|
10753
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
10754
|
+
* - true: 开启;
|
|
10755
|
+
* - false: 关闭。
|
|
10190
10756
|
* @default false
|
|
10191
10757
|
*/
|
|
10758
|
+
/** {en}
|
|
10759
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
10760
|
+
* - true: Enable;
|
|
10761
|
+
* - false: Disable.
|
|
10762
|
+
*/
|
|
10192
10763
|
downTip?: boolean;
|
|
10193
10764
|
/** {zh}
|
|
10194
|
-
* @brief
|
|
10195
|
-
*
|
|
10196
|
-
*
|
|
10765
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
10766
|
+
* - true: 开启;
|
|
10767
|
+
* - false: 关闭。
|
|
10768
|
+
* @default false
|
|
10769
|
+
*/
|
|
10770
|
+
/** {en}
|
|
10771
|
+
* @brief Whether to start debug mode, default is false.
|
|
10772
|
+
* - true: Enable,
|
|
10773
|
+
* - false: Disable.
|
|
10774
|
+
* @default false
|
|
10197
10775
|
*/
|
|
10198
10776
|
debug?: boolean;
|
|
10199
10777
|
}
|
|
10200
10778
|
/** {zh}
|
|
10201
|
-
* @hidden
|
|
10202
10779
|
* @list option
|
|
10203
10780
|
* @kind property
|
|
10204
10781
|
*/
|
|
@@ -10208,15 +10785,14 @@ declare namespace live {
|
|
|
10208
10785
|
*/
|
|
10209
10786
|
interface Drm {
|
|
10210
10787
|
/** {zh}
|
|
10211
|
-
* @brief FairPlay DRM
|
|
10788
|
+
* @brief FairPlay DRM 配置。
|
|
10212
10789
|
*/
|
|
10213
10790
|
/** {en}
|
|
10214
|
-
* @brief FairPlay DRM configurations
|
|
10791
|
+
* @brief FairPlay DRM configurations.
|
|
10215
10792
|
*/
|
|
10216
10793
|
fairplay?: FairplayDrm;
|
|
10217
10794
|
}
|
|
10218
10795
|
/** {zh}
|
|
10219
|
-
* @hidden
|
|
10220
10796
|
* @list option
|
|
10221
10797
|
* @kind property
|
|
10222
10798
|
*/
|
|
@@ -10226,7 +10802,6 @@ declare namespace live {
|
|
|
10226
10802
|
*/
|
|
10227
10803
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
10228
10804
|
/** {zh}
|
|
10229
|
-
* @hidden
|
|
10230
10805
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
10231
10806
|
* @param config
|
|
10232
10807
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -10241,7 +10816,6 @@ declare namespace live {
|
|
|
10241
10816
|
}) => Promise<FairplayDrmConfig>;
|
|
10242
10817
|
}
|
|
10243
10818
|
/** {zh}
|
|
10244
|
-
* @hidden
|
|
10245
10819
|
* @list option
|
|
10246
10820
|
* @kind property
|
|
10247
10821
|
*/
|
|
@@ -10251,17 +10825,17 @@ declare namespace live {
|
|
|
10251
10825
|
*/
|
|
10252
10826
|
interface FairplayDrmConfig {
|
|
10253
10827
|
/** {zh}
|
|
10254
|
-
* @brief
|
|
10828
|
+
* @brief 获取证书的请求地址。
|
|
10255
10829
|
*/
|
|
10256
10830
|
/** {en}
|
|
10257
|
-
* @brief URL used to acquire the FairPlay certificate
|
|
10831
|
+
* @brief URL used to acquire the FairPlay certificate.
|
|
10258
10832
|
*/
|
|
10259
10833
|
serverCertificatePath?: string;
|
|
10260
10834
|
/** {zh}
|
|
10261
|
-
* @brief
|
|
10835
|
+
* @brief 获取内容密钥许可证的请求地址。
|
|
10262
10836
|
*/
|
|
10263
10837
|
/** {en}
|
|
10264
|
-
* @brief URL used to acquire the DRM license
|
|
10838
|
+
* @brief URL used to acquire the DRM license.
|
|
10265
10839
|
*/
|
|
10266
10840
|
serverProcessSPCPath?: string;
|
|
10267
10841
|
}
|
|
@@ -10310,6 +10884,76 @@ declare namespace live {
|
|
|
10310
10884
|
*/
|
|
10311
10885
|
position?: string;
|
|
10312
10886
|
}
|
|
10887
|
+
/** {zh}
|
|
10888
|
+
* @hidden
|
|
10889
|
+
*/
|
|
10890
|
+
/** {en}
|
|
10891
|
+
* @list option
|
|
10892
|
+
* @kind property
|
|
10893
|
+
* @brief Advertising schedule for a single ad break
|
|
10894
|
+
*/
|
|
10895
|
+
interface AdRule {
|
|
10896
|
+
/** {en}
|
|
10897
|
+
* @brief When to play the configured ad tag
|
|
10898
|
+
* - `pre`: Ad plays as a preroll
|
|
10899
|
+
* - `post`: Ad plays as a postroll
|
|
10900
|
+
* - (timecode): Ad plays at a specific time, in HH:MM:SS or HH:MM:SS.sss format
|
|
10901
|
+
*/
|
|
10902
|
+
offset: string;
|
|
10903
|
+
/** {en}
|
|
10904
|
+
* @brief URL of the ad tag for IMA plugins, must be a VAST xml
|
|
10905
|
+
*/
|
|
10906
|
+
tag: string;
|
|
10907
|
+
}
|
|
10908
|
+
/** {zh}
|
|
10909
|
+
* @hidden
|
|
10910
|
+
*/
|
|
10911
|
+
/** {en}
|
|
10912
|
+
* @list option
|
|
10913
|
+
* @kind property
|
|
10914
|
+
* @brief Configurations for Google IMA SDK
|
|
10915
|
+
*/
|
|
10916
|
+
interface ImaConfig {
|
|
10917
|
+
/** {en}
|
|
10918
|
+
* @brief URL of the ad tag for IMA plugins
|
|
10919
|
+
*/
|
|
10920
|
+
adTagUrl?: string;
|
|
10921
|
+
/** {en}
|
|
10922
|
+
* @brief URL of the ad tag for IMA plugins when enableSCTE35 is `true`, must be a VAST xml
|
|
10923
|
+
*/
|
|
10924
|
+
adTagUrlForSCTE35?: string;
|
|
10925
|
+
/** {en}
|
|
10926
|
+
* @brief The entire advertising schedule, containing multiple ad breaks
|
|
10927
|
+
*/
|
|
10928
|
+
schedule?: AdRule[];
|
|
10929
|
+
}
|
|
10930
|
+
/** {zh}
|
|
10931
|
+
* @hidden
|
|
10932
|
+
*/
|
|
10933
|
+
/** {en}
|
|
10934
|
+
* @list option
|
|
10935
|
+
* @kind property
|
|
10936
|
+
* @brief Configurations for advertising
|
|
10937
|
+
*/
|
|
10938
|
+
interface AdConfig {
|
|
10939
|
+
/** {en}
|
|
10940
|
+
* @brief Ad client that will be used to display advertisements
|
|
10941
|
+
* - `google-ima`:Use the Google IMA SDK
|
|
10942
|
+
*/
|
|
10943
|
+
adType: "google-ima";
|
|
10944
|
+
/** {en}
|
|
10945
|
+
* @brief Property enabling SCTE-35 tag in hls manifest
|
|
10946
|
+
* - false: SCTE-35 disabled
|
|
10947
|
+
* - true: SCTE-35 enabled
|
|
10948
|
+
* @default false
|
|
10949
|
+
*/
|
|
10950
|
+
enableSCTE35?: boolean;
|
|
10951
|
+
/** {en}
|
|
10952
|
+
* @brief Configurations for Google IMA SDK
|
|
10953
|
+
* @listtip Required when adType is `google-ima`
|
|
10954
|
+
*/
|
|
10955
|
+
ima?: ImaConfig;
|
|
10956
|
+
}
|
|
10313
10957
|
/** {zh}
|
|
10314
10958
|
* @list option
|
|
10315
10959
|
* @kind property
|
|
@@ -10385,9 +11029,12 @@ declare namespace live {
|
|
|
10385
11029
|
*/
|
|
10386
11030
|
enableRTMAutoTranscode?: boolean;
|
|
10387
11031
|
/** {zh}
|
|
10388
|
-
* @brief
|
|
11032
|
+
* @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
|
|
10389
11033
|
* @default 1000
|
|
10390
11034
|
*/
|
|
11035
|
+
/** {en}
|
|
11036
|
+
* @brief Specify the recent time length for network evaluation in milliseconds. The default is 1000, which means evaluating the network conditions over the last 1000 milliseconds.
|
|
11037
|
+
*/
|
|
10391
11038
|
networkEvaluateInterval?: number;
|
|
10392
11039
|
}
|
|
10393
11040
|
/** {zh}
|
|
@@ -10440,28 +11087,55 @@ declare namespace live {
|
|
|
10440
11087
|
*/
|
|
10441
11088
|
enableLowLatency?: boolean;
|
|
10442
11089
|
/** {zh}
|
|
10443
|
-
* @brief
|
|
10444
|
-
* @default -
|
|
11090
|
+
* @brief 低延时的详细配置。
|
|
10445
11091
|
*/
|
|
10446
11092
|
/** {en}
|
|
10447
|
-
* @brief
|
|
10448
|
-
* @default -
|
|
11093
|
+
* @brief Detailed configuration for low latency.
|
|
10449
11094
|
*/
|
|
10450
11095
|
lowLatency?: LowLatency;
|
|
10451
11096
|
/** {zh}
|
|
10452
|
-
* @brief 为播放器设置 FLV
|
|
10453
|
-
|
|
11097
|
+
* @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
|
|
11098
|
+
*/
|
|
11099
|
+
/** {en}
|
|
11100
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
|
|
10454
11101
|
*/
|
|
10455
11102
|
abr?: Abr;
|
|
10456
11103
|
/** {zh}
|
|
10457
11104
|
* @hidden
|
|
10458
11105
|
*/
|
|
11106
|
+
/** {en}
|
|
11107
|
+
* @hidden
|
|
11108
|
+
*/
|
|
10459
11109
|
mseLowLatency?: boolean;
|
|
10460
11110
|
/** {zh}
|
|
10461
|
-
* @brief
|
|
10462
|
-
* @default
|
|
11111
|
+
* @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
|
|
11112
|
+
* @default 5000
|
|
11113
|
+
*/
|
|
11114
|
+
/** {en}
|
|
11115
|
+
* @brief Set the maximum duration for no data return in milliseconds. The default value is 5. If this duration is exceeded, it will be considered a stream interruption and trigger an ended event.
|
|
10463
11116
|
*/
|
|
10464
11117
|
maxReaderInterval?: number;
|
|
11118
|
+
/** {zh}
|
|
11119
|
+
* @brief
|
|
11120
|
+
* 直播暂停时的断流等待时间,单位为秒,默认值为 0,表示直播暂停时即断流。
|
|
11121
|
+
* @default 0
|
|
11122
|
+
*/
|
|
11123
|
+
/** {en}
|
|
11124
|
+
* @brief The waiting time for disconnection during live streaming suspension, measured in seconds. The default value is 0, indicating immediate disconnection when live streaming is suspended.
|
|
11125
|
+
* @default 0
|
|
11126
|
+
*/
|
|
11127
|
+
disconnectTime?: number;
|
|
11128
|
+
/** {zh}
|
|
11129
|
+
* @brief 断流后重新拉流是否无缝,无缝拉流时重新拉流不会出现黑帧。
|
|
11130
|
+
* - `true`:是;
|
|
11131
|
+
* - `false`:否。
|
|
11132
|
+
* @default false
|
|
11133
|
+
*/
|
|
11134
|
+
/** {en}
|
|
11135
|
+
* @brief Whether re-pulling the stream after disconnection is seamless. When seamless stream pulling, there will be no black frames during re-pulling. - `true`: Yes; - `false`: No.
|
|
11136
|
+
* @default false
|
|
11137
|
+
*/
|
|
11138
|
+
seamlesslyReload?: boolean;
|
|
10465
11139
|
}
|
|
10466
11140
|
/** {zh}
|
|
10467
11141
|
* @list option
|
|
@@ -10480,15 +11154,15 @@ declare namespace live {
|
|
|
10480
11154
|
*/
|
|
10481
11155
|
abrPts?: string | number;
|
|
10482
11156
|
/** {zh}
|
|
10483
|
-
* @brief FLV
|
|
10484
|
-
*
|
|
10485
|
-
*
|
|
11157
|
+
* @brief FLV 低延时模式下,是否开启倍速追帧。
|
|
11158
|
+
* - true:开启;
|
|
11159
|
+
* - false:关闭。
|
|
10486
11160
|
* @default true
|
|
10487
11161
|
*/
|
|
10488
11162
|
/** {en}
|
|
10489
|
-
* @brief
|
|
10490
|
-
*
|
|
10491
|
-
*
|
|
11163
|
+
* @brief Whether to enable speed-up frame chasing in FLV low latency mode.
|
|
11164
|
+
* - true: enabled;
|
|
11165
|
+
* - false: disabled.
|
|
10492
11166
|
* @default true
|
|
10493
11167
|
*/
|
|
10494
11168
|
enableFrameChasing?: boolean;
|
|
@@ -10543,8 +11217,12 @@ declare namespace live {
|
|
|
10543
11217
|
*/
|
|
10544
11218
|
enableMSE?: boolean;
|
|
10545
11219
|
/** {zh}
|
|
10546
|
-
* @brief 为播放器设置 HLS
|
|
10547
|
-
* @
|
|
11220
|
+
* @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
|
|
11221
|
+
* @hidden
|
|
11222
|
+
*/
|
|
11223
|
+
/** {en}
|
|
11224
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
|
|
11225
|
+
* @hidden
|
|
10548
11226
|
*/
|
|
10549
11227
|
abr?: HlsAbr;
|
|
10550
11228
|
/**
|
|
@@ -10552,83 +11230,415 @@ declare namespace live {
|
|
|
10552
11230
|
*/
|
|
10553
11231
|
mseLowLatency?: boolean;
|
|
10554
11232
|
}
|
|
11233
|
+
/** {zh}
|
|
11234
|
+
* @list option
|
|
11235
|
+
* @kind property
|
|
11236
|
+
* @brief 在 RTM 拉流场景下,获取到的网络情况。
|
|
11237
|
+
*/
|
|
11238
|
+
/** {en}
|
|
11239
|
+
* @list option
|
|
11240
|
+
* @kind property
|
|
11241
|
+
* @brief Network conditions obtained in the RTM pull stream scenario.
|
|
11242
|
+
*/
|
|
10555
11243
|
interface RTMNetWorkInfo {
|
|
10556
11244
|
/** {zh}
|
|
10557
|
-
* @brief
|
|
11245
|
+
* @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
|
|
11246
|
+
*/
|
|
11247
|
+
/** {en}
|
|
11248
|
+
* @brief The download speed within the latest network evaluation period, in units of bps.
|
|
10558
11249
|
*/
|
|
10559
11250
|
speed?: number;
|
|
10560
11251
|
/** {zh}
|
|
10561
|
-
* @brief
|
|
11252
|
+
* @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
|
|
11253
|
+
*/
|
|
11254
|
+
/** {en}
|
|
11255
|
+
* @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
|
|
10562
11256
|
*/
|
|
10563
11257
|
avgSpeed?: number;
|
|
10564
11258
|
/** {zh}
|
|
10565
|
-
* @brief
|
|
11259
|
+
* @brief 最近一次网络评估周期内的网络丢包率。
|
|
11260
|
+
*/
|
|
11261
|
+
/** {en}
|
|
11262
|
+
* @brief The packet loss rate of the network within the latest network evaluation cycle.
|
|
10566
11263
|
*/
|
|
10567
11264
|
lostRate?: number;
|
|
10568
11265
|
/** {zh}
|
|
10569
|
-
* @brief
|
|
11266
|
+
* @brief 最近 5 次网络评估周期内的网络丢包率平均值。
|
|
11267
|
+
*/
|
|
11268
|
+
/** {en}
|
|
11269
|
+
* @brief The average network packet loss rate within the recent 5 network evaluation cycles.
|
|
10570
11270
|
*/
|
|
10571
11271
|
avgLostRate?: number;
|
|
10572
11272
|
}
|
|
10573
11273
|
/** {zh}
|
|
10574
|
-
* @
|
|
11274
|
+
* @list option
|
|
11275
|
+
* @kind property
|
|
11276
|
+
* @brief RTM 直播流播放信息。
|
|
11277
|
+
*/
|
|
11278
|
+
/** {en}
|
|
11279
|
+
* @list option
|
|
11280
|
+
* @kind property
|
|
11281
|
+
* @brief RTM live stream information.
|
|
10575
11282
|
*/
|
|
10576
11283
|
interface StatsSnapShoot {
|
|
11284
|
+
/** {en}
|
|
11285
|
+
* @brief Video information.
|
|
11286
|
+
*/
|
|
11287
|
+
/** {zh}
|
|
11288
|
+
* @brief 视频信息。
|
|
11289
|
+
*/
|
|
10577
11290
|
video?: {
|
|
11291
|
+
/** {zh}
|
|
11292
|
+
* @hidden
|
|
11293
|
+
*/
|
|
11294
|
+
/** {en}
|
|
11295
|
+
* @hidden
|
|
11296
|
+
*/
|
|
10578
11297
|
codec: string;
|
|
11298
|
+
/** {zh}
|
|
11299
|
+
* @hidden
|
|
11300
|
+
*/
|
|
11301
|
+
/** {en}
|
|
11302
|
+
* @hidden
|
|
11303
|
+
*/
|
|
10579
11304
|
payloadType: string;
|
|
11305
|
+
/** {zh}
|
|
11306
|
+
* @hidden
|
|
11307
|
+
*/
|
|
11308
|
+
/** {en}
|
|
11309
|
+
* @hidden
|
|
11310
|
+
*/
|
|
10580
11311
|
sdpFmtpLine: string;
|
|
11312
|
+
/** {zh}
|
|
11313
|
+
* @hidden
|
|
11314
|
+
*/
|
|
11315
|
+
/** {en}
|
|
11316
|
+
* @hidden
|
|
11317
|
+
*/
|
|
10581
11318
|
bytesReceived: number;
|
|
11319
|
+
/** {zh}
|
|
11320
|
+
* @hidden
|
|
11321
|
+
*/
|
|
11322
|
+
/** {en}
|
|
11323
|
+
* @hidden
|
|
11324
|
+
*/
|
|
10582
11325
|
firCount: number;
|
|
11326
|
+
/** {zh}
|
|
11327
|
+
* @hidden
|
|
11328
|
+
*/
|
|
11329
|
+
/** {en}
|
|
11330
|
+
* @hidden
|
|
11331
|
+
*/
|
|
10583
11332
|
pliCount: number;
|
|
11333
|
+
/** {zh}
|
|
11334
|
+
* @brief 视频高度
|
|
11335
|
+
*/
|
|
11336
|
+
/** {en}
|
|
11337
|
+
* @brief 视频高度
|
|
11338
|
+
*/
|
|
10584
11339
|
frameHeight: number;
|
|
11340
|
+
/** {zh}
|
|
11341
|
+
* @brief 视频宽度
|
|
11342
|
+
*/
|
|
11343
|
+
/** {en}
|
|
11344
|
+
* @brief 视频宽度
|
|
11345
|
+
*/
|
|
10585
11346
|
frameWidth: number;
|
|
11347
|
+
/** {zh}
|
|
11348
|
+
* @hidden
|
|
11349
|
+
*/
|
|
11350
|
+
/** {en}
|
|
11351
|
+
* @hidden
|
|
11352
|
+
*/
|
|
10586
11353
|
framesDecoded: number;
|
|
11354
|
+
/** {zh}
|
|
11355
|
+
* @hidden
|
|
11356
|
+
*/
|
|
11357
|
+
/** {en}
|
|
11358
|
+
* @hidden
|
|
11359
|
+
*/
|
|
10587
11360
|
framesDropped: number;
|
|
11361
|
+
/** {zh}
|
|
11362
|
+
* @brief 视频帧率
|
|
11363
|
+
*/
|
|
11364
|
+
/** {en}
|
|
11365
|
+
* @brief 视频帧率
|
|
11366
|
+
*/
|
|
10588
11367
|
framesPerSecond: number;
|
|
11368
|
+
/** {zh}
|
|
11369
|
+
* @hidden
|
|
11370
|
+
*/
|
|
11371
|
+
/** {en}
|
|
11372
|
+
* @hidden
|
|
11373
|
+
*/
|
|
10589
11374
|
framesReceived: number;
|
|
11375
|
+
/** {zh}
|
|
11376
|
+
* @hidden
|
|
11377
|
+
*/
|
|
11378
|
+
/** {en}
|
|
11379
|
+
* @hidden
|
|
11380
|
+
*/
|
|
10590
11381
|
jitter: number;
|
|
11382
|
+
/** {zh}
|
|
11383
|
+
* @hidden
|
|
11384
|
+
*/
|
|
11385
|
+
/** {en}
|
|
11386
|
+
* @hidden
|
|
11387
|
+
*/
|
|
10591
11388
|
jitterBufferDelay: number;
|
|
11389
|
+
/** {zh}
|
|
11390
|
+
* @hidden
|
|
11391
|
+
*/
|
|
11392
|
+
/** {en}
|
|
11393
|
+
* @hidden
|
|
11394
|
+
*/
|
|
10592
11395
|
keyFramesDecoded: number;
|
|
11396
|
+
/** {zh}
|
|
11397
|
+
* @hidden
|
|
11398
|
+
*/
|
|
11399
|
+
/** {en}
|
|
11400
|
+
* @hidden
|
|
11401
|
+
*/
|
|
10593
11402
|
nackCount: number;
|
|
11403
|
+
/** {zh}
|
|
11404
|
+
* @brief 视频丢包总数
|
|
11405
|
+
*/
|
|
11406
|
+
/** {en}
|
|
11407
|
+
* @brief 视频丢包总数
|
|
11408
|
+
*/
|
|
10594
11409
|
packetsLost: number;
|
|
11410
|
+
/** {zh}
|
|
11411
|
+
* @brief 视频收包总数
|
|
11412
|
+
*/
|
|
11413
|
+
/** {en}
|
|
11414
|
+
* @brief 视频收包总数
|
|
11415
|
+
*/
|
|
10595
11416
|
packetsReceived: number;
|
|
10596
11417
|
};
|
|
11418
|
+
/** {en}
|
|
11419
|
+
* @brief Audio information.
|
|
11420
|
+
*/
|
|
11421
|
+
/** {zh}
|
|
11422
|
+
* @brief 音频信息。
|
|
11423
|
+
*/
|
|
10597
11424
|
audio?: {
|
|
11425
|
+
/** {zh}
|
|
11426
|
+
* @hidden
|
|
11427
|
+
*/
|
|
11428
|
+
/** {en}
|
|
11429
|
+
* @hidden
|
|
11430
|
+
*/
|
|
10598
11431
|
codec: string;
|
|
11432
|
+
/** {zh}
|
|
11433
|
+
* @hidden
|
|
11434
|
+
*/
|
|
11435
|
+
/** {en}
|
|
11436
|
+
* @hidden
|
|
11437
|
+
*/
|
|
10599
11438
|
payloadType: string;
|
|
11439
|
+
/** {zh}
|
|
11440
|
+
* @hidden
|
|
11441
|
+
*/
|
|
11442
|
+
/** {en}
|
|
11443
|
+
* @hidden
|
|
11444
|
+
*/
|
|
10600
11445
|
sdpFmtpLine: string;
|
|
11446
|
+
/** {zh}
|
|
11447
|
+
* @hidden
|
|
11448
|
+
*/
|
|
11449
|
+
/** {en}
|
|
11450
|
+
* @hidden
|
|
11451
|
+
*/
|
|
10601
11452
|
audioLevel: number;
|
|
11453
|
+
/** {zh}
|
|
11454
|
+
* @hidden
|
|
11455
|
+
*/
|
|
11456
|
+
/** {en}
|
|
11457
|
+
* @hidden
|
|
11458
|
+
*/
|
|
10602
11459
|
bytesReceived: number;
|
|
11460
|
+
/** {zh}
|
|
11461
|
+
* @hidden
|
|
11462
|
+
*/
|
|
11463
|
+
/** {en}
|
|
11464
|
+
* @hidden
|
|
11465
|
+
*/
|
|
10603
11466
|
jitter: number;
|
|
11467
|
+
/** {zh}
|
|
11468
|
+
* @hidden
|
|
11469
|
+
*/
|
|
11470
|
+
/** {en}
|
|
11471
|
+
* @hidden
|
|
11472
|
+
*/
|
|
10604
11473
|
jitterBufferDelay: number;
|
|
11474
|
+
/** {zh}
|
|
11475
|
+
* @brief 音频丢包总数
|
|
11476
|
+
*/
|
|
11477
|
+
/** {en}
|
|
11478
|
+
* @brief 音频丢包总数
|
|
11479
|
+
*/
|
|
10605
11480
|
packetsLost: number;
|
|
11481
|
+
/** {zh}
|
|
11482
|
+
* @brief 音频收包总数
|
|
11483
|
+
*/
|
|
11484
|
+
/** {en}
|
|
11485
|
+
* @brief 音频收包总数
|
|
11486
|
+
*/
|
|
10606
11487
|
packetsReceived: number;
|
|
11488
|
+
/** {zh}
|
|
11489
|
+
* @hidden
|
|
11490
|
+
*/
|
|
11491
|
+
/** {en}
|
|
11492
|
+
* @hidden
|
|
11493
|
+
*/
|
|
10607
11494
|
totalSamplesDuration: number;
|
|
11495
|
+
/** {zh}
|
|
11496
|
+
* @hidden
|
|
11497
|
+
*/
|
|
11498
|
+
/** {en}
|
|
11499
|
+
* @hidden
|
|
11500
|
+
*/
|
|
10608
11501
|
totalSamplesReceived: number;
|
|
10609
11502
|
};
|
|
10610
11503
|
}
|
|
10611
11504
|
/** {zh}
|
|
10612
|
-
* @
|
|
11505
|
+
* @list option
|
|
11506
|
+
* @kind property
|
|
11507
|
+
* @brief FLV 直播流播放信息。
|
|
11508
|
+
*/
|
|
11509
|
+
/** {en}
|
|
11510
|
+
* @list option
|
|
11511
|
+
* @kind property
|
|
11512
|
+
* @brief FLV live stream information.
|
|
10613
11513
|
*/
|
|
10614
11514
|
interface FlvStats {
|
|
11515
|
+
/** {zh}
|
|
11516
|
+
* @brief 音频格式。
|
|
11517
|
+
* @hidden
|
|
11518
|
+
*/
|
|
11519
|
+
/** {en}
|
|
11520
|
+
* @brief Audio format.
|
|
11521
|
+
* @hidden
|
|
11522
|
+
*/
|
|
10615
11523
|
audioCodec: string;
|
|
11524
|
+
/** {zh}
|
|
11525
|
+
* @brief 平均下载速度。
|
|
11526
|
+
*/
|
|
11527
|
+
/** {en}
|
|
11528
|
+
* @brief Average download speed.
|
|
11529
|
+
*/
|
|
10616
11530
|
avgSpeed: number;
|
|
11531
|
+
/** {zh}
|
|
11532
|
+
* @brief 码率。
|
|
11533
|
+
*/
|
|
11534
|
+
/** {en}
|
|
11535
|
+
* @brief bitrate.
|
|
11536
|
+
*/
|
|
10617
11537
|
bitrate: number;
|
|
11538
|
+
/** {zh}
|
|
11539
|
+
* @brief 剩余缓冲时间。
|
|
11540
|
+
*/
|
|
11541
|
+
/** {en}
|
|
11542
|
+
* @brief Remaining buffer time.
|
|
11543
|
+
*/
|
|
10618
11544
|
bufferEnd: number;
|
|
11545
|
+
/** {zh}
|
|
11546
|
+
* @hidden
|
|
11547
|
+
*/
|
|
11548
|
+
/** {en}
|
|
11549
|
+
* @hidden
|
|
11550
|
+
*/
|
|
10619
11551
|
channelCount: number;
|
|
11552
|
+
/** {zh}
|
|
11553
|
+
* @brief 当前播放时间。
|
|
11554
|
+
*/
|
|
11555
|
+
/** {en}
|
|
11556
|
+
* @brief The current playing time.
|
|
11557
|
+
*/
|
|
10620
11558
|
currentTime: number;
|
|
11559
|
+
/** {zh}
|
|
11560
|
+
* @hidden
|
|
11561
|
+
*/
|
|
11562
|
+
/** {en}
|
|
11563
|
+
* @hidden
|
|
11564
|
+
*/
|
|
10621
11565
|
decodeFps: number;
|
|
11566
|
+
/** {zh}
|
|
11567
|
+
* @hidden
|
|
11568
|
+
*/
|
|
11569
|
+
/** {en}
|
|
11570
|
+
* @hidden
|
|
11571
|
+
*/
|
|
10622
11572
|
domain: string;
|
|
11573
|
+
/** {zh}
|
|
11574
|
+
* @brief 当前下载速度。
|
|
11575
|
+
*/
|
|
11576
|
+
/** {en}
|
|
11577
|
+
* @brief Current download speed.
|
|
11578
|
+
*/
|
|
10623
11579
|
downloadSpeed: number;
|
|
11580
|
+
/** {zh}
|
|
11581
|
+
* @brief 编码方式。
|
|
11582
|
+
*/
|
|
11583
|
+
/** {en}
|
|
11584
|
+
* @brief Encoding method.
|
|
11585
|
+
*/
|
|
10624
11586
|
encodeType: string;
|
|
11587
|
+
/** {zh}
|
|
11588
|
+
* @brief 帧率。
|
|
11589
|
+
*/
|
|
11590
|
+
/** {en}
|
|
11591
|
+
* @brief Frame rate.
|
|
11592
|
+
*/
|
|
10625
11593
|
fps: number;
|
|
11594
|
+
/** {zh}
|
|
11595
|
+
* @hidden
|
|
11596
|
+
*/
|
|
11597
|
+
/** {en}
|
|
11598
|
+
* @hidden
|
|
11599
|
+
*/
|
|
10626
11600
|
gop: number;
|
|
11601
|
+
/** {zh}
|
|
11602
|
+
* @brief 视频高度。
|
|
11603
|
+
*/
|
|
11604
|
+
/** {en}
|
|
11605
|
+
* @brief Video height.
|
|
11606
|
+
*/
|
|
10627
11607
|
height: number;
|
|
11608
|
+
/** {zh}
|
|
11609
|
+
* @hidden
|
|
11610
|
+
*/
|
|
11611
|
+
/** {en}
|
|
11612
|
+
* @hidden
|
|
11613
|
+
*/
|
|
10628
11614
|
samplerate: number;
|
|
11615
|
+
/** {zh}
|
|
11616
|
+
* @brief 总共收到的字节数。
|
|
11617
|
+
*/
|
|
11618
|
+
/** {en}
|
|
11619
|
+
* @brief The total number of bytes received.
|
|
11620
|
+
*/
|
|
10629
11621
|
totalReceivedByte: number;
|
|
11622
|
+
/** {zh}
|
|
11623
|
+
* @brief 接收所有字节消耗时长。
|
|
11624
|
+
*/
|
|
11625
|
+
/** {en}
|
|
11626
|
+
* @brief The time consumed for receiving all bytes.
|
|
11627
|
+
*/
|
|
10630
11628
|
totalReceivedCost: number;
|
|
11629
|
+
/** {zh}
|
|
11630
|
+
* @hidden
|
|
11631
|
+
*/
|
|
11632
|
+
/** {en}
|
|
11633
|
+
* @hidden
|
|
11634
|
+
*/
|
|
10631
11635
|
videoCodec: string;
|
|
11636
|
+
/** {zh}
|
|
11637
|
+
* @brief 视频宽度。
|
|
11638
|
+
*/
|
|
11639
|
+
/** {en}
|
|
11640
|
+
* @brief Video wight.
|
|
11641
|
+
*/
|
|
10632
11642
|
width: number;
|
|
10633
11643
|
}
|
|
10634
11644
|
/** {zh}
|
|
@@ -10652,7 +11662,10 @@ declare namespace live {
|
|
|
10652
11662
|
*/
|
|
10653
11663
|
constructor(options: LiveVePlayerOptions);
|
|
10654
11664
|
/** {zh}
|
|
10655
|
-
* @brief
|
|
11665
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
11666
|
+
*/
|
|
11667
|
+
/** {en}
|
|
11668
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
10656
11669
|
*/
|
|
10657
11670
|
get playTime(): number;
|
|
10658
11671
|
/** {zh}
|
|
@@ -10686,49 +11699,80 @@ declare namespace live {
|
|
|
10686
11699
|
*/
|
|
10687
11700
|
closeInfoPanel(): void;
|
|
10688
11701
|
/** {zh}
|
|
10689
|
-
* @brief
|
|
11702
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
11703
|
+
*/
|
|
11704
|
+
/** {en}
|
|
11705
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
10690
11706
|
*/
|
|
10691
11707
|
openAbr(): void;
|
|
10692
11708
|
/** {zh}
|
|
10693
|
-
* @brief
|
|
11709
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
11710
|
+
*/
|
|
11711
|
+
/** {en}
|
|
11712
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
10694
11713
|
*/
|
|
10695
11714
|
closeAbr(): void;
|
|
10696
11715
|
/** {zh}
|
|
10697
|
-
* @brief 调用此方法更新 DRM
|
|
10698
|
-
|
|
11716
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
11717
|
+
*/
|
|
11718
|
+
/** {en}
|
|
11719
|
+
* @brief Use this method to update DRM configuration.
|
|
11720
|
+
* @param config
|
|
10699
11721
|
*/
|
|
10700
11722
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10701
11723
|
/** {zh}
|
|
10702
|
-
* @brief
|
|
10703
|
-
* @param options
|
|
11724
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
11725
|
+
* @param options ABR 的配置。
|
|
10704
11726
|
* @returns
|
|
10705
11727
|
*/
|
|
11728
|
+
/** {en}
|
|
11729
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
11730
|
+
* @param options Configuration of ABR.
|
|
11731
|
+
*/
|
|
10706
11732
|
switchAbr(options: {
|
|
10707
11733
|
/** {zh}
|
|
10708
|
-
* @brief 是否开启
|
|
10709
|
-
*
|
|
10710
|
-
*
|
|
11734
|
+
* @brief 是否开启 ABR 功能。
|
|
11735
|
+
* - true:开启
|
|
11736
|
+
* - false:关闭
|
|
11737
|
+
*/
|
|
11738
|
+
/** {en}
|
|
11739
|
+
* @brief Whether to enable the ABR function.
|
|
11740
|
+
* - true: Enabled ;
|
|
11741
|
+
* - false: Disabled
|
|
11742
|
+
* @default -
|
|
10711
11743
|
*/
|
|
10712
11744
|
enable: boolean;
|
|
10713
11745
|
/** {zh}
|
|
10714
|
-
* @brief
|
|
11746
|
+
* @brief 切换自适应码率直播流对应的码率。
|
|
11747
|
+
*/
|
|
11748
|
+
/** {en}
|
|
11749
|
+
* @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
|
|
10715
11750
|
*/
|
|
10716
11751
|
bitrate: number;
|
|
10717
11752
|
}): void;
|
|
10718
11753
|
/** {zh}
|
|
10719
|
-
* @brief 获取 RTM
|
|
11754
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
10720
11755
|
* @returns
|
|
10721
11756
|
*/
|
|
11757
|
+
/** {en}
|
|
11758
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
11759
|
+
*/
|
|
10722
11760
|
getRTMNetWorkInfo(): RTMNetWorkInfo;
|
|
10723
11761
|
/** {zh}
|
|
10724
|
-
* @brief 获取 RTM
|
|
11762
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
10725
11763
|
* @returns
|
|
10726
11764
|
*/
|
|
11765
|
+
/** {en}
|
|
11766
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
11767
|
+
*/
|
|
10727
11768
|
getRTMStats(): Promise<StatsSnapShoot>;
|
|
10728
11769
|
/** {zh}
|
|
10729
|
-
* @brief 获取 FLV
|
|
11770
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
10730
11771
|
* @returns
|
|
10731
11772
|
*/
|
|
11773
|
+
/** {en}
|
|
11774
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
11775
|
+
*/
|
|
10732
11776
|
getFLVStats(): FlvStats;
|
|
10733
11777
|
}
|
|
10734
11778
|
/** {zh}
|