@volcengine/veplayer 2.5.0-rc.0 → 2.5.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 +80 -83
- package/esm/veplayer.biz.live.development.js +251 -35
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +1249 -323
- package/esm/veplayer.development.js +198 -85
- package/esm/veplayer.live.d.ts +1250 -323
- package/esm/veplayer.live.development.js +198 -85
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +80 -83
- package/esm/veplayer.vod.development.js +100 -56
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +80 -83
- package/umd/veplayer.biz.live.development.js +251 -35
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +1249 -323
- package/umd/veplayer.development.js +198 -85
- package/umd/veplayer.live.d.ts +1250 -323
- package/umd/veplayer.live.development.js +198 -85
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +80 -83
- package/umd/veplayer.vod.development.js +100 -56
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +1249 -323
- package/veplayer.live.d.ts +1250 -323
- package/veplayer.vod.d.ts +80 -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.
|
|
@@ -4172,6 +4167,7 @@ declare namespace strategy {
|
|
|
4172
4167
|
}
|
|
4173
4168
|
type StrategyCreator<T, R extends keyof ModulesMap = any> = (options?: T) => Strategy<T, R>;
|
|
4174
4169
|
const createFlvMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4170
|
+
const createFlvMssStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4175
4171
|
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls>;
|
|
4176
4172
|
const createSoftDecodeH264Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4177
4173
|
const createSoftDecodeH265Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
@@ -4199,22 +4195,22 @@ declare function getStreamType(url: string): "unknown" | "hls" | "flv" | "rtm" |
|
|
|
4199
4195
|
* @detail api
|
|
4200
4196
|
* @brief 当前浏览器是否支持播放编码格式。
|
|
4201
4197
|
* @param codec 编码格式。
|
|
4202
|
-
* `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
|
|
4203
|
-
* `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
4198
|
+
* - `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends。
|
|
4199
|
+
* - `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
4204
4200
|
* @returns
|
|
4205
4201
|
*/
|
|
4206
4202
|
/** {en}
|
|
4207
4203
|
* @detail api
|
|
4208
4204
|
* @brief Checkes whether the current browser supports the specified encoding format.
|
|
4209
4205
|
* @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.
|
|
4206
|
+
* - `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
|
|
4207
|
+
* - `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
|
|
4212
4208
|
* @returns
|
|
4213
4209
|
*/
|
|
4214
4210
|
declare function isMseSupported(codec?: string): boolean;
|
|
4215
4211
|
/** {zh}
|
|
4216
4212
|
* @detail api
|
|
4217
|
-
* @brief
|
|
4213
|
+
* @brief 当前浏览器是否支持软解。
|
|
4218
4214
|
* @returns
|
|
4219
4215
|
*/
|
|
4220
4216
|
/** {en}
|
|
@@ -4223,10 +4219,12 @@ declare function isMseSupported(codec?: string): boolean;
|
|
|
4223
4219
|
* @returns
|
|
4224
4220
|
*/
|
|
4225
4221
|
declare function isSoftDecodeSupported(): Promise<boolean>;
|
|
4222
|
+
declare function isMMSSupported(): boolean;
|
|
4226
4223
|
declare const util: {
|
|
4227
4224
|
getStreamType: typeof getStreamType;
|
|
4228
4225
|
isMseSupported: typeof isMseSupported;
|
|
4229
4226
|
isSoftDecodeSupported: typeof isSoftDecodeSupported;
|
|
4227
|
+
isMMSSupported: typeof isMMSSupported;
|
|
4230
4228
|
appendSearchParams: (url?: string | undefined, searchParams?: Record<string, string> | undefined) => string;
|
|
4231
4229
|
getUrlObject: (url?: string | undefined) => URL | undefined;
|
|
4232
4230
|
createDom(el?: string | undefined, tpl?: string | undefined, attrs?: {
|
|
@@ -4448,14 +4446,15 @@ declare namespace error {
|
|
|
4448
4446
|
}
|
|
4449
4447
|
/** {zh}
|
|
4450
4448
|
* @detail error
|
|
4449
|
+
* @brief 错误等级。
|
|
4451
4450
|
*/
|
|
4452
4451
|
/** {en}
|
|
4453
4452
|
* @detail error
|
|
4453
|
+
* @brief Error level.
|
|
4454
4454
|
*/
|
|
4455
4455
|
enum Level {
|
|
4456
4456
|
/** {zh}
|
|
4457
|
-
* @brief
|
|
4458
|
-
*
|
|
4457
|
+
* @brief 严重。
|
|
4459
4458
|
*/
|
|
4460
4459
|
/** {en}
|
|
4461
4460
|
* @brief Fatal.
|
|
@@ -4463,7 +4462,7 @@ declare namespace error {
|
|
|
4463
4462
|
*/
|
|
4464
4463
|
Fatal = "Fatal",
|
|
4465
4464
|
/** {zh}
|
|
4466
|
-
* @brief
|
|
4465
|
+
* @brief 报错。
|
|
4467
4466
|
*/
|
|
4468
4467
|
/** {en}
|
|
4469
4468
|
* @brief Error.
|
|
@@ -4831,7 +4830,7 @@ declare namespace error {
|
|
|
4831
4830
|
/** {zh}
|
|
4832
4831
|
* @list error
|
|
4833
4832
|
* @detail error
|
|
4834
|
-
* @brief
|
|
4833
|
+
* @brief 错误对象。
|
|
4835
4834
|
* @name VeError
|
|
4836
4835
|
* @id VeError
|
|
4837
4836
|
*/
|
|
@@ -4843,11 +4842,11 @@ declare namespace error {
|
|
|
4843
4842
|
* @id VeError
|
|
4844
4843
|
*/
|
|
4845
4844
|
class VeError<T extends string = TextKey> extends Error {
|
|
4846
|
-
/**
|
|
4845
|
+
/** {zh}
|
|
4847
4846
|
* @brief 错误码。
|
|
4848
4847
|
*/
|
|
4849
4848
|
/** {en}
|
|
4850
|
-
* @brief
|
|
4849
|
+
* @brief Error code.
|
|
4851
4850
|
*/
|
|
4852
4851
|
readonly errorCode: ErrorCode;
|
|
4853
4852
|
/** {zh}
|
|
@@ -5234,20 +5233,16 @@ interface LoggerConfig {
|
|
|
5234
5233
|
interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
5235
5234
|
/** {zh}
|
|
5236
5235
|
* @brief 为播放器设置 RTM 拉流配置。
|
|
5237
|
-
* @default -
|
|
5238
5236
|
*/
|
|
5239
5237
|
/** {en}
|
|
5240
5238
|
* @brief Configurations for playing an RTM stream.
|
|
5241
|
-
* @default -
|
|
5242
5239
|
*/
|
|
5243
5240
|
rtm?: Rtm;
|
|
5244
5241
|
/** {zh}
|
|
5245
5242
|
* @brief 为播放器设置 FLV 拉流配置。FLV 格式流相关配置仅适用于支持 MSE 播放的 PC 端浏览器和安卓端浏览器。
|
|
5246
|
-
* @default -
|
|
5247
5243
|
*/
|
|
5248
5244
|
/** {en}
|
|
5249
5245
|
* @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
5246
|
*/
|
|
5252
5247
|
flv?: Flv;
|
|
5253
5248
|
/** {zh}
|
|
@@ -5265,29 +5260,23 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5265
5260
|
hls?: Hls;
|
|
5266
5261
|
/** {zh}
|
|
5267
5262
|
* @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
|
|
5268
|
-
* @default -
|
|
5269
5263
|
*/
|
|
5270
5264
|
/** {en}
|
|
5271
5265
|
* @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
5266
|
*/
|
|
5274
5267
|
infoPanel?: InfoPanelConfig;
|
|
5275
5268
|
/** {zh}
|
|
5276
5269
|
* @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
|
|
5277
|
-
* @default -
|
|
5278
5270
|
*/
|
|
5279
5271
|
/** {en}
|
|
5280
5272
|
* @brief Configurations for time shifting.
|
|
5281
|
-
* @default -
|
|
5282
5273
|
*/
|
|
5283
5274
|
timeShift?: TimeShiftConfig;
|
|
5284
5275
|
/** {zh}
|
|
5285
5276
|
* @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
|
|
5286
|
-
* @default -
|
|
5287
5277
|
*/
|
|
5288
5278
|
/** {en}
|
|
5289
5279
|
* @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
|
|
5290
|
-
* @default -
|
|
5291
5280
|
*/
|
|
5292
5281
|
logger?: LoggerConfig;
|
|
5293
5282
|
/** {zh}
|
|
@@ -5307,13 +5296,10 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5307
5296
|
*/
|
|
5308
5297
|
icons?: any;
|
|
5309
5298
|
/** {zh}
|
|
5310
|
-
* @hidden
|
|
5311
5299
|
* @brief 商业 DRM 播放配置。
|
|
5312
|
-
* @default -
|
|
5313
5300
|
*/
|
|
5314
5301
|
/** {en}
|
|
5315
5302
|
* @brief Digital Rights Management (DRM) configurations.
|
|
5316
|
-
* @default -
|
|
5317
5303
|
*/
|
|
5318
5304
|
drm?: Drm;
|
|
5319
5305
|
}
|
|
@@ -5327,31 +5313,56 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5327
5313
|
*/
|
|
5328
5314
|
interface Abr {
|
|
5329
5315
|
/** {zh}
|
|
5330
|
-
* @brief 是否开启
|
|
5331
|
-
*
|
|
5332
|
-
*
|
|
5316
|
+
* @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
|
|
5317
|
+
* - true: 开启
|
|
5318
|
+
* - false: 关闭
|
|
5333
5319
|
* @default true
|
|
5334
5320
|
*/
|
|
5321
|
+
/** {en}
|
|
5322
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
5323
|
+
* - true: Enable;
|
|
5324
|
+
* - false: Disable.
|
|
5325
|
+
*/
|
|
5335
5326
|
enable?: boolean;
|
|
5336
5327
|
/** {zh}
|
|
5337
|
-
* @brief 未开启
|
|
5338
|
-
*
|
|
5339
|
-
*
|
|
5328
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
5329
|
+
* - true: 开启;
|
|
5330
|
+
* - false: 关闭。
|
|
5340
5331
|
* @default false
|
|
5332
|
+
* @hidden
|
|
5333
|
+
*/
|
|
5334
|
+
/** {en}
|
|
5335
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
5336
|
+
* - true: Enable;
|
|
5337
|
+
* - false: Disable.
|
|
5338
|
+
* @hidden
|
|
5341
5339
|
*/
|
|
5342
5340
|
downTip?: boolean;
|
|
5343
5341
|
/** {zh}
|
|
5344
|
-
* @brief
|
|
5345
|
-
*
|
|
5346
|
-
*
|
|
5342
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
5343
|
+
* - true: 开启;
|
|
5344
|
+
* - false: 关闭。
|
|
5345
|
+
* @default false
|
|
5346
|
+
*/
|
|
5347
|
+
/** {en}
|
|
5348
|
+
* @brief Whether to start debug mode, default is false.
|
|
5349
|
+
* - true: Enable,
|
|
5350
|
+
* - false: Disable.
|
|
5351
|
+
* @default false
|
|
5347
5352
|
*/
|
|
5348
5353
|
debug?: boolean;
|
|
5349
5354
|
/** {zh}
|
|
5350
|
-
* @brief
|
|
5355
|
+
* @brief 当前拉流地址 URL 对应的码率。
|
|
5356
|
+
*/
|
|
5357
|
+
/** {en}
|
|
5358
|
+
* @brief The bitrate corresponding to the current pull-stream address URL.
|
|
5351
5359
|
*/
|
|
5352
5360
|
bitrate?: number;
|
|
5353
5361
|
/** {zh}
|
|
5354
|
-
* @brief
|
|
5362
|
+
* @brief 自适应码率流信息。
|
|
5363
|
+
*/
|
|
5364
|
+
/** {en}
|
|
5365
|
+
* @brief Adaptive bitrate (ABR) stream information.
|
|
5355
5366
|
*/
|
|
5356
5367
|
urls?: {
|
|
5357
5368
|
[bitrate: number]: string;
|
|
@@ -5360,35 +5371,53 @@ interface Abr {
|
|
|
5360
5371
|
/** {zh}
|
|
5361
5372
|
* @list option
|
|
5362
5373
|
* @kind property
|
|
5374
|
+
* @hidden
|
|
5363
5375
|
*/
|
|
5364
5376
|
/** {en}
|
|
5365
5377
|
* @list option
|
|
5366
5378
|
* @kind property
|
|
5379
|
+
* @hidden
|
|
5367
5380
|
*/
|
|
5368
5381
|
interface HlsAbr {
|
|
5369
5382
|
/** {zh}
|
|
5370
|
-
* @brief 是否开启
|
|
5371
|
-
*
|
|
5372
|
-
*
|
|
5383
|
+
* @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
|
|
5384
|
+
* - true: 开启;
|
|
5385
|
+
* - false: 关闭。
|
|
5373
5386
|
* @default true
|
|
5374
5387
|
*/
|
|
5388
|
+
/** {en}
|
|
5389
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
5390
|
+
* - true: Enable;
|
|
5391
|
+
* - false: Disable.
|
|
5392
|
+
*/
|
|
5375
5393
|
enable?: boolean;
|
|
5376
5394
|
/** {zh}
|
|
5377
|
-
* @brief 未开启
|
|
5378
|
-
*
|
|
5379
|
-
*
|
|
5395
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
5396
|
+
* - true: 开启;
|
|
5397
|
+
* - false: 关闭。
|
|
5380
5398
|
* @default false
|
|
5381
5399
|
*/
|
|
5400
|
+
/** {en}
|
|
5401
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
5402
|
+
* - true: Enable;
|
|
5403
|
+
* - false: Disable.
|
|
5404
|
+
*/
|
|
5382
5405
|
downTip?: boolean;
|
|
5383
5406
|
/** {zh}
|
|
5384
|
-
* @brief
|
|
5385
|
-
*
|
|
5386
|
-
*
|
|
5407
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
5408
|
+
* - true: 开启;
|
|
5409
|
+
* - false: 关闭。
|
|
5410
|
+
* @default false
|
|
5411
|
+
*/
|
|
5412
|
+
/** {en}
|
|
5413
|
+
* @brief Whether to start debug mode, default is false.
|
|
5414
|
+
* - true: Enable,
|
|
5415
|
+
* - false: Disable.
|
|
5416
|
+
* @default false
|
|
5387
5417
|
*/
|
|
5388
5418
|
debug?: boolean;
|
|
5389
5419
|
}
|
|
5390
5420
|
/** {zh}
|
|
5391
|
-
* @hidden
|
|
5392
5421
|
* @list option
|
|
5393
5422
|
* @kind property
|
|
5394
5423
|
*/
|
|
@@ -5398,15 +5427,14 @@ interface HlsAbr {
|
|
|
5398
5427
|
*/
|
|
5399
5428
|
interface Drm {
|
|
5400
5429
|
/** {zh}
|
|
5401
|
-
* @brief FairPlay DRM
|
|
5430
|
+
* @brief FairPlay DRM 配置。
|
|
5402
5431
|
*/
|
|
5403
5432
|
/** {en}
|
|
5404
|
-
* @brief FairPlay DRM configurations
|
|
5433
|
+
* @brief FairPlay DRM configurations.
|
|
5405
5434
|
*/
|
|
5406
5435
|
fairplay?: FairplayDrm;
|
|
5407
5436
|
}
|
|
5408
5437
|
/** {zh}
|
|
5409
|
-
* @hidden
|
|
5410
5438
|
* @list option
|
|
5411
5439
|
* @kind property
|
|
5412
5440
|
*/
|
|
@@ -5416,7 +5444,6 @@ interface Drm {
|
|
|
5416
5444
|
*/
|
|
5417
5445
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
5418
5446
|
/** {zh}
|
|
5419
|
-
* @hidden
|
|
5420
5447
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
5421
5448
|
* @param config
|
|
5422
5449
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -5431,7 +5458,6 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5431
5458
|
}) => Promise<FairplayDrmConfig>;
|
|
5432
5459
|
}
|
|
5433
5460
|
/** {zh}
|
|
5434
|
-
* @hidden
|
|
5435
5461
|
* @list option
|
|
5436
5462
|
* @kind property
|
|
5437
5463
|
*/
|
|
@@ -5441,17 +5467,17 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5441
5467
|
*/
|
|
5442
5468
|
interface FairplayDrmConfig {
|
|
5443
5469
|
/** {zh}
|
|
5444
|
-
* @brief
|
|
5470
|
+
* @brief 获取证书的请求地址。
|
|
5445
5471
|
*/
|
|
5446
5472
|
/** {en}
|
|
5447
|
-
* @brief URL used to acquire the FairPlay certificate
|
|
5473
|
+
* @brief URL used to acquire the FairPlay certificate.
|
|
5448
5474
|
*/
|
|
5449
5475
|
serverCertificatePath?: string;
|
|
5450
5476
|
/** {zh}
|
|
5451
|
-
* @brief
|
|
5477
|
+
* @brief 获取内容密钥许可证的请求地址。
|
|
5452
5478
|
*/
|
|
5453
5479
|
/** {en}
|
|
5454
|
-
* @brief URL used to acquire the DRM license
|
|
5480
|
+
* @brief URL used to acquire the DRM license.
|
|
5455
5481
|
*/
|
|
5456
5482
|
serverProcessSPCPath?: string;
|
|
5457
5483
|
}
|
|
@@ -5575,10 +5601,28 @@ interface Rtm {
|
|
|
5575
5601
|
*/
|
|
5576
5602
|
enableRTMAutoTranscode?: boolean;
|
|
5577
5603
|
/** {zh}
|
|
5578
|
-
* @brief
|
|
5604
|
+
* @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
|
|
5579
5605
|
* @default 1000
|
|
5580
5606
|
*/
|
|
5607
|
+
/** {en}
|
|
5608
|
+
* @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.
|
|
5609
|
+
*/
|
|
5581
5610
|
networkEvaluateInterval?: number;
|
|
5611
|
+
/** {zh}
|
|
5612
|
+
* @brief 断流后重新拉流是否无缝播放。
|
|
5613
|
+
* @default false
|
|
5614
|
+
*/
|
|
5615
|
+
/** {en}
|
|
5616
|
+
* @brief
|
|
5617
|
+
*/
|
|
5618
|
+
seamlesslyReload?: boolean;
|
|
5619
|
+
/** {zh}
|
|
5620
|
+
* @brief 暂停后多久断流,默认不断流。
|
|
5621
|
+
*/
|
|
5622
|
+
/** {en}
|
|
5623
|
+
* @brief
|
|
5624
|
+
*/
|
|
5625
|
+
disconnectTime?: number;
|
|
5582
5626
|
}
|
|
5583
5627
|
/** {zh}
|
|
5584
5628
|
* @list option
|
|
@@ -5630,28 +5674,55 @@ interface Flv {
|
|
|
5630
5674
|
*/
|
|
5631
5675
|
enableLowLatency?: boolean;
|
|
5632
5676
|
/** {zh}
|
|
5633
|
-
* @brief
|
|
5634
|
-
* @default -
|
|
5677
|
+
* @brief 低延时的详细配置。
|
|
5635
5678
|
*/
|
|
5636
5679
|
/** {en}
|
|
5637
|
-
* @brief
|
|
5638
|
-
* @default -
|
|
5680
|
+
* @brief Detailed configuration for low latency.
|
|
5639
5681
|
*/
|
|
5640
5682
|
lowLatency?: LowLatency;
|
|
5641
5683
|
/** {zh}
|
|
5642
|
-
* @brief 为播放器设置 FLV
|
|
5643
|
-
|
|
5684
|
+
* @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
|
|
5685
|
+
*/
|
|
5686
|
+
/** {en}
|
|
5687
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
|
|
5644
5688
|
*/
|
|
5645
5689
|
abr?: Abr;
|
|
5646
5690
|
/** {zh}
|
|
5647
5691
|
* @hidden
|
|
5648
5692
|
*/
|
|
5693
|
+
/** {en}
|
|
5694
|
+
* @hidden
|
|
5695
|
+
*/
|
|
5649
5696
|
mseLowLatency?: boolean;
|
|
5650
5697
|
/** {zh}
|
|
5651
|
-
* @brief
|
|
5652
|
-
* @default
|
|
5698
|
+
* @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
|
|
5699
|
+
* @default 5000
|
|
5700
|
+
*/
|
|
5701
|
+
/** {en}
|
|
5702
|
+
* @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
5703
|
*/
|
|
5654
5704
|
maxReaderInterval?: number;
|
|
5705
|
+
/** {zh}
|
|
5706
|
+
* @brief
|
|
5707
|
+
* 直播暂停时的断流等待时间,单位为秒,默认值为 0,表示直播暂停时即断流。
|
|
5708
|
+
* @default 0
|
|
5709
|
+
*/
|
|
5710
|
+
/** {en}
|
|
5711
|
+
* @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.
|
|
5712
|
+
* @default 0
|
|
5713
|
+
*/
|
|
5714
|
+
disconnectTime?: number;
|
|
5715
|
+
/** {zh}
|
|
5716
|
+
* @brief 断流后重新拉流是否无缝,无缝拉流时重新拉流不会出现黑帧。
|
|
5717
|
+
* - `true`:是;
|
|
5718
|
+
* - `false`:否。
|
|
5719
|
+
* @default false
|
|
5720
|
+
*/
|
|
5721
|
+
/** {en}
|
|
5722
|
+
* @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.
|
|
5723
|
+
* @default false
|
|
5724
|
+
*/
|
|
5725
|
+
seamlesslyReload?: boolean;
|
|
5655
5726
|
}
|
|
5656
5727
|
/** {zh}
|
|
5657
5728
|
* @list option
|
|
@@ -5670,15 +5741,15 @@ interface LowLatency {
|
|
|
5670
5741
|
*/
|
|
5671
5742
|
abrPts?: string | number;
|
|
5672
5743
|
/** {zh}
|
|
5673
|
-
* @brief FLV
|
|
5674
|
-
*
|
|
5675
|
-
*
|
|
5744
|
+
* @brief FLV 低延时模式下,是否开启倍速追帧。
|
|
5745
|
+
* - true:开启;
|
|
5746
|
+
* - false:关闭。
|
|
5676
5747
|
* @default true
|
|
5677
5748
|
*/
|
|
5678
5749
|
/** {en}
|
|
5679
|
-
* @brief
|
|
5680
|
-
*
|
|
5681
|
-
*
|
|
5750
|
+
* @brief Whether to enable speed-up frame chasing in FLV low latency mode.
|
|
5751
|
+
* - true: enabled;
|
|
5752
|
+
* - false: disabled.
|
|
5682
5753
|
* @default true
|
|
5683
5754
|
*/
|
|
5684
5755
|
enableFrameChasing?: boolean;
|
|
@@ -5733,8 +5804,12 @@ interface Hls {
|
|
|
5733
5804
|
*/
|
|
5734
5805
|
enableMSE?: boolean;
|
|
5735
5806
|
/** {zh}
|
|
5736
|
-
* @brief 为播放器设置 HLS
|
|
5737
|
-
* @
|
|
5807
|
+
* @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
|
|
5808
|
+
* @hidden
|
|
5809
|
+
*/
|
|
5810
|
+
/** {en}
|
|
5811
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
|
|
5812
|
+
* @hidden
|
|
5738
5813
|
*/
|
|
5739
5814
|
abr?: HlsAbr;
|
|
5740
5815
|
/**
|
|
@@ -5742,83 +5817,415 @@ interface Hls {
|
|
|
5742
5817
|
*/
|
|
5743
5818
|
mseLowLatency?: boolean;
|
|
5744
5819
|
}
|
|
5820
|
+
/** {zh}
|
|
5821
|
+
* @list option
|
|
5822
|
+
* @kind property
|
|
5823
|
+
* @brief 在 RTM 拉流场景下,获取到的网络情况。
|
|
5824
|
+
*/
|
|
5825
|
+
/** {en}
|
|
5826
|
+
* @list option
|
|
5827
|
+
* @kind property
|
|
5828
|
+
* @brief Network conditions obtained in the RTM pull stream scenario.
|
|
5829
|
+
*/
|
|
5745
5830
|
interface RTMNetWorkInfo {
|
|
5746
5831
|
/** {zh}
|
|
5747
|
-
* @brief
|
|
5832
|
+
* @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
|
|
5833
|
+
*/
|
|
5834
|
+
/** {en}
|
|
5835
|
+
* @brief The download speed within the latest network evaluation period, in units of bps.
|
|
5748
5836
|
*/
|
|
5749
5837
|
speed?: number;
|
|
5750
5838
|
/** {zh}
|
|
5751
|
-
* @brief
|
|
5839
|
+
* @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
|
|
5840
|
+
*/
|
|
5841
|
+
/** {en}
|
|
5842
|
+
* @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
|
|
5752
5843
|
*/
|
|
5753
5844
|
avgSpeed?: number;
|
|
5754
5845
|
/** {zh}
|
|
5755
|
-
* @brief
|
|
5846
|
+
* @brief 最近一次网络评估周期内的网络丢包率。
|
|
5847
|
+
*/
|
|
5848
|
+
/** {en}
|
|
5849
|
+
* @brief The packet loss rate of the network within the latest network evaluation cycle.
|
|
5756
5850
|
*/
|
|
5757
5851
|
lostRate?: number;
|
|
5758
5852
|
/** {zh}
|
|
5759
|
-
* @brief
|
|
5853
|
+
* @brief 最近 5 次网络评估周期内的网络丢包率平均值。
|
|
5854
|
+
*/
|
|
5855
|
+
/** {en}
|
|
5856
|
+
* @brief The average network packet loss rate within the recent 5 network evaluation cycles.
|
|
5760
5857
|
*/
|
|
5761
5858
|
avgLostRate?: number;
|
|
5762
5859
|
}
|
|
5763
5860
|
/** {zh}
|
|
5764
|
-
* @
|
|
5861
|
+
* @list option
|
|
5862
|
+
* @kind property
|
|
5863
|
+
* @brief RTM 直播流播放信息。
|
|
5864
|
+
*/
|
|
5865
|
+
/** {en}
|
|
5866
|
+
* @list option
|
|
5867
|
+
* @kind property
|
|
5868
|
+
* @brief RTM live stream information.
|
|
5765
5869
|
*/
|
|
5766
5870
|
interface StatsSnapShoot {
|
|
5871
|
+
/** {en}
|
|
5872
|
+
* @brief Video information.
|
|
5873
|
+
*/
|
|
5874
|
+
/** {zh}
|
|
5875
|
+
* @brief 视频信息。
|
|
5876
|
+
*/
|
|
5767
5877
|
video?: {
|
|
5878
|
+
/** {zh}
|
|
5879
|
+
* @hidden
|
|
5880
|
+
*/
|
|
5881
|
+
/** {en}
|
|
5882
|
+
* @hidden
|
|
5883
|
+
*/
|
|
5768
5884
|
codec: string;
|
|
5885
|
+
/** {zh}
|
|
5886
|
+
* @hidden
|
|
5887
|
+
*/
|
|
5888
|
+
/** {en}
|
|
5889
|
+
* @hidden
|
|
5890
|
+
*/
|
|
5769
5891
|
payloadType: string;
|
|
5892
|
+
/** {zh}
|
|
5893
|
+
* @hidden
|
|
5894
|
+
*/
|
|
5895
|
+
/** {en}
|
|
5896
|
+
* @hidden
|
|
5897
|
+
*/
|
|
5770
5898
|
sdpFmtpLine: string;
|
|
5899
|
+
/** {zh}
|
|
5900
|
+
* @hidden
|
|
5901
|
+
*/
|
|
5902
|
+
/** {en}
|
|
5903
|
+
* @hidden
|
|
5904
|
+
*/
|
|
5771
5905
|
bytesReceived: number;
|
|
5906
|
+
/** {zh}
|
|
5907
|
+
* @hidden
|
|
5908
|
+
*/
|
|
5909
|
+
/** {en}
|
|
5910
|
+
* @hidden
|
|
5911
|
+
*/
|
|
5772
5912
|
firCount: number;
|
|
5913
|
+
/** {zh}
|
|
5914
|
+
* @hidden
|
|
5915
|
+
*/
|
|
5916
|
+
/** {en}
|
|
5917
|
+
* @hidden
|
|
5918
|
+
*/
|
|
5773
5919
|
pliCount: number;
|
|
5920
|
+
/** {zh}
|
|
5921
|
+
* @brief 视频高度
|
|
5922
|
+
*/
|
|
5923
|
+
/** {en}
|
|
5924
|
+
* @brief 视频高度
|
|
5925
|
+
*/
|
|
5774
5926
|
frameHeight: number;
|
|
5927
|
+
/** {zh}
|
|
5928
|
+
* @brief 视频宽度
|
|
5929
|
+
*/
|
|
5930
|
+
/** {en}
|
|
5931
|
+
* @brief 视频宽度
|
|
5932
|
+
*/
|
|
5775
5933
|
frameWidth: number;
|
|
5934
|
+
/** {zh}
|
|
5935
|
+
* @hidden
|
|
5936
|
+
*/
|
|
5937
|
+
/** {en}
|
|
5938
|
+
* @hidden
|
|
5939
|
+
*/
|
|
5776
5940
|
framesDecoded: number;
|
|
5941
|
+
/** {zh}
|
|
5942
|
+
* @hidden
|
|
5943
|
+
*/
|
|
5944
|
+
/** {en}
|
|
5945
|
+
* @hidden
|
|
5946
|
+
*/
|
|
5777
5947
|
framesDropped: number;
|
|
5948
|
+
/** {zh}
|
|
5949
|
+
* @brief 视频帧率
|
|
5950
|
+
*/
|
|
5951
|
+
/** {en}
|
|
5952
|
+
* @brief 视频帧率
|
|
5953
|
+
*/
|
|
5778
5954
|
framesPerSecond: number;
|
|
5955
|
+
/** {zh}
|
|
5956
|
+
* @hidden
|
|
5957
|
+
*/
|
|
5958
|
+
/** {en}
|
|
5959
|
+
* @hidden
|
|
5960
|
+
*/
|
|
5779
5961
|
framesReceived: number;
|
|
5962
|
+
/** {zh}
|
|
5963
|
+
* @hidden
|
|
5964
|
+
*/
|
|
5965
|
+
/** {en}
|
|
5966
|
+
* @hidden
|
|
5967
|
+
*/
|
|
5780
5968
|
jitter: number;
|
|
5969
|
+
/** {zh}
|
|
5970
|
+
* @hidden
|
|
5971
|
+
*/
|
|
5972
|
+
/** {en}
|
|
5973
|
+
* @hidden
|
|
5974
|
+
*/
|
|
5781
5975
|
jitterBufferDelay: number;
|
|
5976
|
+
/** {zh}
|
|
5977
|
+
* @hidden
|
|
5978
|
+
*/
|
|
5979
|
+
/** {en}
|
|
5980
|
+
* @hidden
|
|
5981
|
+
*/
|
|
5782
5982
|
keyFramesDecoded: number;
|
|
5983
|
+
/** {zh}
|
|
5984
|
+
* @hidden
|
|
5985
|
+
*/
|
|
5986
|
+
/** {en}
|
|
5987
|
+
* @hidden
|
|
5988
|
+
*/
|
|
5783
5989
|
nackCount: number;
|
|
5990
|
+
/** {zh}
|
|
5991
|
+
* @brief 视频丢包总数
|
|
5992
|
+
*/
|
|
5993
|
+
/** {en}
|
|
5994
|
+
* @brief 视频丢包总数
|
|
5995
|
+
*/
|
|
5784
5996
|
packetsLost: number;
|
|
5997
|
+
/** {zh}
|
|
5998
|
+
* @brief 视频收包总数
|
|
5999
|
+
*/
|
|
6000
|
+
/** {en}
|
|
6001
|
+
* @brief 视频收包总数
|
|
6002
|
+
*/
|
|
5785
6003
|
packetsReceived: number;
|
|
5786
6004
|
};
|
|
6005
|
+
/** {en}
|
|
6006
|
+
* @brief Audio information.
|
|
6007
|
+
*/
|
|
6008
|
+
/** {zh}
|
|
6009
|
+
* @brief 音频信息。
|
|
6010
|
+
*/
|
|
5787
6011
|
audio?: {
|
|
6012
|
+
/** {zh}
|
|
6013
|
+
* @hidden
|
|
6014
|
+
*/
|
|
6015
|
+
/** {en}
|
|
6016
|
+
* @hidden
|
|
6017
|
+
*/
|
|
5788
6018
|
codec: string;
|
|
6019
|
+
/** {zh}
|
|
6020
|
+
* @hidden
|
|
6021
|
+
*/
|
|
6022
|
+
/** {en}
|
|
6023
|
+
* @hidden
|
|
6024
|
+
*/
|
|
5789
6025
|
payloadType: string;
|
|
6026
|
+
/** {zh}
|
|
6027
|
+
* @hidden
|
|
6028
|
+
*/
|
|
6029
|
+
/** {en}
|
|
6030
|
+
* @hidden
|
|
6031
|
+
*/
|
|
5790
6032
|
sdpFmtpLine: string;
|
|
6033
|
+
/** {zh}
|
|
6034
|
+
* @hidden
|
|
6035
|
+
*/
|
|
6036
|
+
/** {en}
|
|
6037
|
+
* @hidden
|
|
6038
|
+
*/
|
|
5791
6039
|
audioLevel: number;
|
|
5792
|
-
|
|
6040
|
+
/** {zh}
|
|
6041
|
+
* @hidden
|
|
6042
|
+
*/
|
|
6043
|
+
/** {en}
|
|
6044
|
+
* @hidden
|
|
6045
|
+
*/
|
|
6046
|
+
bytesReceived: number;
|
|
6047
|
+
/** {zh}
|
|
6048
|
+
* @hidden
|
|
6049
|
+
*/
|
|
6050
|
+
/** {en}
|
|
6051
|
+
* @hidden
|
|
6052
|
+
*/
|
|
5793
6053
|
jitter: number;
|
|
6054
|
+
/** {zh}
|
|
6055
|
+
* @hidden
|
|
6056
|
+
*/
|
|
6057
|
+
/** {en}
|
|
6058
|
+
* @hidden
|
|
6059
|
+
*/
|
|
5794
6060
|
jitterBufferDelay: number;
|
|
6061
|
+
/** {zh}
|
|
6062
|
+
* @brief 音频丢包总数
|
|
6063
|
+
*/
|
|
6064
|
+
/** {en}
|
|
6065
|
+
* @brief 音频丢包总数
|
|
6066
|
+
*/
|
|
5795
6067
|
packetsLost: number;
|
|
6068
|
+
/** {zh}
|
|
6069
|
+
* @brief 音频收包总数
|
|
6070
|
+
*/
|
|
6071
|
+
/** {en}
|
|
6072
|
+
* @brief 音频收包总数
|
|
6073
|
+
*/
|
|
5796
6074
|
packetsReceived: number;
|
|
6075
|
+
/** {zh}
|
|
6076
|
+
* @hidden
|
|
6077
|
+
*/
|
|
6078
|
+
/** {en}
|
|
6079
|
+
* @hidden
|
|
6080
|
+
*/
|
|
5797
6081
|
totalSamplesDuration: number;
|
|
6082
|
+
/** {zh}
|
|
6083
|
+
* @hidden
|
|
6084
|
+
*/
|
|
6085
|
+
/** {en}
|
|
6086
|
+
* @hidden
|
|
6087
|
+
*/
|
|
5798
6088
|
totalSamplesReceived: number;
|
|
5799
6089
|
};
|
|
5800
6090
|
}
|
|
5801
6091
|
/** {zh}
|
|
5802
|
-
* @
|
|
6092
|
+
* @list option
|
|
6093
|
+
* @kind property
|
|
6094
|
+
* @brief FLV 直播流播放信息。
|
|
6095
|
+
*/
|
|
6096
|
+
/** {en}
|
|
6097
|
+
* @list option
|
|
6098
|
+
* @kind property
|
|
6099
|
+
* @brief FLV live stream information.
|
|
5803
6100
|
*/
|
|
5804
6101
|
interface FlvStats {
|
|
6102
|
+
/** {zh}
|
|
6103
|
+
* @brief 音频格式。
|
|
6104
|
+
* @hidden
|
|
6105
|
+
*/
|
|
6106
|
+
/** {en}
|
|
6107
|
+
* @brief Audio format.
|
|
6108
|
+
* @hidden
|
|
6109
|
+
*/
|
|
5805
6110
|
audioCodec: string;
|
|
6111
|
+
/** {zh}
|
|
6112
|
+
* @brief 平均下载速度。
|
|
6113
|
+
*/
|
|
6114
|
+
/** {en}
|
|
6115
|
+
* @brief Average download speed.
|
|
6116
|
+
*/
|
|
5806
6117
|
avgSpeed: number;
|
|
6118
|
+
/** {zh}
|
|
6119
|
+
* @brief 码率。
|
|
6120
|
+
*/
|
|
6121
|
+
/** {en}
|
|
6122
|
+
* @brief bitrate.
|
|
6123
|
+
*/
|
|
5807
6124
|
bitrate: number;
|
|
6125
|
+
/** {zh}
|
|
6126
|
+
* @brief 剩余缓冲时间。
|
|
6127
|
+
*/
|
|
6128
|
+
/** {en}
|
|
6129
|
+
* @brief Remaining buffer time.
|
|
6130
|
+
*/
|
|
5808
6131
|
bufferEnd: number;
|
|
6132
|
+
/** {zh}
|
|
6133
|
+
* @hidden
|
|
6134
|
+
*/
|
|
6135
|
+
/** {en}
|
|
6136
|
+
* @hidden
|
|
6137
|
+
*/
|
|
5809
6138
|
channelCount: number;
|
|
6139
|
+
/** {zh}
|
|
6140
|
+
* @brief 当前播放时间。
|
|
6141
|
+
*/
|
|
6142
|
+
/** {en}
|
|
6143
|
+
* @brief The current playing time.
|
|
6144
|
+
*/
|
|
5810
6145
|
currentTime: number;
|
|
6146
|
+
/** {zh}
|
|
6147
|
+
* @hidden
|
|
6148
|
+
*/
|
|
6149
|
+
/** {en}
|
|
6150
|
+
* @hidden
|
|
6151
|
+
*/
|
|
5811
6152
|
decodeFps: number;
|
|
6153
|
+
/** {zh}
|
|
6154
|
+
* @hidden
|
|
6155
|
+
*/
|
|
6156
|
+
/** {en}
|
|
6157
|
+
* @hidden
|
|
6158
|
+
*/
|
|
5812
6159
|
domain: string;
|
|
6160
|
+
/** {zh}
|
|
6161
|
+
* @brief 当前下载速度。
|
|
6162
|
+
*/
|
|
6163
|
+
/** {en}
|
|
6164
|
+
* @brief Current download speed.
|
|
6165
|
+
*/
|
|
5813
6166
|
downloadSpeed: number;
|
|
6167
|
+
/** {zh}
|
|
6168
|
+
* @brief 编码方式。
|
|
6169
|
+
*/
|
|
6170
|
+
/** {en}
|
|
6171
|
+
* @brief Encoding method.
|
|
6172
|
+
*/
|
|
5814
6173
|
encodeType: string;
|
|
6174
|
+
/** {zh}
|
|
6175
|
+
* @brief 帧率。
|
|
6176
|
+
*/
|
|
6177
|
+
/** {en}
|
|
6178
|
+
* @brief Frame rate.
|
|
6179
|
+
*/
|
|
5815
6180
|
fps: number;
|
|
6181
|
+
/** {zh}
|
|
6182
|
+
* @hidden
|
|
6183
|
+
*/
|
|
6184
|
+
/** {en}
|
|
6185
|
+
* @hidden
|
|
6186
|
+
*/
|
|
5816
6187
|
gop: number;
|
|
6188
|
+
/** {zh}
|
|
6189
|
+
* @brief 视频高度。
|
|
6190
|
+
*/
|
|
6191
|
+
/** {en}
|
|
6192
|
+
* @brief Video height.
|
|
6193
|
+
*/
|
|
5817
6194
|
height: number;
|
|
6195
|
+
/** {zh}
|
|
6196
|
+
* @hidden
|
|
6197
|
+
*/
|
|
6198
|
+
/** {en}
|
|
6199
|
+
* @hidden
|
|
6200
|
+
*/
|
|
5818
6201
|
samplerate: number;
|
|
6202
|
+
/** {zh}
|
|
6203
|
+
* @brief 总共收到的字节数。
|
|
6204
|
+
*/
|
|
6205
|
+
/** {en}
|
|
6206
|
+
* @brief The total number of bytes received.
|
|
6207
|
+
*/
|
|
5819
6208
|
totalReceivedByte: number;
|
|
6209
|
+
/** {zh}
|
|
6210
|
+
* @brief 接收所有字节消耗时长。
|
|
6211
|
+
*/
|
|
6212
|
+
/** {en}
|
|
6213
|
+
* @brief The time consumed for receiving all bytes.
|
|
6214
|
+
*/
|
|
5820
6215
|
totalReceivedCost: number;
|
|
6216
|
+
/** {zh}
|
|
6217
|
+
* @hidden
|
|
6218
|
+
*/
|
|
6219
|
+
/** {en}
|
|
6220
|
+
* @hidden
|
|
6221
|
+
*/
|
|
5821
6222
|
videoCodec: string;
|
|
6223
|
+
/** {zh}
|
|
6224
|
+
* @brief 视频宽度。
|
|
6225
|
+
*/
|
|
6226
|
+
/** {en}
|
|
6227
|
+
* @brief Video wight.
|
|
6228
|
+
*/
|
|
5822
6229
|
width: number;
|
|
5823
6230
|
}
|
|
5824
6231
|
/** {zh}
|
|
@@ -5842,7 +6249,10 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5842
6249
|
*/
|
|
5843
6250
|
constructor(options: LiveVePlayerOptions);
|
|
5844
6251
|
/** {zh}
|
|
5845
|
-
* @brief
|
|
6252
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
6253
|
+
*/
|
|
6254
|
+
/** {en}
|
|
6255
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
5846
6256
|
*/
|
|
5847
6257
|
get playTime(): number;
|
|
5848
6258
|
/** {zh}
|
|
@@ -5876,49 +6286,80 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5876
6286
|
*/
|
|
5877
6287
|
closeInfoPanel(): void;
|
|
5878
6288
|
/** {zh}
|
|
5879
|
-
* @brief
|
|
6289
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
6290
|
+
*/
|
|
6291
|
+
/** {en}
|
|
6292
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
5880
6293
|
*/
|
|
5881
6294
|
openAbr(): void;
|
|
5882
6295
|
/** {zh}
|
|
5883
|
-
* @brief
|
|
6296
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
6297
|
+
*/
|
|
6298
|
+
/** {en}
|
|
6299
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
5884
6300
|
*/
|
|
5885
6301
|
closeAbr(): void;
|
|
5886
6302
|
/** {zh}
|
|
5887
|
-
* @brief 调用此方法更新 DRM
|
|
5888
|
-
|
|
6303
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
6304
|
+
*/
|
|
6305
|
+
/** {en}
|
|
6306
|
+
* @brief Use this method to update DRM configuration.
|
|
6307
|
+
* @param config
|
|
5889
6308
|
*/
|
|
5890
6309
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5891
6310
|
/** {zh}
|
|
5892
|
-
* @brief
|
|
5893
|
-
* @param options
|
|
6311
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
6312
|
+
* @param options ABR 的配置。
|
|
5894
6313
|
* @returns
|
|
5895
6314
|
*/
|
|
6315
|
+
/** {en}
|
|
6316
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
6317
|
+
* @param options Configuration of ABR.
|
|
6318
|
+
*/
|
|
5896
6319
|
switchAbr(options: {
|
|
5897
6320
|
/** {zh}
|
|
5898
|
-
* @brief 是否开启
|
|
5899
|
-
*
|
|
5900
|
-
*
|
|
6321
|
+
* @brief 是否开启 ABR 功能。
|
|
6322
|
+
* - true:开启
|
|
6323
|
+
* - false:关闭
|
|
6324
|
+
*/
|
|
6325
|
+
/** {en}
|
|
6326
|
+
* @brief Whether to enable the ABR function.
|
|
6327
|
+
* - true: Enabled ;
|
|
6328
|
+
* - false: Disabled
|
|
6329
|
+
* @default -
|
|
5901
6330
|
*/
|
|
5902
6331
|
enable: boolean;
|
|
5903
6332
|
/** {zh}
|
|
5904
|
-
* @brief
|
|
6333
|
+
* @brief 切换自适应码率直播流对应的码率。
|
|
6334
|
+
*/
|
|
6335
|
+
/** {en}
|
|
6336
|
+
* @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
|
|
5905
6337
|
*/
|
|
5906
6338
|
bitrate: number;
|
|
5907
6339
|
}): void;
|
|
5908
6340
|
/** {zh}
|
|
5909
|
-
* @brief 获取 RTM
|
|
6341
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
5910
6342
|
* @returns
|
|
5911
6343
|
*/
|
|
6344
|
+
/** {en}
|
|
6345
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
6346
|
+
*/
|
|
5912
6347
|
getRTMNetWorkInfo(): RTMNetWorkInfo;
|
|
5913
6348
|
/** {zh}
|
|
5914
|
-
* @brief 获取 RTM
|
|
6349
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
5915
6350
|
* @returns
|
|
5916
6351
|
*/
|
|
6352
|
+
/** {en}
|
|
6353
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
6354
|
+
*/
|
|
5917
6355
|
getRTMStats(): Promise<StatsSnapShoot>;
|
|
5918
6356
|
/** {zh}
|
|
5919
|
-
* @brief 获取 FLV
|
|
6357
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
5920
6358
|
* @returns
|
|
5921
6359
|
*/
|
|
6360
|
+
/** {en}
|
|
6361
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
6362
|
+
*/
|
|
5922
6363
|
getFLVStats(): FlvStats;
|
|
5923
6364
|
}
|
|
5924
6365
|
/** {zh}
|
|
@@ -5976,7 +6417,7 @@ declare function isRTMSupported(): Promise<boolean>;
|
|
|
5976
6417
|
/** {zh}
|
|
5977
6418
|
* @detail api
|
|
5978
6419
|
* @brief 当前浏览器是否支持 H264 RTM 流播放。
|
|
5979
|
-
* @param codec 播放格式,目前只支持 `H264
|
|
6420
|
+
* @param codec 播放格式,目前只支持 `H264`。
|
|
5980
6421
|
* @returns
|
|
5981
6422
|
*/
|
|
5982
6423
|
/** {en}
|
|
@@ -5986,6 +6427,7 @@ declare function isRTMSupported(): Promise<boolean>;
|
|
|
5986
6427
|
* @returns
|
|
5987
6428
|
*/
|
|
5988
6429
|
declare function isRTMSupportCodec(codec?: string): Promise<boolean>;
|
|
6430
|
+
declare function isFLVSupported(): boolean;
|
|
5989
6431
|
declare module MobilePlayerPanelWrapper {
|
|
5990
6432
|
export { MobilePlayerPanel };
|
|
5991
6433
|
}
|
|
@@ -6130,14 +6572,15 @@ declare namespace live {
|
|
|
6130
6572
|
}
|
|
6131
6573
|
/** {zh}
|
|
6132
6574
|
* @detail error
|
|
6575
|
+
* @brief 错误等级。
|
|
6133
6576
|
*/
|
|
6134
6577
|
/** {en}
|
|
6135
6578
|
* @detail error
|
|
6579
|
+
* @brief Error level.
|
|
6136
6580
|
*/
|
|
6137
6581
|
enum Level {
|
|
6138
6582
|
/** {zh}
|
|
6139
|
-
* @brief
|
|
6140
|
-
*
|
|
6583
|
+
* @brief 严重。
|
|
6141
6584
|
*/
|
|
6142
6585
|
/** {en}
|
|
6143
6586
|
* @brief Fatal.
|
|
@@ -6145,7 +6588,7 @@ declare namespace live {
|
|
|
6145
6588
|
*/
|
|
6146
6589
|
Fatal = "Fatal",
|
|
6147
6590
|
/** {zh}
|
|
6148
|
-
* @brief
|
|
6591
|
+
* @brief 报错。
|
|
6149
6592
|
*/
|
|
6150
6593
|
/** {en}
|
|
6151
6594
|
* @brief Error.
|
|
@@ -6513,7 +6956,7 @@ declare namespace live {
|
|
|
6513
6956
|
/** {zh}
|
|
6514
6957
|
* @list error
|
|
6515
6958
|
* @detail error
|
|
6516
|
-
* @brief
|
|
6959
|
+
* @brief 错误对象。
|
|
6517
6960
|
* @name VeError
|
|
6518
6961
|
* @id VeError
|
|
6519
6962
|
*/
|
|
@@ -6525,11 +6968,11 @@ declare namespace live {
|
|
|
6525
6968
|
* @id VeError
|
|
6526
6969
|
*/
|
|
6527
6970
|
class VeError<T extends string = TextKey> extends Error {
|
|
6528
|
-
/**
|
|
6971
|
+
/** {zh}
|
|
6529
6972
|
* @brief 错误码。
|
|
6530
6973
|
*/
|
|
6531
6974
|
/** {en}
|
|
6532
|
-
* @brief
|
|
6975
|
+
* @brief Error code.
|
|
6533
6976
|
*/
|
|
6534
6977
|
readonly errorCode: ErrorCode;
|
|
6535
6978
|
/** {zh}
|
|
@@ -7025,20 +7468,32 @@ declare namespace live {
|
|
|
7025
7468
|
REFRESH_CLICK = "refreshClick",
|
|
7026
7469
|
/** {zh}
|
|
7027
7470
|
* Abr 切换码率
|
|
7471
|
+
* @brief 切换自适应码率流
|
|
7472
|
+
*/
|
|
7473
|
+
/** {en}
|
|
7474
|
+
* @brief Event for switching Adaptive Bitrate (ABR) streams.
|
|
7028
7475
|
*/
|
|
7029
7476
|
ABR_SWITCH_START = "abrSwitchStart",
|
|
7030
7477
|
/** {zh}
|
|
7031
7478
|
* Abr 切换码率成功
|
|
7479
|
+
* @brief 成功切换自适应码率直播流
|
|
7480
|
+
*/
|
|
7481
|
+
/** {en}
|
|
7482
|
+
* @brief Event of successfully switching Adaptive Bitrate (ABR) live stream.
|
|
7032
7483
|
*/
|
|
7033
7484
|
ABR_SWITCH_SUCCESS = "abrSwitchedSuccess",
|
|
7034
7485
|
/** {zh}
|
|
7035
7486
|
* Abr 切换码率失败
|
|
7487
|
+
* @brief 切换自适应码率直播流失败
|
|
7488
|
+
*/
|
|
7489
|
+
/** {en}
|
|
7490
|
+
* @brief Event of failing to switch Adaptive Bitrate (ABR) live stream.
|
|
7036
7491
|
*/
|
|
7037
7492
|
ABR_SWITCH_FAILED = "abrSwitchFailed"
|
|
7038
7493
|
}
|
|
7039
7494
|
/** {zh}
|
|
7040
7495
|
* @detail events
|
|
7041
|
-
* @brief
|
|
7496
|
+
* @brief 事件回调。
|
|
7042
7497
|
* @hiddenDefault
|
|
7043
7498
|
* @example
|
|
7044
7499
|
* ```js
|
|
@@ -7181,6 +7636,8 @@ declare namespace live {
|
|
|
7181
7636
|
/** {en}
|
|
7182
7637
|
* The player has focus.
|
|
7183
7638
|
* @param data Information about the event.
|
|
7639
|
+
* @brief
|
|
7640
|
+
* The player has focus.
|
|
7184
7641
|
*/
|
|
7185
7642
|
[LiveEvents.PLAYER_FOCUS]: (data: {
|
|
7186
7643
|
/** {zh}
|
|
@@ -7568,53 +8025,77 @@ declare namespace live {
|
|
|
7568
8025
|
};
|
|
7569
8026
|
}) => void;
|
|
7570
8027
|
/** {zh}
|
|
7571
|
-
* 时移状态切换。
|
|
8028
|
+
* @brief 时移状态切换。
|
|
7572
8029
|
* @param isTimeShift 是否是时移状态。
|
|
7573
8030
|
*/
|
|
7574
8031
|
/** {en}
|
|
7575
|
-
* The time-shift state changes.
|
|
8032
|
+
* @brief The time-shift state changes.
|
|
7576
8033
|
* @param isTimeShift Whether the live stream is time-shifted.
|
|
7577
8034
|
*/
|
|
7578
8035
|
[LiveEvents.TIME_SHIFT_CHANGE]: (isTimeShift: boolean) => void;
|
|
7579
8036
|
/** {zh}
|
|
7580
|
-
* 点击刷新按钮。
|
|
8037
|
+
* @brief 点击刷新按钮。
|
|
7581
8038
|
*/
|
|
7582
8039
|
/** {en}
|
|
7583
|
-
* The user clicks the Refresh button.
|
|
8040
|
+
* @brief The user clicks the Refresh button.
|
|
7584
8041
|
*/
|
|
7585
8042
|
[LiveEvents.REFRESH_CLICK]: () => void;
|
|
7586
8043
|
/** {zh}
|
|
7587
|
-
*
|
|
8044
|
+
* @brief 切换自适应码率流的事件回调。
|
|
8045
|
+
*/
|
|
8046
|
+
/** {en}
|
|
8047
|
+
* @brief Event callback for switching Adaptive Bitrate (ABR) streams.
|
|
7588
8048
|
*/
|
|
7589
8049
|
[LiveEvents.ABR_SWITCH_START]: (data: {
|
|
7590
8050
|
/** {zh}
|
|
7591
|
-
*
|
|
8051
|
+
* @brief 切换后的码率。
|
|
8052
|
+
*/
|
|
8053
|
+
/** {en}
|
|
8054
|
+
* @brief Bitrate after switching.
|
|
7592
8055
|
*/
|
|
7593
8056
|
bitrate: number;
|
|
7594
8057
|
}) => void;
|
|
7595
8058
|
/** {zh}
|
|
7596
|
-
*
|
|
8059
|
+
* @brief 成功切换自适应码率流的事件回调。
|
|
8060
|
+
*/
|
|
8061
|
+
/** {en}
|
|
8062
|
+
* @brief Event callback of successfully switching Adaptive Bitrate (ABR) live stream.
|
|
7597
8063
|
*/
|
|
7598
8064
|
[LiveEvents.ABR_SWITCH_SUCCESS]: (data: {
|
|
7599
8065
|
/** {zh}
|
|
7600
|
-
*
|
|
8066
|
+
* @brief 切换后的码率。
|
|
8067
|
+
*/
|
|
8068
|
+
/** {en}
|
|
8069
|
+
* @brief Bitrate after switching.
|
|
7601
8070
|
*/
|
|
7602
8071
|
bitrate: number;
|
|
7603
|
-
/**
|
|
7604
|
-
*
|
|
8072
|
+
/** {zh}
|
|
8073
|
+
* @brief 切换后的播放地址。
|
|
8074
|
+
*/
|
|
8075
|
+
/** {en}
|
|
8076
|
+
* @brief The playback address after the switch.
|
|
7605
8077
|
*/
|
|
7606
8078
|
url: string;
|
|
7607
8079
|
}) => void;
|
|
7608
8080
|
/** {zh}
|
|
7609
|
-
*
|
|
8081
|
+
* @brief 切换自适应码率直播流失败的事件回调。
|
|
8082
|
+
*/
|
|
8083
|
+
/** {en}
|
|
8084
|
+
* @brief Event callback of failing to switch Adaptive Bitrate (ABR) live stream.
|
|
7610
8085
|
*/
|
|
7611
8086
|
[LiveEvents.ABR_SWITCH_FAILED]: (data: {
|
|
7612
8087
|
/** {zh}
|
|
7613
|
-
*
|
|
8088
|
+
* @brief 切换的码率。
|
|
8089
|
+
*/
|
|
8090
|
+
/** {en}
|
|
8091
|
+
* @brief Bitrate after switching.
|
|
7614
8092
|
*/
|
|
7615
8093
|
bitrate: number;
|
|
7616
|
-
/**
|
|
7617
|
-
*
|
|
8094
|
+
/** {zh}
|
|
8095
|
+
* @brief 切换后的播放地址。
|
|
8096
|
+
*/
|
|
8097
|
+
/** {en}
|
|
8098
|
+
* @brief The playback address after the switch.
|
|
7618
8099
|
*/
|
|
7619
8100
|
url: string;
|
|
7620
8101
|
}) => void;
|
|
@@ -7759,7 +8240,7 @@ declare namespace live {
|
|
|
7759
8240
|
*/
|
|
7760
8241
|
enum ListType {
|
|
7761
8242
|
/** {zh}
|
|
7762
|
-
* @brief
|
|
8243
|
+
* @brief 全屏布局。
|
|
7763
8244
|
* @hidden
|
|
7764
8245
|
*/
|
|
7765
8246
|
/** {en}
|
|
@@ -7768,21 +8249,21 @@ declare namespace live {
|
|
|
7768
8249
|
*/
|
|
7769
8250
|
Middle = "middle",
|
|
7770
8251
|
/** {zh}
|
|
7771
|
-
* @brief
|
|
8252
|
+
* @brief 底部抽屉。
|
|
7772
8253
|
*/
|
|
7773
8254
|
/** {en}
|
|
7774
8255
|
* @brief Bottom navigation drawer.
|
|
7775
8256
|
*/
|
|
7776
8257
|
Bottom = "bottom",
|
|
7777
8258
|
/** {zh}
|
|
7778
|
-
* @brief
|
|
8259
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
7779
8260
|
*/
|
|
7780
8261
|
/** {en}
|
|
7781
8262
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
7782
8263
|
*/
|
|
7783
8264
|
Fullscreen = "fullscreen",
|
|
7784
8265
|
/** {zh}
|
|
7785
|
-
* @brief
|
|
8266
|
+
* @brief 窗口蒙层展示。
|
|
7786
8267
|
*/
|
|
7787
8268
|
/** {en}
|
|
7788
8269
|
* @brief Overlay.
|
|
@@ -8195,11 +8676,9 @@ declare namespace live {
|
|
|
8195
8676
|
poster?: string;
|
|
8196
8677
|
/** {zh}
|
|
8197
8678
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
8198
|
-
* @default -
|
|
8199
8679
|
*/
|
|
8200
8680
|
/** {en}
|
|
8201
8681
|
* @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
8682
|
*/
|
|
8204
8683
|
lang?: Lang;
|
|
8205
8684
|
/** {zh}
|
|
@@ -8258,25 +8737,20 @@ declare namespace live {
|
|
|
8258
8737
|
* @brief Whether to display the full-screen button.
|
|
8259
8738
|
* - `true`: Display;
|
|
8260
8739
|
* - `false`: Do not display.
|
|
8261
|
-
* @default -
|
|
8262
8740
|
*/
|
|
8263
8741
|
fullscreen?: boolean | Fullscreen;
|
|
8264
8742
|
/** {zh}
|
|
8265
8743
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
8266
|
-
* @default -
|
|
8267
8744
|
*/
|
|
8268
8745
|
/** {en}
|
|
8269
8746
|
* @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
8747
|
*/
|
|
8272
8748
|
error?: ErrorConfig;
|
|
8273
8749
|
/** {zh}
|
|
8274
8750
|
* @brief 为播放器设置清晰度的相关配置。
|
|
8275
|
-
* @default -
|
|
8276
8751
|
*/
|
|
8277
8752
|
/** {en}
|
|
8278
8753
|
* @brief Resolution-related configurations.
|
|
8279
|
-
* @default -
|
|
8280
8754
|
*/
|
|
8281
8755
|
definition?: DefinitionConfig;
|
|
8282
8756
|
/** {zh}
|
|
@@ -8537,8 +9011,7 @@ declare namespace live {
|
|
|
8537
9011
|
* `true`: Display;
|
|
8538
9012
|
* `false`: Do not display.
|
|
8539
9013
|
* @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.
|
|
9014
|
+
* @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
9015
|
* - `true`: Display;
|
|
8543
9016
|
* - `false`: Do not display.
|
|
8544
9017
|
*/
|
|
@@ -8556,7 +9029,7 @@ declare namespace live {
|
|
|
8556
9029
|
*/
|
|
8557
9030
|
interface CommonStyle {
|
|
8558
9031
|
/** {zh}
|
|
8559
|
-
* @brief
|
|
9032
|
+
* @brief 进度条底色。
|
|
8560
9033
|
* @default 无
|
|
8561
9034
|
*/
|
|
8562
9035
|
/** {en}
|
|
@@ -8564,7 +9037,7 @@ declare namespace live {
|
|
|
8564
9037
|
*/
|
|
8565
9038
|
progressColor?: string;
|
|
8566
9039
|
/** {zh}
|
|
8567
|
-
* @brief
|
|
9040
|
+
* @brief 播放完成部分进度条底色。
|
|
8568
9041
|
* @default 无
|
|
8569
9042
|
*/
|
|
8570
9043
|
/** {en}
|
|
@@ -8572,7 +9045,7 @@ declare namespace live {
|
|
|
8572
9045
|
*/
|
|
8573
9046
|
playedColor?: string;
|
|
8574
9047
|
/** {zh}
|
|
8575
|
-
* @brief
|
|
9048
|
+
* @brief 缓存部分进度条底色。
|
|
8576
9049
|
* @default 无
|
|
8577
9050
|
*/
|
|
8578
9051
|
/** {en}
|
|
@@ -8581,7 +9054,7 @@ declare namespace live {
|
|
|
8581
9054
|
*/
|
|
8582
9055
|
cachedColor?: string;
|
|
8583
9056
|
/** {zh}
|
|
8584
|
-
* @brief
|
|
9057
|
+
* @brief 进度条滑块样式。
|
|
8585
9058
|
* @default 无
|
|
8586
9059
|
*/
|
|
8587
9060
|
/** {en}
|
|
@@ -8592,7 +9065,7 @@ declare namespace live {
|
|
|
8592
9065
|
[propName: string]: any;
|
|
8593
9066
|
};
|
|
8594
9067
|
/** {zh}
|
|
8595
|
-
* @brief
|
|
9068
|
+
* @brief 音量颜色。
|
|
8596
9069
|
* @default 无
|
|
8597
9070
|
*/
|
|
8598
9071
|
/** {en}
|
|
@@ -8616,14 +9089,14 @@ declare namespace live {
|
|
|
8616
9089
|
*/
|
|
8617
9090
|
enum Codec {
|
|
8618
9091
|
/** {zh}
|
|
8619
|
-
* @brief H.265
|
|
9092
|
+
* @brief H.265 编码格式。
|
|
8620
9093
|
*/
|
|
8621
9094
|
/** {en}
|
|
8622
9095
|
* @brief H.265.
|
|
8623
9096
|
*/
|
|
8624
9097
|
H265 = "h265",
|
|
8625
9098
|
/** {zh}
|
|
8626
|
-
* @brief H.264
|
|
9099
|
+
* @brief H.264 编码格式。
|
|
8627
9100
|
*/
|
|
8628
9101
|
/** {en}
|
|
8629
9102
|
* @brief H.264.
|
|
@@ -8640,18 +9113,18 @@ declare namespace live {
|
|
|
8640
9113
|
*/
|
|
8641
9114
|
enum Degradation {
|
|
8642
9115
|
/** {zh}
|
|
8643
|
-
* @brief
|
|
9116
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
8644
9117
|
*/
|
|
8645
9118
|
/** {en}
|
|
8646
|
-
* @brief
|
|
9119
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
8647
9120
|
*/
|
|
8648
9121
|
SoftFirst = "soft-first",
|
|
8649
9122
|
/** {zh}
|
|
8650
|
-
* @brief
|
|
9123
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
8651
9124
|
* @hidden
|
|
8652
9125
|
*/
|
|
8653
9126
|
/** {en}
|
|
8654
|
-
* @brief
|
|
9127
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
8655
9128
|
* @hidden
|
|
8656
9129
|
*/
|
|
8657
9130
|
H264First = "h264-first"
|
|
@@ -8668,14 +9141,14 @@ declare namespace live {
|
|
|
8668
9141
|
*/
|
|
8669
9142
|
enum DecodeType {
|
|
8670
9143
|
/** {zh}
|
|
8671
|
-
* @brief
|
|
9144
|
+
* @brief 软解。
|
|
8672
9145
|
*/
|
|
8673
9146
|
/** {en}
|
|
8674
9147
|
* @brief Software decoding.
|
|
8675
9148
|
*/
|
|
8676
9149
|
Software = "software",
|
|
8677
9150
|
/** {zh}
|
|
8678
|
-
* @brief
|
|
9151
|
+
* @brief 硬解。
|
|
8679
9152
|
*/
|
|
8680
9153
|
/** {en}
|
|
8681
9154
|
* @brief Hardware decoding.
|
|
@@ -8866,6 +9339,11 @@ declare namespace live {
|
|
|
8866
9339
|
/** {zh}
|
|
8867
9340
|
* 获取播放器版本号
|
|
8868
9341
|
* @returns
|
|
9342
|
+
* @brief
|
|
9343
|
+
* 获取播放器 SDK 版本号。
|
|
9344
|
+
*/
|
|
9345
|
+
/** {en}
|
|
9346
|
+
* @brief Retrieve the player SDK version number.
|
|
8869
9347
|
*/
|
|
8870
9348
|
get playerVersion(): string;
|
|
8871
9349
|
/** {zh}
|
|
@@ -8953,8 +9431,8 @@ declare namespace live {
|
|
|
8953
9431
|
static create<T extends VePlayerBase>(options?: VePlayerBaseOptions, Constructor?: Constructor<T>): Promise<T>;
|
|
8954
9432
|
/** {zh}
|
|
8955
9433
|
* @brief 调用此方法切换拉流地址、线路、清晰度。
|
|
8956
|
-
* @param target
|
|
8957
|
-
* @param options
|
|
9434
|
+
* @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
|
|
9435
|
+
* @param options 更多配置信息。
|
|
8958
9436
|
*/
|
|
8959
9437
|
/** {en}
|
|
8960
9438
|
* @brief Switches the pull stream address, playback source, or resolution.
|
|
@@ -8991,11 +9469,12 @@ declare namespace live {
|
|
|
8991
9469
|
*/
|
|
8992
9470
|
fallbackToFirstDefinition?: boolean;
|
|
8993
9471
|
/** {zh}
|
|
8994
|
-
* @brief
|
|
8995
|
-
* - true: 无缝切换
|
|
8996
|
-
* - false: 非无缝切换
|
|
9472
|
+
* @brief 是否无缝切换,true 为无缝切换,false 为非无缝切换。
|
|
8997
9473
|
* @default false
|
|
8998
9474
|
*/
|
|
9475
|
+
/** {en}
|
|
9476
|
+
* @brief Whether seamless switching or not. True means seamless switching and false means non-seamless switching.
|
|
9477
|
+
*/
|
|
8999
9478
|
seamless?: boolean;
|
|
9000
9479
|
}): Promise<ExposedDefinition>;
|
|
9001
9480
|
/** {zh}
|
|
@@ -9031,16 +9510,15 @@ declare namespace live {
|
|
|
9031
9510
|
source?: string;
|
|
9032
9511
|
}): Promise<void>;
|
|
9033
9512
|
// TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
|
|
9034
|
-
/**
|
|
9035
9513
|
/** {zh}
|
|
9036
9514
|
* @brief 调用此方法监听指定事件,事件处理函数只执行一次。
|
|
9037
9515
|
* @param event 表示事件的名称。
|
|
9038
9516
|
* @param callback 表示事件的回调函数。
|
|
9039
9517
|
*/
|
|
9040
9518
|
/** {en}
|
|
9041
|
-
* @brief
|
|
9042
|
-
* @param event The event
|
|
9043
|
-
* @param callback
|
|
9519
|
+
* @brief Call this method to listen for the specified event. The event handler is executed only once.
|
|
9520
|
+
* @param event The name representing the event.
|
|
9521
|
+
* @param callback Callback functions representing events.
|
|
9044
9522
|
*/
|
|
9045
9523
|
once(event: string, callback: (data?: any) => any): void;
|
|
9046
9524
|
/** {zh}
|
|
@@ -9166,10 +9644,14 @@ declare namespace live {
|
|
|
9166
9644
|
ignorePaused?: boolean;
|
|
9167
9645
|
}): void;
|
|
9168
9646
|
/** {zh}
|
|
9169
|
-
* @brief
|
|
9170
|
-
* @param type
|
|
9647
|
+
* @brief 判断浏览器是否支持播放格式。
|
|
9648
|
+
* @param type 播放格式。
|
|
9171
9649
|
* @returns
|
|
9172
9650
|
*/
|
|
9651
|
+
/** {en}
|
|
9652
|
+
* @brief Determine whether the browser supports the playback format.
|
|
9653
|
+
* @param type The playback format.
|
|
9654
|
+
*/
|
|
9173
9655
|
canPlayType(type: string): boolean;
|
|
9174
9656
|
/** {zh}
|
|
9175
9657
|
* @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
|
|
@@ -9249,7 +9731,7 @@ declare namespace live {
|
|
|
9249
9731
|
unRegisterPlugin(plugin: any): void;
|
|
9250
9732
|
/** {zh}
|
|
9251
9733
|
* @brief 调用此接口显示指定插件图标。
|
|
9252
|
-
* @param pluginNames
|
|
9734
|
+
* @param pluginNames 插件名称。
|
|
9253
9735
|
*/
|
|
9254
9736
|
/** {en}
|
|
9255
9737
|
* @brief Displays the icon of a specified plugin.
|
|
@@ -9258,7 +9740,7 @@ declare namespace live {
|
|
|
9258
9740
|
showIcon(pluginNames: string[]): void;
|
|
9259
9741
|
/** {zh}
|
|
9260
9742
|
* @brief 调用此接口隐藏指定插件图标。
|
|
9261
|
-
* @param pluginNames
|
|
9743
|
+
* @param pluginNames 插件名称。
|
|
9262
9744
|
*/
|
|
9263
9745
|
/** {en}
|
|
9264
9746
|
* @brief Hides the icon of a specified plugin.
|
|
@@ -9386,22 +9868,22 @@ declare namespace live {
|
|
|
9386
9868
|
* @detail api
|
|
9387
9869
|
* @brief 当前浏览器是否支持播放编码格式。
|
|
9388
9870
|
* @param codec 编码格式。
|
|
9389
|
-
* `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
|
|
9390
|
-
* `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
9871
|
+
* - `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends。
|
|
9872
|
+
* - `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
|
|
9391
9873
|
* @returns
|
|
9392
9874
|
*/
|
|
9393
9875
|
/** {en}
|
|
9394
9876
|
* @detail api
|
|
9395
9877
|
* @brief Checkes whether the current browser supports the specified encoding format.
|
|
9396
9878
|
* @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.
|
|
9879
|
+
* - `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
|
|
9880
|
+
* - `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
|
|
9399
9881
|
* @returns
|
|
9400
9882
|
*/
|
|
9401
9883
|
function isMseSupported(codec?: string): boolean;
|
|
9402
9884
|
/** {zh}
|
|
9403
9885
|
* @detail api
|
|
9404
|
-
* @brief
|
|
9886
|
+
* @brief 当前浏览器是否支持软解。
|
|
9405
9887
|
* @returns
|
|
9406
9888
|
*/
|
|
9407
9889
|
/** {en}
|
|
@@ -9410,10 +9892,12 @@ declare namespace live {
|
|
|
9410
9892
|
* @returns
|
|
9411
9893
|
*/
|
|
9412
9894
|
function isSoftDecodeSupported(): Promise<boolean>;
|
|
9895
|
+
function isMMSSupported(): boolean;
|
|
9413
9896
|
const util: {
|
|
9414
9897
|
getStreamType: typeof getStreamType;
|
|
9415
9898
|
isMseSupported: typeof isMseSupported;
|
|
9416
9899
|
isSoftDecodeSupported: typeof isSoftDecodeSupported;
|
|
9900
|
+
isMMSSupported: typeof isMMSSupported;
|
|
9417
9901
|
appendSearchParams: (url?: string | undefined, searchParams?: Record<string, string> | undefined) => string;
|
|
9418
9902
|
getUrlObject: (url?: string | undefined) => URL | undefined;
|
|
9419
9903
|
createDom(el?: string | undefined, tpl?: string | undefined, attrs?: {
|
|
@@ -10044,20 +10528,16 @@ declare namespace live {
|
|
|
10044
10528
|
interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
10045
10529
|
/** {zh}
|
|
10046
10530
|
* @brief 为播放器设置 RTM 拉流配置。
|
|
10047
|
-
* @default -
|
|
10048
10531
|
*/
|
|
10049
10532
|
/** {en}
|
|
10050
10533
|
* @brief Configurations for playing an RTM stream.
|
|
10051
|
-
* @default -
|
|
10052
10534
|
*/
|
|
10053
10535
|
rtm?: Rtm;
|
|
10054
10536
|
/** {zh}
|
|
10055
10537
|
* @brief 为播放器设置 FLV 拉流配置。FLV 格式流相关配置仅适用于支持 MSE 播放的 PC 端浏览器和安卓端浏览器。
|
|
10056
|
-
* @default -
|
|
10057
10538
|
*/
|
|
10058
10539
|
/** {en}
|
|
10059
10540
|
* @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
10541
|
*/
|
|
10062
10542
|
flv?: Flv;
|
|
10063
10543
|
/** {zh}
|
|
@@ -10075,29 +10555,23 @@ declare namespace live {
|
|
|
10075
10555
|
hls?: Hls;
|
|
10076
10556
|
/** {zh}
|
|
10077
10557
|
* @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
|
|
10078
|
-
* @default -
|
|
10079
10558
|
*/
|
|
10080
10559
|
/** {en}
|
|
10081
10560
|
* @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
10561
|
*/
|
|
10084
10562
|
infoPanel?: InfoPanelConfig;
|
|
10085
10563
|
/** {zh}
|
|
10086
10564
|
* @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
|
|
10087
|
-
* @default -
|
|
10088
10565
|
*/
|
|
10089
10566
|
/** {en}
|
|
10090
10567
|
* @brief Configurations for time shifting.
|
|
10091
|
-
* @default -
|
|
10092
10568
|
*/
|
|
10093
10569
|
timeShift?: TimeShiftConfig;
|
|
10094
10570
|
/** {zh}
|
|
10095
10571
|
* @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
|
|
10096
|
-
* @default -
|
|
10097
10572
|
*/
|
|
10098
10573
|
/** {en}
|
|
10099
10574
|
* @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
|
|
10100
|
-
* @default -
|
|
10101
10575
|
*/
|
|
10102
10576
|
logger?: LoggerConfig;
|
|
10103
10577
|
/** {zh}
|
|
@@ -10117,13 +10591,10 @@ declare namespace live {
|
|
|
10117
10591
|
*/
|
|
10118
10592
|
icons?: any;
|
|
10119
10593
|
/** {zh}
|
|
10120
|
-
* @hidden
|
|
10121
10594
|
* @brief 商业 DRM 播放配置。
|
|
10122
|
-
* @default -
|
|
10123
10595
|
*/
|
|
10124
10596
|
/** {en}
|
|
10125
10597
|
* @brief Digital Rights Management (DRM) configurations.
|
|
10126
|
-
* @default -
|
|
10127
10598
|
*/
|
|
10128
10599
|
drm?: Drm;
|
|
10129
10600
|
}
|
|
@@ -10137,31 +10608,56 @@ declare namespace live {
|
|
|
10137
10608
|
*/
|
|
10138
10609
|
interface Abr {
|
|
10139
10610
|
/** {zh}
|
|
10140
|
-
* @brief 是否开启
|
|
10141
|
-
*
|
|
10142
|
-
*
|
|
10611
|
+
* @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
|
|
10612
|
+
* - true: 开启
|
|
10613
|
+
* - false: 关闭
|
|
10143
10614
|
* @default true
|
|
10144
10615
|
*/
|
|
10616
|
+
/** {en}
|
|
10617
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
10618
|
+
* - true: Enable;
|
|
10619
|
+
* - false: Disable.
|
|
10620
|
+
*/
|
|
10145
10621
|
enable?: boolean;
|
|
10146
10622
|
/** {zh}
|
|
10147
|
-
* @brief 未开启
|
|
10148
|
-
*
|
|
10149
|
-
*
|
|
10623
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
10624
|
+
* - true: 开启;
|
|
10625
|
+
* - false: 关闭。
|
|
10150
10626
|
* @default false
|
|
10627
|
+
* @hidden
|
|
10628
|
+
*/
|
|
10629
|
+
/** {en}
|
|
10630
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
10631
|
+
* - true: Enable;
|
|
10632
|
+
* - false: Disable.
|
|
10633
|
+
* @hidden
|
|
10151
10634
|
*/
|
|
10152
10635
|
downTip?: boolean;
|
|
10153
10636
|
/** {zh}
|
|
10154
|
-
* @brief
|
|
10155
|
-
*
|
|
10156
|
-
*
|
|
10637
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
10638
|
+
* - true: 开启;
|
|
10639
|
+
* - false: 关闭。
|
|
10640
|
+
* @default false
|
|
10641
|
+
*/
|
|
10642
|
+
/** {en}
|
|
10643
|
+
* @brief Whether to start debug mode, default is false.
|
|
10644
|
+
* - true: Enable,
|
|
10645
|
+
* - false: Disable.
|
|
10646
|
+
* @default false
|
|
10157
10647
|
*/
|
|
10158
10648
|
debug?: boolean;
|
|
10159
10649
|
/** {zh}
|
|
10160
|
-
* @brief
|
|
10650
|
+
* @brief 当前拉流地址 URL 对应的码率。
|
|
10651
|
+
*/
|
|
10652
|
+
/** {en}
|
|
10653
|
+
* @brief The bitrate corresponding to the current pull-stream address URL.
|
|
10161
10654
|
*/
|
|
10162
10655
|
bitrate?: number;
|
|
10163
10656
|
/** {zh}
|
|
10164
|
-
* @brief
|
|
10657
|
+
* @brief 自适应码率流信息。
|
|
10658
|
+
*/
|
|
10659
|
+
/** {en}
|
|
10660
|
+
* @brief Adaptive bitrate (ABR) stream information.
|
|
10165
10661
|
*/
|
|
10166
10662
|
urls?: {
|
|
10167
10663
|
[bitrate: number]: string;
|
|
@@ -10170,35 +10666,53 @@ declare namespace live {
|
|
|
10170
10666
|
/** {zh}
|
|
10171
10667
|
* @list option
|
|
10172
10668
|
* @kind property
|
|
10669
|
+
* @hidden
|
|
10173
10670
|
*/
|
|
10174
10671
|
/** {en}
|
|
10175
10672
|
* @list option
|
|
10176
10673
|
* @kind property
|
|
10674
|
+
* @hidden
|
|
10177
10675
|
*/
|
|
10178
10676
|
interface HlsAbr {
|
|
10179
10677
|
/** {zh}
|
|
10180
|
-
* @brief 是否开启
|
|
10181
|
-
*
|
|
10182
|
-
*
|
|
10678
|
+
* @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
|
|
10679
|
+
* - true: 开启;
|
|
10680
|
+
* - false: 关闭。
|
|
10183
10681
|
* @default true
|
|
10184
10682
|
*/
|
|
10683
|
+
/** {en}
|
|
10684
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
10685
|
+
* - true: Enable;
|
|
10686
|
+
* - false: Disable.
|
|
10687
|
+
*/
|
|
10185
10688
|
enable?: boolean;
|
|
10186
10689
|
/** {zh}
|
|
10187
|
-
* @brief 未开启
|
|
10188
|
-
*
|
|
10189
|
-
*
|
|
10690
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
10691
|
+
* - true: 开启;
|
|
10692
|
+
* - false: 关闭。
|
|
10190
10693
|
* @default false
|
|
10191
10694
|
*/
|
|
10695
|
+
/** {en}
|
|
10696
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
10697
|
+
* - true: Enable;
|
|
10698
|
+
* - false: Disable.
|
|
10699
|
+
*/
|
|
10192
10700
|
downTip?: boolean;
|
|
10193
10701
|
/** {zh}
|
|
10194
|
-
* @brief
|
|
10195
|
-
*
|
|
10196
|
-
*
|
|
10702
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
10703
|
+
* - true: 开启;
|
|
10704
|
+
* - false: 关闭。
|
|
10705
|
+
* @default false
|
|
10706
|
+
*/
|
|
10707
|
+
/** {en}
|
|
10708
|
+
* @brief Whether to start debug mode, default is false.
|
|
10709
|
+
* - true: Enable,
|
|
10710
|
+
* - false: Disable.
|
|
10711
|
+
* @default false
|
|
10197
10712
|
*/
|
|
10198
10713
|
debug?: boolean;
|
|
10199
10714
|
}
|
|
10200
10715
|
/** {zh}
|
|
10201
|
-
* @hidden
|
|
10202
10716
|
* @list option
|
|
10203
10717
|
* @kind property
|
|
10204
10718
|
*/
|
|
@@ -10208,15 +10722,14 @@ declare namespace live {
|
|
|
10208
10722
|
*/
|
|
10209
10723
|
interface Drm {
|
|
10210
10724
|
/** {zh}
|
|
10211
|
-
* @brief FairPlay DRM
|
|
10725
|
+
* @brief FairPlay DRM 配置。
|
|
10212
10726
|
*/
|
|
10213
10727
|
/** {en}
|
|
10214
|
-
* @brief FairPlay DRM configurations
|
|
10728
|
+
* @brief FairPlay DRM configurations.
|
|
10215
10729
|
*/
|
|
10216
10730
|
fairplay?: FairplayDrm;
|
|
10217
10731
|
}
|
|
10218
10732
|
/** {zh}
|
|
10219
|
-
* @hidden
|
|
10220
10733
|
* @list option
|
|
10221
10734
|
* @kind property
|
|
10222
10735
|
*/
|
|
@@ -10226,7 +10739,6 @@ declare namespace live {
|
|
|
10226
10739
|
*/
|
|
10227
10740
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
10228
10741
|
/** {zh}
|
|
10229
|
-
* @hidden
|
|
10230
10742
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
10231
10743
|
* @param config
|
|
10232
10744
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -10241,7 +10753,6 @@ declare namespace live {
|
|
|
10241
10753
|
}) => Promise<FairplayDrmConfig>;
|
|
10242
10754
|
}
|
|
10243
10755
|
/** {zh}
|
|
10244
|
-
* @hidden
|
|
10245
10756
|
* @list option
|
|
10246
10757
|
* @kind property
|
|
10247
10758
|
*/
|
|
@@ -10251,17 +10762,17 @@ declare namespace live {
|
|
|
10251
10762
|
*/
|
|
10252
10763
|
interface FairplayDrmConfig {
|
|
10253
10764
|
/** {zh}
|
|
10254
|
-
* @brief
|
|
10765
|
+
* @brief 获取证书的请求地址。
|
|
10255
10766
|
*/
|
|
10256
10767
|
/** {en}
|
|
10257
|
-
* @brief URL used to acquire the FairPlay certificate
|
|
10768
|
+
* @brief URL used to acquire the FairPlay certificate.
|
|
10258
10769
|
*/
|
|
10259
10770
|
serverCertificatePath?: string;
|
|
10260
10771
|
/** {zh}
|
|
10261
|
-
* @brief
|
|
10772
|
+
* @brief 获取内容密钥许可证的请求地址。
|
|
10262
10773
|
*/
|
|
10263
10774
|
/** {en}
|
|
10264
|
-
* @brief URL used to acquire the DRM license
|
|
10775
|
+
* @brief URL used to acquire the DRM license.
|
|
10265
10776
|
*/
|
|
10266
10777
|
serverProcessSPCPath?: string;
|
|
10267
10778
|
}
|
|
@@ -10385,17 +10896,35 @@ declare namespace live {
|
|
|
10385
10896
|
*/
|
|
10386
10897
|
enableRTMAutoTranscode?: boolean;
|
|
10387
10898
|
/** {zh}
|
|
10388
|
-
* @brief
|
|
10899
|
+
* @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
|
|
10389
10900
|
* @default 1000
|
|
10390
10901
|
*/
|
|
10902
|
+
/** {en}
|
|
10903
|
+
* @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.
|
|
10904
|
+
*/
|
|
10391
10905
|
networkEvaluateInterval?: number;
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10906
|
+
/** {zh}
|
|
10907
|
+
* @brief 断流后重新拉流是否无缝播放。
|
|
10908
|
+
* @default false
|
|
10909
|
+
*/
|
|
10910
|
+
/** {en}
|
|
10911
|
+
* @brief
|
|
10912
|
+
*/
|
|
10913
|
+
seamlesslyReload?: boolean;
|
|
10914
|
+
/** {zh}
|
|
10915
|
+
* @brief 暂停后多久断流,默认不断流。
|
|
10916
|
+
*/
|
|
10917
|
+
/** {en}
|
|
10918
|
+
* @brief
|
|
10919
|
+
*/
|
|
10920
|
+
disconnectTime?: number;
|
|
10921
|
+
}
|
|
10922
|
+
/** {zh}
|
|
10923
|
+
* @list option
|
|
10924
|
+
* @kind property
|
|
10925
|
+
*/
|
|
10926
|
+
/** {en}
|
|
10927
|
+
* @list option
|
|
10399
10928
|
* @kind property
|
|
10400
10929
|
*/
|
|
10401
10930
|
interface Flv {
|
|
@@ -10440,28 +10969,55 @@ declare namespace live {
|
|
|
10440
10969
|
*/
|
|
10441
10970
|
enableLowLatency?: boolean;
|
|
10442
10971
|
/** {zh}
|
|
10443
|
-
* @brief
|
|
10444
|
-
* @default -
|
|
10972
|
+
* @brief 低延时的详细配置。
|
|
10445
10973
|
*/
|
|
10446
10974
|
/** {en}
|
|
10447
|
-
* @brief
|
|
10448
|
-
* @default -
|
|
10975
|
+
* @brief Detailed configuration for low latency.
|
|
10449
10976
|
*/
|
|
10450
10977
|
lowLatency?: LowLatency;
|
|
10451
10978
|
/** {zh}
|
|
10452
|
-
* @brief 为播放器设置 FLV
|
|
10453
|
-
|
|
10979
|
+
* @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
|
|
10980
|
+
*/
|
|
10981
|
+
/** {en}
|
|
10982
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
|
|
10454
10983
|
*/
|
|
10455
10984
|
abr?: Abr;
|
|
10456
10985
|
/** {zh}
|
|
10457
10986
|
* @hidden
|
|
10458
10987
|
*/
|
|
10988
|
+
/** {en}
|
|
10989
|
+
* @hidden
|
|
10990
|
+
*/
|
|
10459
10991
|
mseLowLatency?: boolean;
|
|
10460
10992
|
/** {zh}
|
|
10461
|
-
* @brief
|
|
10462
|
-
* @default
|
|
10993
|
+
* @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
|
|
10994
|
+
* @default 5000
|
|
10995
|
+
*/
|
|
10996
|
+
/** {en}
|
|
10997
|
+
* @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
10998
|
*/
|
|
10464
10999
|
maxReaderInterval?: number;
|
|
11000
|
+
/** {zh}
|
|
11001
|
+
* @brief
|
|
11002
|
+
* 直播暂停时的断流等待时间,单位为秒,默认值为 0,表示直播暂停时即断流。
|
|
11003
|
+
* @default 0
|
|
11004
|
+
*/
|
|
11005
|
+
/** {en}
|
|
11006
|
+
* @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.
|
|
11007
|
+
* @default 0
|
|
11008
|
+
*/
|
|
11009
|
+
disconnectTime?: number;
|
|
11010
|
+
/** {zh}
|
|
11011
|
+
* @brief 断流后重新拉流是否无缝,无缝拉流时重新拉流不会出现黑帧。
|
|
11012
|
+
* - `true`:是;
|
|
11013
|
+
* - `false`:否。
|
|
11014
|
+
* @default false
|
|
11015
|
+
*/
|
|
11016
|
+
/** {en}
|
|
11017
|
+
* @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.
|
|
11018
|
+
* @default false
|
|
11019
|
+
*/
|
|
11020
|
+
seamlesslyReload?: boolean;
|
|
10465
11021
|
}
|
|
10466
11022
|
/** {zh}
|
|
10467
11023
|
* @list option
|
|
@@ -10480,15 +11036,15 @@ declare namespace live {
|
|
|
10480
11036
|
*/
|
|
10481
11037
|
abrPts?: string | number;
|
|
10482
11038
|
/** {zh}
|
|
10483
|
-
* @brief FLV
|
|
10484
|
-
*
|
|
10485
|
-
*
|
|
11039
|
+
* @brief FLV 低延时模式下,是否开启倍速追帧。
|
|
11040
|
+
* - true:开启;
|
|
11041
|
+
* - false:关闭。
|
|
10486
11042
|
* @default true
|
|
10487
11043
|
*/
|
|
10488
11044
|
/** {en}
|
|
10489
|
-
* @brief
|
|
10490
|
-
*
|
|
10491
|
-
*
|
|
11045
|
+
* @brief Whether to enable speed-up frame chasing in FLV low latency mode.
|
|
11046
|
+
* - true: enabled;
|
|
11047
|
+
* - false: disabled.
|
|
10492
11048
|
* @default true
|
|
10493
11049
|
*/
|
|
10494
11050
|
enableFrameChasing?: boolean;
|
|
@@ -10543,8 +11099,12 @@ declare namespace live {
|
|
|
10543
11099
|
*/
|
|
10544
11100
|
enableMSE?: boolean;
|
|
10545
11101
|
/** {zh}
|
|
10546
|
-
* @brief 为播放器设置 HLS
|
|
10547
|
-
* @
|
|
11102
|
+
* @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
|
|
11103
|
+
* @hidden
|
|
11104
|
+
*/
|
|
11105
|
+
/** {en}
|
|
11106
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
|
|
11107
|
+
* @hidden
|
|
10548
11108
|
*/
|
|
10549
11109
|
abr?: HlsAbr;
|
|
10550
11110
|
/**
|
|
@@ -10552,83 +11112,415 @@ declare namespace live {
|
|
|
10552
11112
|
*/
|
|
10553
11113
|
mseLowLatency?: boolean;
|
|
10554
11114
|
}
|
|
11115
|
+
/** {zh}
|
|
11116
|
+
* @list option
|
|
11117
|
+
* @kind property
|
|
11118
|
+
* @brief 在 RTM 拉流场景下,获取到的网络情况。
|
|
11119
|
+
*/
|
|
11120
|
+
/** {en}
|
|
11121
|
+
* @list option
|
|
11122
|
+
* @kind property
|
|
11123
|
+
* @brief Network conditions obtained in the RTM pull stream scenario.
|
|
11124
|
+
*/
|
|
10555
11125
|
interface RTMNetWorkInfo {
|
|
10556
11126
|
/** {zh}
|
|
10557
|
-
* @brief
|
|
11127
|
+
* @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
|
|
11128
|
+
*/
|
|
11129
|
+
/** {en}
|
|
11130
|
+
* @brief The download speed within the latest network evaluation period, in units of bps.
|
|
10558
11131
|
*/
|
|
10559
11132
|
speed?: number;
|
|
10560
11133
|
/** {zh}
|
|
10561
|
-
* @brief
|
|
11134
|
+
* @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
|
|
11135
|
+
*/
|
|
11136
|
+
/** {en}
|
|
11137
|
+
* @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
|
|
10562
11138
|
*/
|
|
10563
11139
|
avgSpeed?: number;
|
|
10564
11140
|
/** {zh}
|
|
10565
|
-
* @brief
|
|
11141
|
+
* @brief 最近一次网络评估周期内的网络丢包率。
|
|
11142
|
+
*/
|
|
11143
|
+
/** {en}
|
|
11144
|
+
* @brief The packet loss rate of the network within the latest network evaluation cycle.
|
|
10566
11145
|
*/
|
|
10567
11146
|
lostRate?: number;
|
|
10568
11147
|
/** {zh}
|
|
10569
|
-
* @brief
|
|
11148
|
+
* @brief 最近 5 次网络评估周期内的网络丢包率平均值。
|
|
11149
|
+
*/
|
|
11150
|
+
/** {en}
|
|
11151
|
+
* @brief The average network packet loss rate within the recent 5 network evaluation cycles.
|
|
10570
11152
|
*/
|
|
10571
11153
|
avgLostRate?: number;
|
|
10572
11154
|
}
|
|
10573
11155
|
/** {zh}
|
|
10574
|
-
* @
|
|
11156
|
+
* @list option
|
|
11157
|
+
* @kind property
|
|
11158
|
+
* @brief RTM 直播流播放信息。
|
|
11159
|
+
*/
|
|
11160
|
+
/** {en}
|
|
11161
|
+
* @list option
|
|
11162
|
+
* @kind property
|
|
11163
|
+
* @brief RTM live stream information.
|
|
10575
11164
|
*/
|
|
10576
11165
|
interface StatsSnapShoot {
|
|
11166
|
+
/** {en}
|
|
11167
|
+
* @brief Video information.
|
|
11168
|
+
*/
|
|
11169
|
+
/** {zh}
|
|
11170
|
+
* @brief 视频信息。
|
|
11171
|
+
*/
|
|
10577
11172
|
video?: {
|
|
11173
|
+
/** {zh}
|
|
11174
|
+
* @hidden
|
|
11175
|
+
*/
|
|
11176
|
+
/** {en}
|
|
11177
|
+
* @hidden
|
|
11178
|
+
*/
|
|
10578
11179
|
codec: string;
|
|
11180
|
+
/** {zh}
|
|
11181
|
+
* @hidden
|
|
11182
|
+
*/
|
|
11183
|
+
/** {en}
|
|
11184
|
+
* @hidden
|
|
11185
|
+
*/
|
|
10579
11186
|
payloadType: string;
|
|
11187
|
+
/** {zh}
|
|
11188
|
+
* @hidden
|
|
11189
|
+
*/
|
|
11190
|
+
/** {en}
|
|
11191
|
+
* @hidden
|
|
11192
|
+
*/
|
|
10580
11193
|
sdpFmtpLine: string;
|
|
11194
|
+
/** {zh}
|
|
11195
|
+
* @hidden
|
|
11196
|
+
*/
|
|
11197
|
+
/** {en}
|
|
11198
|
+
* @hidden
|
|
11199
|
+
*/
|
|
10581
11200
|
bytesReceived: number;
|
|
11201
|
+
/** {zh}
|
|
11202
|
+
* @hidden
|
|
11203
|
+
*/
|
|
11204
|
+
/** {en}
|
|
11205
|
+
* @hidden
|
|
11206
|
+
*/
|
|
10582
11207
|
firCount: number;
|
|
11208
|
+
/** {zh}
|
|
11209
|
+
* @hidden
|
|
11210
|
+
*/
|
|
11211
|
+
/** {en}
|
|
11212
|
+
* @hidden
|
|
11213
|
+
*/
|
|
10583
11214
|
pliCount: number;
|
|
11215
|
+
/** {zh}
|
|
11216
|
+
* @brief 视频高度
|
|
11217
|
+
*/
|
|
11218
|
+
/** {en}
|
|
11219
|
+
* @brief 视频高度
|
|
11220
|
+
*/
|
|
10584
11221
|
frameHeight: number;
|
|
11222
|
+
/** {zh}
|
|
11223
|
+
* @brief 视频宽度
|
|
11224
|
+
*/
|
|
11225
|
+
/** {en}
|
|
11226
|
+
* @brief 视频宽度
|
|
11227
|
+
*/
|
|
10585
11228
|
frameWidth: number;
|
|
11229
|
+
/** {zh}
|
|
11230
|
+
* @hidden
|
|
11231
|
+
*/
|
|
11232
|
+
/** {en}
|
|
11233
|
+
* @hidden
|
|
11234
|
+
*/
|
|
10586
11235
|
framesDecoded: number;
|
|
11236
|
+
/** {zh}
|
|
11237
|
+
* @hidden
|
|
11238
|
+
*/
|
|
11239
|
+
/** {en}
|
|
11240
|
+
* @hidden
|
|
11241
|
+
*/
|
|
10587
11242
|
framesDropped: number;
|
|
11243
|
+
/** {zh}
|
|
11244
|
+
* @brief 视频帧率
|
|
11245
|
+
*/
|
|
11246
|
+
/** {en}
|
|
11247
|
+
* @brief 视频帧率
|
|
11248
|
+
*/
|
|
10588
11249
|
framesPerSecond: number;
|
|
11250
|
+
/** {zh}
|
|
11251
|
+
* @hidden
|
|
11252
|
+
*/
|
|
11253
|
+
/** {en}
|
|
11254
|
+
* @hidden
|
|
11255
|
+
*/
|
|
10589
11256
|
framesReceived: number;
|
|
11257
|
+
/** {zh}
|
|
11258
|
+
* @hidden
|
|
11259
|
+
*/
|
|
11260
|
+
/** {en}
|
|
11261
|
+
* @hidden
|
|
11262
|
+
*/
|
|
10590
11263
|
jitter: number;
|
|
11264
|
+
/** {zh}
|
|
11265
|
+
* @hidden
|
|
11266
|
+
*/
|
|
11267
|
+
/** {en}
|
|
11268
|
+
* @hidden
|
|
11269
|
+
*/
|
|
10591
11270
|
jitterBufferDelay: number;
|
|
11271
|
+
/** {zh}
|
|
11272
|
+
* @hidden
|
|
11273
|
+
*/
|
|
11274
|
+
/** {en}
|
|
11275
|
+
* @hidden
|
|
11276
|
+
*/
|
|
10592
11277
|
keyFramesDecoded: number;
|
|
11278
|
+
/** {zh}
|
|
11279
|
+
* @hidden
|
|
11280
|
+
*/
|
|
11281
|
+
/** {en}
|
|
11282
|
+
* @hidden
|
|
11283
|
+
*/
|
|
10593
11284
|
nackCount: number;
|
|
11285
|
+
/** {zh}
|
|
11286
|
+
* @brief 视频丢包总数
|
|
11287
|
+
*/
|
|
11288
|
+
/** {en}
|
|
11289
|
+
* @brief 视频丢包总数
|
|
11290
|
+
*/
|
|
10594
11291
|
packetsLost: number;
|
|
11292
|
+
/** {zh}
|
|
11293
|
+
* @brief 视频收包总数
|
|
11294
|
+
*/
|
|
11295
|
+
/** {en}
|
|
11296
|
+
* @brief 视频收包总数
|
|
11297
|
+
*/
|
|
10595
11298
|
packetsReceived: number;
|
|
10596
11299
|
};
|
|
11300
|
+
/** {en}
|
|
11301
|
+
* @brief Audio information.
|
|
11302
|
+
*/
|
|
11303
|
+
/** {zh}
|
|
11304
|
+
* @brief 音频信息。
|
|
11305
|
+
*/
|
|
10597
11306
|
audio?: {
|
|
11307
|
+
/** {zh}
|
|
11308
|
+
* @hidden
|
|
11309
|
+
*/
|
|
11310
|
+
/** {en}
|
|
11311
|
+
* @hidden
|
|
11312
|
+
*/
|
|
10598
11313
|
codec: string;
|
|
11314
|
+
/** {zh}
|
|
11315
|
+
* @hidden
|
|
11316
|
+
*/
|
|
11317
|
+
/** {en}
|
|
11318
|
+
* @hidden
|
|
11319
|
+
*/
|
|
10599
11320
|
payloadType: string;
|
|
11321
|
+
/** {zh}
|
|
11322
|
+
* @hidden
|
|
11323
|
+
*/
|
|
11324
|
+
/** {en}
|
|
11325
|
+
* @hidden
|
|
11326
|
+
*/
|
|
10600
11327
|
sdpFmtpLine: string;
|
|
11328
|
+
/** {zh}
|
|
11329
|
+
* @hidden
|
|
11330
|
+
*/
|
|
11331
|
+
/** {en}
|
|
11332
|
+
* @hidden
|
|
11333
|
+
*/
|
|
10601
11334
|
audioLevel: number;
|
|
11335
|
+
/** {zh}
|
|
11336
|
+
* @hidden
|
|
11337
|
+
*/
|
|
11338
|
+
/** {en}
|
|
11339
|
+
* @hidden
|
|
11340
|
+
*/
|
|
10602
11341
|
bytesReceived: number;
|
|
11342
|
+
/** {zh}
|
|
11343
|
+
* @hidden
|
|
11344
|
+
*/
|
|
11345
|
+
/** {en}
|
|
11346
|
+
* @hidden
|
|
11347
|
+
*/
|
|
10603
11348
|
jitter: number;
|
|
11349
|
+
/** {zh}
|
|
11350
|
+
* @hidden
|
|
11351
|
+
*/
|
|
11352
|
+
/** {en}
|
|
11353
|
+
* @hidden
|
|
11354
|
+
*/
|
|
10604
11355
|
jitterBufferDelay: number;
|
|
11356
|
+
/** {zh}
|
|
11357
|
+
* @brief 音频丢包总数
|
|
11358
|
+
*/
|
|
11359
|
+
/** {en}
|
|
11360
|
+
* @brief 音频丢包总数
|
|
11361
|
+
*/
|
|
10605
11362
|
packetsLost: number;
|
|
11363
|
+
/** {zh}
|
|
11364
|
+
* @brief 音频收包总数
|
|
11365
|
+
*/
|
|
11366
|
+
/** {en}
|
|
11367
|
+
* @brief 音频收包总数
|
|
11368
|
+
*/
|
|
10606
11369
|
packetsReceived: number;
|
|
11370
|
+
/** {zh}
|
|
11371
|
+
* @hidden
|
|
11372
|
+
*/
|
|
11373
|
+
/** {en}
|
|
11374
|
+
* @hidden
|
|
11375
|
+
*/
|
|
10607
11376
|
totalSamplesDuration: number;
|
|
11377
|
+
/** {zh}
|
|
11378
|
+
* @hidden
|
|
11379
|
+
*/
|
|
11380
|
+
/** {en}
|
|
11381
|
+
* @hidden
|
|
11382
|
+
*/
|
|
10608
11383
|
totalSamplesReceived: number;
|
|
10609
11384
|
};
|
|
10610
11385
|
}
|
|
10611
11386
|
/** {zh}
|
|
10612
|
-
* @
|
|
11387
|
+
* @list option
|
|
11388
|
+
* @kind property
|
|
11389
|
+
* @brief FLV 直播流播放信息。
|
|
11390
|
+
*/
|
|
11391
|
+
/** {en}
|
|
11392
|
+
* @list option
|
|
11393
|
+
* @kind property
|
|
11394
|
+
* @brief FLV live stream information.
|
|
10613
11395
|
*/
|
|
10614
11396
|
interface FlvStats {
|
|
11397
|
+
/** {zh}
|
|
11398
|
+
* @brief 音频格式。
|
|
11399
|
+
* @hidden
|
|
11400
|
+
*/
|
|
11401
|
+
/** {en}
|
|
11402
|
+
* @brief Audio format.
|
|
11403
|
+
* @hidden
|
|
11404
|
+
*/
|
|
10615
11405
|
audioCodec: string;
|
|
11406
|
+
/** {zh}
|
|
11407
|
+
* @brief 平均下载速度。
|
|
11408
|
+
*/
|
|
11409
|
+
/** {en}
|
|
11410
|
+
* @brief Average download speed.
|
|
11411
|
+
*/
|
|
10616
11412
|
avgSpeed: number;
|
|
11413
|
+
/** {zh}
|
|
11414
|
+
* @brief 码率。
|
|
11415
|
+
*/
|
|
11416
|
+
/** {en}
|
|
11417
|
+
* @brief bitrate.
|
|
11418
|
+
*/
|
|
10617
11419
|
bitrate: number;
|
|
11420
|
+
/** {zh}
|
|
11421
|
+
* @brief 剩余缓冲时间。
|
|
11422
|
+
*/
|
|
11423
|
+
/** {en}
|
|
11424
|
+
* @brief Remaining buffer time.
|
|
11425
|
+
*/
|
|
10618
11426
|
bufferEnd: number;
|
|
11427
|
+
/** {zh}
|
|
11428
|
+
* @hidden
|
|
11429
|
+
*/
|
|
11430
|
+
/** {en}
|
|
11431
|
+
* @hidden
|
|
11432
|
+
*/
|
|
10619
11433
|
channelCount: number;
|
|
11434
|
+
/** {zh}
|
|
11435
|
+
* @brief 当前播放时间。
|
|
11436
|
+
*/
|
|
11437
|
+
/** {en}
|
|
11438
|
+
* @brief The current playing time.
|
|
11439
|
+
*/
|
|
10620
11440
|
currentTime: number;
|
|
11441
|
+
/** {zh}
|
|
11442
|
+
* @hidden
|
|
11443
|
+
*/
|
|
11444
|
+
/** {en}
|
|
11445
|
+
* @hidden
|
|
11446
|
+
*/
|
|
10621
11447
|
decodeFps: number;
|
|
11448
|
+
/** {zh}
|
|
11449
|
+
* @hidden
|
|
11450
|
+
*/
|
|
11451
|
+
/** {en}
|
|
11452
|
+
* @hidden
|
|
11453
|
+
*/
|
|
10622
11454
|
domain: string;
|
|
11455
|
+
/** {zh}
|
|
11456
|
+
* @brief 当前下载速度。
|
|
11457
|
+
*/
|
|
11458
|
+
/** {en}
|
|
11459
|
+
* @brief Current download speed.
|
|
11460
|
+
*/
|
|
10623
11461
|
downloadSpeed: number;
|
|
11462
|
+
/** {zh}
|
|
11463
|
+
* @brief 编码方式。
|
|
11464
|
+
*/
|
|
11465
|
+
/** {en}
|
|
11466
|
+
* @brief Encoding method.
|
|
11467
|
+
*/
|
|
10624
11468
|
encodeType: string;
|
|
11469
|
+
/** {zh}
|
|
11470
|
+
* @brief 帧率。
|
|
11471
|
+
*/
|
|
11472
|
+
/** {en}
|
|
11473
|
+
* @brief Frame rate.
|
|
11474
|
+
*/
|
|
10625
11475
|
fps: number;
|
|
11476
|
+
/** {zh}
|
|
11477
|
+
* @hidden
|
|
11478
|
+
*/
|
|
11479
|
+
/** {en}
|
|
11480
|
+
* @hidden
|
|
11481
|
+
*/
|
|
10626
11482
|
gop: number;
|
|
11483
|
+
/** {zh}
|
|
11484
|
+
* @brief 视频高度。
|
|
11485
|
+
*/
|
|
11486
|
+
/** {en}
|
|
11487
|
+
* @brief Video height.
|
|
11488
|
+
*/
|
|
10627
11489
|
height: number;
|
|
11490
|
+
/** {zh}
|
|
11491
|
+
* @hidden
|
|
11492
|
+
*/
|
|
11493
|
+
/** {en}
|
|
11494
|
+
* @hidden
|
|
11495
|
+
*/
|
|
10628
11496
|
samplerate: number;
|
|
11497
|
+
/** {zh}
|
|
11498
|
+
* @brief 总共收到的字节数。
|
|
11499
|
+
*/
|
|
11500
|
+
/** {en}
|
|
11501
|
+
* @brief The total number of bytes received.
|
|
11502
|
+
*/
|
|
10629
11503
|
totalReceivedByte: number;
|
|
11504
|
+
/** {zh}
|
|
11505
|
+
* @brief 接收所有字节消耗时长。
|
|
11506
|
+
*/
|
|
11507
|
+
/** {en}
|
|
11508
|
+
* @brief The time consumed for receiving all bytes.
|
|
11509
|
+
*/
|
|
10630
11510
|
totalReceivedCost: number;
|
|
11511
|
+
/** {zh}
|
|
11512
|
+
* @hidden
|
|
11513
|
+
*/
|
|
11514
|
+
/** {en}
|
|
11515
|
+
* @hidden
|
|
11516
|
+
*/
|
|
10631
11517
|
videoCodec: string;
|
|
11518
|
+
/** {zh}
|
|
11519
|
+
* @brief 视频宽度。
|
|
11520
|
+
*/
|
|
11521
|
+
/** {en}
|
|
11522
|
+
* @brief Video wight.
|
|
11523
|
+
*/
|
|
10632
11524
|
width: number;
|
|
10633
11525
|
}
|
|
10634
11526
|
/** {zh}
|
|
@@ -10652,7 +11544,10 @@ declare namespace live {
|
|
|
10652
11544
|
*/
|
|
10653
11545
|
constructor(options: LiveVePlayerOptions);
|
|
10654
11546
|
/** {zh}
|
|
10655
|
-
* @brief
|
|
11547
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
11548
|
+
*/
|
|
11549
|
+
/** {en}
|
|
11550
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
10656
11551
|
*/
|
|
10657
11552
|
get playTime(): number;
|
|
10658
11553
|
/** {zh}
|
|
@@ -10686,49 +11581,80 @@ declare namespace live {
|
|
|
10686
11581
|
*/
|
|
10687
11582
|
closeInfoPanel(): void;
|
|
10688
11583
|
/** {zh}
|
|
10689
|
-
* @brief
|
|
11584
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
11585
|
+
*/
|
|
11586
|
+
/** {en}
|
|
11587
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
10690
11588
|
*/
|
|
10691
11589
|
openAbr(): void;
|
|
10692
11590
|
/** {zh}
|
|
10693
|
-
* @brief
|
|
11591
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
11592
|
+
*/
|
|
11593
|
+
/** {en}
|
|
11594
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
10694
11595
|
*/
|
|
10695
11596
|
closeAbr(): void;
|
|
10696
11597
|
/** {zh}
|
|
10697
|
-
* @brief 调用此方法更新 DRM
|
|
10698
|
-
|
|
11598
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
11599
|
+
*/
|
|
11600
|
+
/** {en}
|
|
11601
|
+
* @brief Use this method to update DRM configuration.
|
|
11602
|
+
* @param config
|
|
10699
11603
|
*/
|
|
10700
11604
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10701
11605
|
/** {zh}
|
|
10702
|
-
* @brief
|
|
10703
|
-
* @param options
|
|
11606
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
11607
|
+
* @param options ABR 的配置。
|
|
10704
11608
|
* @returns
|
|
10705
11609
|
*/
|
|
11610
|
+
/** {en}
|
|
11611
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
11612
|
+
* @param options Configuration of ABR.
|
|
11613
|
+
*/
|
|
10706
11614
|
switchAbr(options: {
|
|
10707
11615
|
/** {zh}
|
|
10708
|
-
* @brief 是否开启
|
|
10709
|
-
*
|
|
10710
|
-
*
|
|
11616
|
+
* @brief 是否开启 ABR 功能。
|
|
11617
|
+
* - true:开启
|
|
11618
|
+
* - false:关闭
|
|
11619
|
+
*/
|
|
11620
|
+
/** {en}
|
|
11621
|
+
* @brief Whether to enable the ABR function.
|
|
11622
|
+
* - true: Enabled ;
|
|
11623
|
+
* - false: Disabled
|
|
11624
|
+
* @default -
|
|
10711
11625
|
*/
|
|
10712
11626
|
enable: boolean;
|
|
10713
11627
|
/** {zh}
|
|
10714
|
-
* @brief
|
|
11628
|
+
* @brief 切换自适应码率直播流对应的码率。
|
|
11629
|
+
*/
|
|
11630
|
+
/** {en}
|
|
11631
|
+
* @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
|
|
10715
11632
|
*/
|
|
10716
11633
|
bitrate: number;
|
|
10717
11634
|
}): void;
|
|
10718
11635
|
/** {zh}
|
|
10719
|
-
* @brief 获取 RTM
|
|
11636
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
10720
11637
|
* @returns
|
|
10721
11638
|
*/
|
|
11639
|
+
/** {en}
|
|
11640
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
11641
|
+
*/
|
|
10722
11642
|
getRTMNetWorkInfo(): RTMNetWorkInfo;
|
|
10723
11643
|
/** {zh}
|
|
10724
|
-
* @brief 获取 RTM
|
|
11644
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
10725
11645
|
* @returns
|
|
10726
11646
|
*/
|
|
11647
|
+
/** {en}
|
|
11648
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
11649
|
+
*/
|
|
10727
11650
|
getRTMStats(): Promise<StatsSnapShoot>;
|
|
10728
11651
|
/** {zh}
|
|
10729
|
-
* @brief 获取 FLV
|
|
11652
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
10730
11653
|
* @returns
|
|
10731
11654
|
*/
|
|
11655
|
+
/** {en}
|
|
11656
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
11657
|
+
*/
|
|
10732
11658
|
getFLVStats(): FlvStats;
|
|
10733
11659
|
}
|
|
10734
11660
|
/** {zh}
|
|
@@ -10771,4 +11697,4 @@ declare namespace live {
|
|
|
10771
11697
|
*/
|
|
10772
11698
|
function createLivePlayer(options?: LiveVePlayerOptions): Promise<VePlayerLive>;
|
|
10773
11699
|
}
|
|
10774
|
-
export { Codec, DecodeType, Degradation, DynamicModule, RTMCodec, ListType, Plugin, ExposedSource, VePlayerLive, util, register, registerPlugin, createLivePlayer, isMseSupported, isSoftDecodeSupported, isRTMSupported, isRTMSupportCodec, load, POSITIONS, EN, ZH_CN, Sniffer, live };
|
|
11700
|
+
export { Codec, DecodeType, Degradation, DynamicModule, RTMCodec, ListType, Plugin, ExposedSource, VePlayerLive, util, register, registerPlugin, createLivePlayer, isMseSupported, isSoftDecodeSupported, isRTMSupported, isFLVSupported, isRTMSupportCodec, isMMSSupported, load, POSITIONS, EN, ZH_CN, Sniffer, live };
|