@volcengine/veplayer 2.5.0-rc.1 → 2.5.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.d.ts +88 -98
- package/esm/veplayer.biz.live.development.js +172 -49
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +1400 -383
- package/esm/veplayer.development.js +301 -143
- package/esm/veplayer.live.d.ts +1401 -383
- package/esm/veplayer.live.development.js +300 -142
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +88 -98
- package/esm/veplayer.vod.development.js +127 -58
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +88 -98
- package/umd/veplayer.biz.live.development.js +371 -61
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +1400 -383
- package/umd/veplayer.development.js +301 -143
- package/umd/veplayer.live.d.ts +1401 -383
- package/umd/veplayer.live.development.js +303 -142
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +88 -98
- package/umd/veplayer.vod.development.js +127 -58
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +1400 -383
- package/veplayer.live.d.ts +1401 -383
- package/veplayer.vod.d.ts +88 -98
package/umd/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}
|
|
@@ -1536,13 +1530,13 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1536
1530
|
*/
|
|
1537
1531
|
interface Fullscreen {
|
|
1538
1532
|
/** {zh}
|
|
1539
|
-
* @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90
|
|
1540
|
-
*
|
|
1541
|
-
*
|
|
1533
|
+
* @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级低于 useCssFullscreen。
|
|
1534
|
+
* - `true`:使用旋转横屏;
|
|
1535
|
+
* - `false`:不使用旋转横屏。
|
|
1542
1536
|
* @default false
|
|
1543
1537
|
*/
|
|
1544
1538
|
/** {en}
|
|
1545
|
-
* @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a
|
|
1539
|
+
* @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a lower priority than `useCssFullscreen`.
|
|
1546
1540
|
* - `true`: Enable.
|
|
1547
1541
|
* - `false`: Disable.
|
|
1548
1542
|
* @default false
|
|
@@ -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}
|
|
@@ -3899,13 +3895,13 @@ declare namespace strategy {
|
|
|
3899
3895
|
*/
|
|
3900
3896
|
interface Fullscreen {
|
|
3901
3897
|
/** {zh}
|
|
3902
|
-
* @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90
|
|
3903
|
-
*
|
|
3904
|
-
*
|
|
3898
|
+
* @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级低于 useCssFullscreen。
|
|
3899
|
+
* - `true`:使用旋转横屏;
|
|
3900
|
+
* - `false`:不使用旋转横屏。
|
|
3905
3901
|
* @default false
|
|
3906
3902
|
*/
|
|
3907
3903
|
/** {en}
|
|
3908
|
-
* @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a
|
|
3904
|
+
* @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a lower priority than `useCssFullscreen`.
|
|
3909
3905
|
* - `true`: Enable.
|
|
3910
3906
|
* - `false`: Disable.
|
|
3911
3907
|
* @default false
|
|
@@ -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>;
|
|
@@ -4179,13 +4175,6 @@ declare namespace strategy {
|
|
|
4179
4175
|
function detectCodec(url: string): Promise<"unknown" | Codec>;
|
|
4180
4176
|
function isSoftDecode(options: VePlayerBaseOptions, currentCodec?: Codec | "unknown"): Promise<boolean>;
|
|
4181
4177
|
function combineOptions<T = VePlayerBaseOptions>(strategyList: (Strategy<T> | undefined)[]): Partial<T>;
|
|
4182
|
-
const getFlvStrategy: (options: VePlayerBaseOptions) => Promise<{
|
|
4183
|
-
options?: undefined;
|
|
4184
|
-
plugins?: undefined;
|
|
4185
|
-
} | {
|
|
4186
|
-
options: Partial<VePlayerBaseOptions>;
|
|
4187
|
-
plugins: any[];
|
|
4188
|
-
}>;
|
|
4189
4178
|
const getHlsStrategy: (options: VePlayerBaseOptions) => Promise<{
|
|
4190
4179
|
options?: undefined;
|
|
4191
4180
|
plugins?: undefined;
|
|
@@ -4198,23 +4187,23 @@ declare function getStreamType(url: string): "unknown" | "hls" | "flv" | "rtm" |
|
|
|
4198
4187
|
/** {zh}
|
|
4199
4188
|
* @detail api
|
|
4200
4189
|
* @brief 当前浏览器是否支持播放编码格式。
|
|
4201
|
-
* @param codec
|
|
4202
|
-
* `Codec.H264`:
|
|
4203
|
-
* `Codec.H265`:
|
|
4190
|
+
* @param codec 编码格式,支持以下选择。
|
|
4191
|
+
* - `Codec.H264`: 检查 MSE 是否支持 H.264 编码格式。
|
|
4192
|
+
* - `Codec.H265`: 检查 MSE 是否支持 H.265 编码格式。
|
|
4204
4193
|
* @returns
|
|
4205
4194
|
*/
|
|
4206
4195
|
/** {en}
|
|
4207
4196
|
* @detail api
|
|
4208
4197
|
* @brief Checkes whether the current browser supports the specified encoding format.
|
|
4209
|
-
* @param codec
|
|
4210
|
-
* `Codec.H264`:
|
|
4211
|
-
* `Codec.H265`:
|
|
4198
|
+
* @param codec Code format supports the following options.
|
|
4199
|
+
* - `Codec.H264`: Check whether MSE supports H.264 encoding format.
|
|
4200
|
+
* - `Codec.H265`: Check whether MSE supports H.265 encoding format.
|
|
4212
4201
|
* @returns
|
|
4213
4202
|
*/
|
|
4214
4203
|
declare function isMseSupported(codec?: string): boolean;
|
|
4215
4204
|
/** {zh}
|
|
4216
4205
|
* @detail api
|
|
4217
|
-
* @brief
|
|
4206
|
+
* @brief 当前浏览器是否支持软解。
|
|
4218
4207
|
* @returns
|
|
4219
4208
|
*/
|
|
4220
4209
|
/** {en}
|
|
@@ -4223,10 +4212,32 @@ declare function isMseSupported(codec?: string): boolean;
|
|
|
4223
4212
|
* @returns
|
|
4224
4213
|
*/
|
|
4225
4214
|
declare function isSoftDecodeSupported(): Promise<boolean>;
|
|
4215
|
+
/** {zh}
|
|
4216
|
+
* @detail api
|
|
4217
|
+
* @brief 判断当前浏览器是否支持 MMS(ManagedMediaSource) API,如果支持的话可满足大部分 H.264 视频播放。
|
|
4218
|
+
* :::tip
|
|
4219
|
+
* - 当前方法无法判断是否支持 H.265 视频播放。
|
|
4220
|
+
* - 使用场景:检查 Safari 浏览器是否满足 H.264 编码流拉流要求。
|
|
4221
|
+
* - Safari 17.1 以上版本浏览器开始支持 MMS。
|
|
4222
|
+
* :::
|
|
4223
|
+
* @returns
|
|
4224
|
+
*/
|
|
4225
|
+
/** {en}
|
|
4226
|
+
* @detail api
|
|
4227
|
+
* @returns
|
|
4228
|
+
* @brief Determine whether the current browser supports the MMS (ManagedMediaSource) API, if so, it can meet most of the H.264 playback.
|
|
4229
|
+
* :::tip
|
|
4230
|
+
* - The current method cannot determine whether H.265 video playback is supported.
|
|
4231
|
+
* - Usage scenario: Check whether Safari browser meets the requirements for pulling H.264 encoded streams.
|
|
4232
|
+
* - Browsers with iOS 17.1 or above start to support MMS.
|
|
4233
|
+
* :::
|
|
4234
|
+
*/
|
|
4235
|
+
declare function isMMSSupported(codec?: string): any;
|
|
4226
4236
|
declare const util: {
|
|
4227
4237
|
getStreamType: typeof getStreamType;
|
|
4228
4238
|
isMseSupported: typeof isMseSupported;
|
|
4229
4239
|
isSoftDecodeSupported: typeof isSoftDecodeSupported;
|
|
4240
|
+
isMMSSupported: typeof isMMSSupported;
|
|
4230
4241
|
appendSearchParams: (url?: string | undefined, searchParams?: Record<string, string> | undefined) => string;
|
|
4231
4242
|
getUrlObject: (url?: string | undefined) => URL | undefined;
|
|
4232
4243
|
createDom(el?: string | undefined, tpl?: string | undefined, attrs?: {
|
|
@@ -4448,14 +4459,15 @@ declare namespace error {
|
|
|
4448
4459
|
}
|
|
4449
4460
|
/** {zh}
|
|
4450
4461
|
* @detail error
|
|
4462
|
+
* @brief 错误等级。
|
|
4451
4463
|
*/
|
|
4452
4464
|
/** {en}
|
|
4453
4465
|
* @detail error
|
|
4466
|
+
* @brief Error level.
|
|
4454
4467
|
*/
|
|
4455
4468
|
enum Level {
|
|
4456
4469
|
/** {zh}
|
|
4457
|
-
* @brief
|
|
4458
|
-
*
|
|
4470
|
+
* @brief 严重。
|
|
4459
4471
|
*/
|
|
4460
4472
|
/** {en}
|
|
4461
4473
|
* @brief Fatal.
|
|
@@ -4463,7 +4475,7 @@ declare namespace error {
|
|
|
4463
4475
|
*/
|
|
4464
4476
|
Fatal = "Fatal",
|
|
4465
4477
|
/** {zh}
|
|
4466
|
-
* @brief
|
|
4478
|
+
* @brief 报错。
|
|
4467
4479
|
*/
|
|
4468
4480
|
/** {en}
|
|
4469
4481
|
* @brief Error.
|
|
@@ -4831,7 +4843,7 @@ declare namespace error {
|
|
|
4831
4843
|
/** {zh}
|
|
4832
4844
|
* @list error
|
|
4833
4845
|
* @detail error
|
|
4834
|
-
* @brief
|
|
4846
|
+
* @brief 错误对象。
|
|
4835
4847
|
* @name VeError
|
|
4836
4848
|
* @id VeError
|
|
4837
4849
|
*/
|
|
@@ -4843,11 +4855,11 @@ declare namespace error {
|
|
|
4843
4855
|
* @id VeError
|
|
4844
4856
|
*/
|
|
4845
4857
|
class VeError<T extends string = TextKey> extends Error {
|
|
4846
|
-
/**
|
|
4858
|
+
/** {zh}
|
|
4847
4859
|
* @brief 错误码。
|
|
4848
4860
|
*/
|
|
4849
4861
|
/** {en}
|
|
4850
|
-
* @brief
|
|
4862
|
+
* @brief Error code.
|
|
4851
4863
|
*/
|
|
4852
4864
|
readonly errorCode: ErrorCode;
|
|
4853
4865
|
/** {zh}
|
|
@@ -5176,7 +5188,7 @@ interface LoggerConfig {
|
|
|
5176
5188
|
/** {en}
|
|
5177
5189
|
* @brief The SDK application ID. You can access it by logging in to the BytePlus MediaLive console and navigating to [SDK Management](https://console.byteplus.com/live/main/sdk).
|
|
5178
5190
|
*/
|
|
5179
|
-
appId
|
|
5191
|
+
appId?: string;
|
|
5180
5192
|
/** {zh}
|
|
5181
5193
|
* @brief 应用名称。
|
|
5182
5194
|
* @default 无
|
|
@@ -5234,60 +5246,52 @@ interface LoggerConfig {
|
|
|
5234
5246
|
interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
5235
5247
|
/** {zh}
|
|
5236
5248
|
* @brief 为播放器设置 RTM 拉流配置。
|
|
5237
|
-
* @default -
|
|
5238
5249
|
*/
|
|
5239
5250
|
/** {en}
|
|
5240
5251
|
* @brief Configurations for playing an RTM stream.
|
|
5241
|
-
* @default -
|
|
5242
5252
|
*/
|
|
5243
5253
|
rtm?: Rtm;
|
|
5244
5254
|
/** {zh}
|
|
5245
|
-
* @brief 为播放器设置 FLV 拉流配置。
|
|
5246
|
-
* @
|
|
5255
|
+
* @brief 为播放器设置 FLV 拉流配置。
|
|
5256
|
+
* @listtip FLV 拉流格式流相关配置适用于支持 MSE 播放的 PC 端浏览器、安卓端浏览器和支持 MMS API 的 iOS 浏览器。
|
|
5247
5257
|
*/
|
|
5248
5258
|
/** {en}
|
|
5249
|
-
* @brief Configurations for playing an FLV stream.
|
|
5250
|
-
* @
|
|
5259
|
+
* @brief Configurations for playing an FLV stream.
|
|
5260
|
+
* @listtip FLV pull stream format stream configurations are applicable to PC browsers, Android browsers that support MSE playback, and iOS browsers that support MMS API.
|
|
5251
5261
|
*/
|
|
5252
5262
|
flv?: Flv;
|
|
5253
5263
|
/** {zh}
|
|
5254
|
-
* @brief 为播放器设置 HLS 拉流配置。
|
|
5255
|
-
* @listtip
|
|
5256
|
-
*
|
|
5257
|
-
*
|
|
5264
|
+
* @brief 为播放器设置 HLS 拉流配置。
|
|
5265
|
+
* @listtip - HLS 格式流相关配置仅适用于支持 MSE API的 PC 端浏览器和安卓端浏览器。
|
|
5266
|
+
* - PC 端该配置默认生效;
|
|
5267
|
+
* - 移动端仅在 `enableMSE` 设置为 `true` 且支持 MSE 的浏览器中生效。
|
|
5258
5268
|
*/
|
|
5259
5269
|
/** {en}
|
|
5260
|
-
* @brief
|
|
5261
|
-
* @listtip
|
|
5262
|
-
*
|
|
5263
|
-
*
|
|
5270
|
+
* @brief Configurations for playing an HLS stream.
|
|
5271
|
+
* @listtip - The HLS format stream configuration is only applicable to PC browsers and Android browsers that support the MSE API.
|
|
5272
|
+
* - This configuration takes effect by default on PC;
|
|
5273
|
+
* - For mobile devices, the configuration takes effect only when `enableMSE` is set to `true` for the browser.
|
|
5264
5274
|
*/
|
|
5265
5275
|
hls?: Hls;
|
|
5266
5276
|
/** {zh}
|
|
5267
5277
|
* @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
|
|
5268
|
-
* @default -
|
|
5269
5278
|
*/
|
|
5270
5279
|
/** {en}
|
|
5271
5280
|
* @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
5281
|
*/
|
|
5274
5282
|
infoPanel?: InfoPanelConfig;
|
|
5275
5283
|
/** {zh}
|
|
5276
5284
|
* @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
|
|
5277
|
-
* @default -
|
|
5278
5285
|
*/
|
|
5279
5286
|
/** {en}
|
|
5280
5287
|
* @brief Configurations for time shifting.
|
|
5281
|
-
* @default -
|
|
5282
5288
|
*/
|
|
5283
5289
|
timeShift?: TimeShiftConfig;
|
|
5284
5290
|
/** {zh}
|
|
5285
5291
|
* @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
|
|
5286
|
-
* @default -
|
|
5287
5292
|
*/
|
|
5288
5293
|
/** {en}
|
|
5289
5294
|
* @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
|
|
5290
|
-
* @default -
|
|
5291
5295
|
*/
|
|
5292
5296
|
logger?: LoggerConfig;
|
|
5293
5297
|
/** {zh}
|
|
@@ -5307,13 +5311,10 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5307
5311
|
*/
|
|
5308
5312
|
icons?: any;
|
|
5309
5313
|
/** {zh}
|
|
5310
|
-
* @hidden
|
|
5311
5314
|
* @brief 商业 DRM 播放配置。
|
|
5312
|
-
* @default -
|
|
5313
5315
|
*/
|
|
5314
5316
|
/** {en}
|
|
5315
5317
|
* @brief Digital Rights Management (DRM) configurations.
|
|
5316
|
-
* @default -
|
|
5317
5318
|
*/
|
|
5318
5319
|
drm?: Drm;
|
|
5319
5320
|
}
|
|
@@ -5327,31 +5328,56 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5327
5328
|
*/
|
|
5328
5329
|
interface Abr {
|
|
5329
5330
|
/** {zh}
|
|
5330
|
-
* @brief 是否开启
|
|
5331
|
-
*
|
|
5332
|
-
*
|
|
5331
|
+
* @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
|
|
5332
|
+
* - `true`: 开启;
|
|
5333
|
+
* - `false`: 关闭。
|
|
5333
5334
|
* @default true
|
|
5334
5335
|
*/
|
|
5336
|
+
/** {en}
|
|
5337
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
5338
|
+
* - `true`: Enable;
|
|
5339
|
+
* - `false`: Disable.
|
|
5340
|
+
*/
|
|
5335
5341
|
enable?: boolean;
|
|
5336
5342
|
/** {zh}
|
|
5337
|
-
* @brief 未开启
|
|
5338
|
-
*
|
|
5339
|
-
*
|
|
5343
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
5344
|
+
* - true: 开启;
|
|
5345
|
+
* - false: 关闭。
|
|
5340
5346
|
* @default false
|
|
5347
|
+
* @hidden
|
|
5348
|
+
*/
|
|
5349
|
+
/** {en}
|
|
5350
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
5351
|
+
* - true: Enable;
|
|
5352
|
+
* - false: Disable.
|
|
5353
|
+
* @hidden
|
|
5341
5354
|
*/
|
|
5342
5355
|
downTip?: boolean;
|
|
5343
5356
|
/** {zh}
|
|
5344
|
-
* @brief
|
|
5345
|
-
*
|
|
5346
|
-
*
|
|
5357
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
5358
|
+
* - `true`: 开启;
|
|
5359
|
+
* - `false`: 关闭。
|
|
5360
|
+
* @default false
|
|
5361
|
+
*/
|
|
5362
|
+
/** {en}
|
|
5363
|
+
* @brief Whether to start debug mode, default is false.
|
|
5364
|
+
* - `true`: Enable,
|
|
5365
|
+
* - `false`: Disable.
|
|
5366
|
+
* @default false
|
|
5347
5367
|
*/
|
|
5348
5368
|
debug?: boolean;
|
|
5349
5369
|
/** {zh}
|
|
5350
|
-
* @brief
|
|
5370
|
+
* @brief 当前拉流地址 URL 对应的码率。
|
|
5371
|
+
*/
|
|
5372
|
+
/** {en}
|
|
5373
|
+
* @brief The bitrate corresponding to the current pull-stream address URL.
|
|
5351
5374
|
*/
|
|
5352
5375
|
bitrate?: number;
|
|
5353
5376
|
/** {zh}
|
|
5354
|
-
* @brief
|
|
5377
|
+
* @brief 自适应码率流信息。
|
|
5378
|
+
*/
|
|
5379
|
+
/** {en}
|
|
5380
|
+
* @brief Adaptive bitrate (ABR) stream information.
|
|
5355
5381
|
*/
|
|
5356
5382
|
urls?: {
|
|
5357
5383
|
[bitrate: number]: string;
|
|
@@ -5360,35 +5386,53 @@ interface Abr {
|
|
|
5360
5386
|
/** {zh}
|
|
5361
5387
|
* @list option
|
|
5362
5388
|
* @kind property
|
|
5389
|
+
* @hidden
|
|
5363
5390
|
*/
|
|
5364
5391
|
/** {en}
|
|
5365
5392
|
* @list option
|
|
5366
5393
|
* @kind property
|
|
5394
|
+
* @hidden
|
|
5367
5395
|
*/
|
|
5368
5396
|
interface HlsAbr {
|
|
5369
5397
|
/** {zh}
|
|
5370
|
-
* @brief 是否开启
|
|
5371
|
-
*
|
|
5372
|
-
*
|
|
5398
|
+
* @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
|
|
5399
|
+
* - true: 开启;
|
|
5400
|
+
* - false: 关闭。
|
|
5373
5401
|
* @default true
|
|
5374
5402
|
*/
|
|
5403
|
+
/** {en}
|
|
5404
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
5405
|
+
* - true: Enable;
|
|
5406
|
+
* - false: Disable.
|
|
5407
|
+
*/
|
|
5375
5408
|
enable?: boolean;
|
|
5376
5409
|
/** {zh}
|
|
5377
|
-
* @brief 未开启
|
|
5378
|
-
*
|
|
5379
|
-
*
|
|
5410
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
5411
|
+
* - true: 开启;
|
|
5412
|
+
* - false: 关闭。
|
|
5380
5413
|
* @default false
|
|
5381
5414
|
*/
|
|
5415
|
+
/** {en}
|
|
5416
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
5417
|
+
* - true: Enable;
|
|
5418
|
+
* - false: Disable.
|
|
5419
|
+
*/
|
|
5382
5420
|
downTip?: boolean;
|
|
5383
5421
|
/** {zh}
|
|
5384
|
-
* @brief
|
|
5385
|
-
*
|
|
5386
|
-
*
|
|
5422
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
5423
|
+
* - true: 开启;
|
|
5424
|
+
* - false: 关闭。
|
|
5425
|
+
* @default false
|
|
5426
|
+
*/
|
|
5427
|
+
/** {en}
|
|
5428
|
+
* @brief Whether to start debug mode, default is false.
|
|
5429
|
+
* - true: Enable,
|
|
5430
|
+
* - false: Disable.
|
|
5431
|
+
* @default false
|
|
5387
5432
|
*/
|
|
5388
5433
|
debug?: boolean;
|
|
5389
5434
|
}
|
|
5390
5435
|
/** {zh}
|
|
5391
|
-
* @hidden
|
|
5392
5436
|
* @list option
|
|
5393
5437
|
* @kind property
|
|
5394
5438
|
*/
|
|
@@ -5398,15 +5442,14 @@ interface HlsAbr {
|
|
|
5398
5442
|
*/
|
|
5399
5443
|
interface Drm {
|
|
5400
5444
|
/** {zh}
|
|
5401
|
-
* @brief FairPlay DRM
|
|
5445
|
+
* @brief FairPlay DRM 配置。
|
|
5402
5446
|
*/
|
|
5403
5447
|
/** {en}
|
|
5404
|
-
* @brief FairPlay DRM configurations
|
|
5448
|
+
* @brief FairPlay DRM configurations.
|
|
5405
5449
|
*/
|
|
5406
5450
|
fairplay?: FairplayDrm;
|
|
5407
5451
|
}
|
|
5408
5452
|
/** {zh}
|
|
5409
|
-
* @hidden
|
|
5410
5453
|
* @list option
|
|
5411
5454
|
* @kind property
|
|
5412
5455
|
*/
|
|
@@ -5416,7 +5459,6 @@ interface Drm {
|
|
|
5416
5459
|
*/
|
|
5417
5460
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
5418
5461
|
/** {zh}
|
|
5419
|
-
* @hidden
|
|
5420
5462
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
5421
5463
|
* @param config
|
|
5422
5464
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -5431,7 +5473,6 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5431
5473
|
}) => Promise<FairplayDrmConfig>;
|
|
5432
5474
|
}
|
|
5433
5475
|
/** {zh}
|
|
5434
|
-
* @hidden
|
|
5435
5476
|
* @list option
|
|
5436
5477
|
* @kind property
|
|
5437
5478
|
*/
|
|
@@ -5441,17 +5482,17 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5441
5482
|
*/
|
|
5442
5483
|
interface FairplayDrmConfig {
|
|
5443
5484
|
/** {zh}
|
|
5444
|
-
* @brief
|
|
5485
|
+
* @brief 获取证书的请求地址。
|
|
5445
5486
|
*/
|
|
5446
5487
|
/** {en}
|
|
5447
|
-
* @brief URL used to acquire the FairPlay certificate
|
|
5488
|
+
* @brief URL used to acquire the FairPlay certificate.
|
|
5448
5489
|
*/
|
|
5449
5490
|
serverCertificatePath?: string;
|
|
5450
5491
|
/** {zh}
|
|
5451
|
-
* @brief
|
|
5492
|
+
* @brief 获取内容密钥许可证的请求地址。
|
|
5452
5493
|
*/
|
|
5453
5494
|
/** {en}
|
|
5454
|
-
* @brief URL used to acquire the DRM license
|
|
5495
|
+
* @brief URL used to acquire the DRM license.
|
|
5455
5496
|
*/
|
|
5456
5497
|
serverProcessSPCPath?: string;
|
|
5457
5498
|
}
|
|
@@ -5559,26 +5600,62 @@ interface Rtm {
|
|
|
5559
5600
|
retryDelay?: number;
|
|
5560
5601
|
/** {zh}
|
|
5561
5602
|
* @brief 播放器发起 RTM 拉流请求时,是否开启自动转码。
|
|
5562
|
-
*
|
|
5563
|
-
*
|
|
5603
|
+
* - `true`:开启;
|
|
5604
|
+
* - `false`:关闭。
|
|
5564
5605
|
* @listtip
|
|
5565
5606
|
* 如有使用 RTM 拉流自动转码的需求,请先创建工单联系[技术支持](https://console.volcengine.com/workorder/create?step=2&SubProductID=P00000076)进行配置。
|
|
5566
5607
|
* @default false
|
|
5567
5608
|
*/
|
|
5568
5609
|
/** {en}
|
|
5569
5610
|
* @brief Whether to enable automatic transcoding when the player requests to pull an RTM stream.
|
|
5570
|
-
*
|
|
5571
|
-
*
|
|
5611
|
+
* - `true`: Enable;
|
|
5612
|
+
* - `false`: Disable.
|
|
5572
5613
|
* @listtip
|
|
5573
5614
|
* If you want to use the automatic transcoding feature when playing an RTM stream, contact your [technical support](https://www.byteplus.com/en/support).
|
|
5574
5615
|
* @default false
|
|
5575
5616
|
*/
|
|
5576
5617
|
enableRTMAutoTranscode?: boolean;
|
|
5577
5618
|
/** {zh}
|
|
5578
|
-
* @brief
|
|
5619
|
+
* @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
|
|
5579
5620
|
* @default 1000
|
|
5580
5621
|
*/
|
|
5622
|
+
/** {en}
|
|
5623
|
+
* @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.
|
|
5624
|
+
*/
|
|
5581
5625
|
networkEvaluateInterval?: number;
|
|
5626
|
+
/** {zh}
|
|
5627
|
+
* @brief 暂停后重新拉流的处理方式是否为无缝替换。
|
|
5628
|
+
* - `true`:是,重新拉流期间不会出现黑屏现象。
|
|
5629
|
+
* - `false`:否,重新拉流期间会出现黑屏现象。
|
|
5630
|
+
* @default false
|
|
5631
|
+
* @listtip Safari 浏览器在进行 RTM 拉流时不支持使用此配置。
|
|
5632
|
+
*/
|
|
5633
|
+
/** {en}
|
|
5634
|
+
* @brief Whether the processing method for re-pulling the stream after pausing is seamless replacement.
|
|
5635
|
+
* - `true`: Yes, there will be no black screen phenomenon during re-pulling the stream.
|
|
5636
|
+
* - `false`: No, there will be a black screen phenomenon during re-pulling the stream.
|
|
5637
|
+
* :::tip
|
|
5638
|
+
* Safari browsers do not support using this configuration when performing RTM stream pulling.
|
|
5639
|
+
* :::
|
|
5640
|
+
* @default false
|
|
5641
|
+
*/
|
|
5642
|
+
seamlesslyReload?: boolean;
|
|
5643
|
+
/** {zh}
|
|
5644
|
+
* @brief 暂停播放后的断联时间,单位为秒,默认不断联。
|
|
5645
|
+
* @listtip Safari 浏览器在进行 RTM 拉流时,如果出现断联,重新拉流时会出现短暂黑屏或加载情况。
|
|
5646
|
+
*/
|
|
5647
|
+
/** {en}
|
|
5648
|
+
* @brief The disconnection time after pausing playback is in seconds. By default, there is no disconnection.
|
|
5649
|
+
* @listtip When Safari browser performs RTM streaming, if there is a disconnection, there will be a short black screen or loading situation when re-streaming.
|
|
5650
|
+
*/
|
|
5651
|
+
disconnectTime?: number;
|
|
5652
|
+
/** {zh}
|
|
5653
|
+
* @hidden
|
|
5654
|
+
*/
|
|
5655
|
+
/** {en}
|
|
5656
|
+
* @hidden
|
|
5657
|
+
*/
|
|
5658
|
+
enableOriginSdpLogger?: boolean;
|
|
5582
5659
|
}
|
|
5583
5660
|
/** {zh}
|
|
5584
5661
|
* @list option
|
|
@@ -5618,40 +5695,68 @@ interface Flv {
|
|
|
5618
5695
|
loadTimeout?: number;
|
|
5619
5696
|
/** {zh}
|
|
5620
5697
|
* @brief 播放器发起 FLV 拉流请求时,是否开启低延时。例如,当您开启低延时且推流端 GOP 设置为 2s 的情况下,FLV 拉流平均端到端延时约为 2s。
|
|
5621
|
-
*
|
|
5622
|
-
*
|
|
5698
|
+
* - `true`:开启;
|
|
5699
|
+
* - `false`:关闭
|
|
5623
5700
|
* @default false
|
|
5624
5701
|
*/
|
|
5625
5702
|
/** {en}
|
|
5626
5703
|
* @brief Whether to enable low latency when playing an FLV address. For example, if you have enabled low latency, and set GOP to 2 seconds, the average latency will be around 2 seconds.
|
|
5627
|
-
*
|
|
5628
|
-
*
|
|
5704
|
+
* - `true`: Enable;
|
|
5705
|
+
* - `false`: Disable.
|
|
5629
5706
|
* @default false
|
|
5630
5707
|
*/
|
|
5631
5708
|
enableLowLatency?: boolean;
|
|
5632
5709
|
/** {zh}
|
|
5633
|
-
* @brief
|
|
5634
|
-
* @default -
|
|
5710
|
+
* @brief 低延时的详细配置。
|
|
5635
5711
|
*/
|
|
5636
5712
|
/** {en}
|
|
5637
|
-
* @brief
|
|
5638
|
-
* @default -
|
|
5713
|
+
* @brief Detailed configuration for low latency.
|
|
5639
5714
|
*/
|
|
5640
5715
|
lowLatency?: LowLatency;
|
|
5641
5716
|
/** {zh}
|
|
5642
|
-
* @brief 为播放器设置 FLV
|
|
5643
|
-
|
|
5717
|
+
* @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
|
|
5718
|
+
*/
|
|
5719
|
+
/** {en}
|
|
5720
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
|
|
5644
5721
|
*/
|
|
5645
5722
|
abr?: Abr;
|
|
5646
5723
|
/** {zh}
|
|
5647
5724
|
* @hidden
|
|
5648
5725
|
*/
|
|
5726
|
+
/** {en}
|
|
5727
|
+
* @hidden
|
|
5728
|
+
*/
|
|
5649
5729
|
mseLowLatency?: boolean;
|
|
5650
5730
|
/** {zh}
|
|
5651
|
-
* @brief
|
|
5652
|
-
* @default
|
|
5731
|
+
* @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
|
|
5732
|
+
* @default 5000
|
|
5733
|
+
*/
|
|
5734
|
+
/** {en}
|
|
5735
|
+
* @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
5736
|
*/
|
|
5654
5737
|
maxReaderInterval?: number;
|
|
5738
|
+
/** {zh}
|
|
5739
|
+
* @brief 暂停播放后的断联时间,单位为秒,默认值为 0,表示暂停播放后立即断联。
|
|
5740
|
+
* @default 0
|
|
5741
|
+
*/
|
|
5742
|
+
/** {en}
|
|
5743
|
+
* @brief The disconnection time after pausing playback is in seconds. The default value is 0, indicating immediate disconnection after pausing playback.
|
|
5744
|
+
* @default 0
|
|
5745
|
+
*/
|
|
5746
|
+
disconnectTime?: number;
|
|
5747
|
+
/** {zh}
|
|
5748
|
+
* @brief 暂停后重新拉流的处理方式是否为无缝替换。
|
|
5749
|
+
* - `true`:是,重新拉流期间不会出现黑屏现象。
|
|
5750
|
+
* - `false`:否,重新拉流期间会出现黑屏现象。
|
|
5751
|
+
* @default false
|
|
5752
|
+
*/
|
|
5753
|
+
/** {en}
|
|
5754
|
+
* @brief Whether the processing method for re-pulling the stream after pausing is seamless replacement.
|
|
5755
|
+
* - `true`: Yes, there will be no black screen phenomenon during re-pulling the stream.
|
|
5756
|
+
* - `false`: No, there will be a black screen phenomenon during re-pulling the stream.
|
|
5757
|
+
* @default false
|
|
5758
|
+
*/
|
|
5759
|
+
seamlesslyReload?: boolean;
|
|
5655
5760
|
}
|
|
5656
5761
|
/** {zh}
|
|
5657
5762
|
* @list option
|
|
@@ -5670,15 +5775,15 @@ interface LowLatency {
|
|
|
5670
5775
|
*/
|
|
5671
5776
|
abrPts?: string | number;
|
|
5672
5777
|
/** {zh}
|
|
5673
|
-
* @brief FLV
|
|
5674
|
-
*
|
|
5675
|
-
*
|
|
5778
|
+
* @brief FLV 低延时模式下,是否开启倍速追帧。
|
|
5779
|
+
* - `true`:开启;
|
|
5780
|
+
* - `false`:关闭。
|
|
5676
5781
|
* @default true
|
|
5677
5782
|
*/
|
|
5678
5783
|
/** {en}
|
|
5679
|
-
* @brief
|
|
5680
|
-
*
|
|
5681
|
-
*
|
|
5784
|
+
* @brief Whether to enable speed-up frame chasing in FLV low latency mode.
|
|
5785
|
+
* - `true`: enabled;
|
|
5786
|
+
* - `false`: disabled.
|
|
5682
5787
|
* @default true
|
|
5683
5788
|
*/
|
|
5684
5789
|
enableFrameChasing?: boolean;
|
|
@@ -5733,8 +5838,12 @@ interface Hls {
|
|
|
5733
5838
|
*/
|
|
5734
5839
|
enableMSE?: boolean;
|
|
5735
5840
|
/** {zh}
|
|
5736
|
-
* @brief 为播放器设置 HLS
|
|
5737
|
-
* @
|
|
5841
|
+
* @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
|
|
5842
|
+
* @hidden
|
|
5843
|
+
*/
|
|
5844
|
+
/** {en}
|
|
5845
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
|
|
5846
|
+
* @hidden
|
|
5738
5847
|
*/
|
|
5739
5848
|
abr?: HlsAbr;
|
|
5740
5849
|
/**
|
|
@@ -5742,83 +5851,415 @@ interface Hls {
|
|
|
5742
5851
|
*/
|
|
5743
5852
|
mseLowLatency?: boolean;
|
|
5744
5853
|
}
|
|
5854
|
+
/** {zh}
|
|
5855
|
+
* @list option
|
|
5856
|
+
* @kind property
|
|
5857
|
+
* @brief 在 RTM 拉流场景下,获取到的网络情况。
|
|
5858
|
+
*/
|
|
5859
|
+
/** {en}
|
|
5860
|
+
* @list option
|
|
5861
|
+
* @kind property
|
|
5862
|
+
* @brief Network conditions obtained in the RTM pull stream scenario.
|
|
5863
|
+
*/
|
|
5745
5864
|
interface RTMNetWorkInfo {
|
|
5746
5865
|
/** {zh}
|
|
5747
|
-
* @brief
|
|
5866
|
+
* @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
|
|
5867
|
+
*/
|
|
5868
|
+
/** {en}
|
|
5869
|
+
* @brief The download speed within the latest network evaluation period, in units of bps.
|
|
5748
5870
|
*/
|
|
5749
5871
|
speed?: number;
|
|
5750
5872
|
/** {zh}
|
|
5751
|
-
* @brief
|
|
5873
|
+
* @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
|
|
5874
|
+
*/
|
|
5875
|
+
/** {en}
|
|
5876
|
+
* @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
|
|
5752
5877
|
*/
|
|
5753
5878
|
avgSpeed?: number;
|
|
5754
5879
|
/** {zh}
|
|
5755
|
-
* @brief
|
|
5880
|
+
* @brief 最近一次网络评估周期内的网络丢包率。
|
|
5881
|
+
*/
|
|
5882
|
+
/** {en}
|
|
5883
|
+
* @brief The packet loss rate of the network within the latest network evaluation cycle.
|
|
5756
5884
|
*/
|
|
5757
5885
|
lostRate?: number;
|
|
5758
5886
|
/** {zh}
|
|
5759
|
-
* @brief
|
|
5887
|
+
* @brief 最近 5 次网络评估周期内的网络丢包率平均值。
|
|
5888
|
+
*/
|
|
5889
|
+
/** {en}
|
|
5890
|
+
* @brief The average network packet loss rate within the recent 5 network evaluation cycles.
|
|
5760
5891
|
*/
|
|
5761
5892
|
avgLostRate?: number;
|
|
5762
5893
|
}
|
|
5763
5894
|
/** {zh}
|
|
5764
|
-
* @
|
|
5895
|
+
* @list option
|
|
5896
|
+
* @kind property
|
|
5897
|
+
* @brief RTM 直播流播放信息。
|
|
5898
|
+
*/
|
|
5899
|
+
/** {en}
|
|
5900
|
+
* @list option
|
|
5901
|
+
* @kind property
|
|
5902
|
+
* @brief RTM live stream information.
|
|
5765
5903
|
*/
|
|
5766
5904
|
interface StatsSnapShoot {
|
|
5905
|
+
/** {en}
|
|
5906
|
+
* @brief Video information.
|
|
5907
|
+
*/
|
|
5908
|
+
/** {zh}
|
|
5909
|
+
* @brief 视频信息。
|
|
5910
|
+
*/
|
|
5767
5911
|
video?: {
|
|
5912
|
+
/** {zh}
|
|
5913
|
+
* @hidden
|
|
5914
|
+
*/
|
|
5915
|
+
/** {en}
|
|
5916
|
+
* @hidden
|
|
5917
|
+
*/
|
|
5768
5918
|
codec: string;
|
|
5919
|
+
/** {zh}
|
|
5920
|
+
* @hidden
|
|
5921
|
+
*/
|
|
5922
|
+
/** {en}
|
|
5923
|
+
* @hidden
|
|
5924
|
+
*/
|
|
5769
5925
|
payloadType: string;
|
|
5926
|
+
/** {zh}
|
|
5927
|
+
* @hidden
|
|
5928
|
+
*/
|
|
5929
|
+
/** {en}
|
|
5930
|
+
* @hidden
|
|
5931
|
+
*/
|
|
5770
5932
|
sdpFmtpLine: string;
|
|
5933
|
+
/** {zh}
|
|
5934
|
+
* @hidden
|
|
5935
|
+
*/
|
|
5936
|
+
/** {en}
|
|
5937
|
+
* @hidden
|
|
5938
|
+
*/
|
|
5771
5939
|
bytesReceived: number;
|
|
5940
|
+
/** {zh}
|
|
5941
|
+
* @hidden
|
|
5942
|
+
*/
|
|
5943
|
+
/** {en}
|
|
5944
|
+
* @hidden
|
|
5945
|
+
*/
|
|
5772
5946
|
firCount: number;
|
|
5947
|
+
/** {zh}
|
|
5948
|
+
* @hidden
|
|
5949
|
+
*/
|
|
5950
|
+
/** {en}
|
|
5951
|
+
* @hidden
|
|
5952
|
+
*/
|
|
5773
5953
|
pliCount: number;
|
|
5954
|
+
/** {zh}
|
|
5955
|
+
* @brief 视频高度
|
|
5956
|
+
*/
|
|
5957
|
+
/** {en}
|
|
5958
|
+
* @brief 视频高度
|
|
5959
|
+
*/
|
|
5774
5960
|
frameHeight: number;
|
|
5961
|
+
/** {zh}
|
|
5962
|
+
* @brief 视频宽度
|
|
5963
|
+
*/
|
|
5964
|
+
/** {en}
|
|
5965
|
+
* @brief 视频宽度
|
|
5966
|
+
*/
|
|
5775
5967
|
frameWidth: number;
|
|
5968
|
+
/** {zh}
|
|
5969
|
+
* @hidden
|
|
5970
|
+
*/
|
|
5971
|
+
/** {en}
|
|
5972
|
+
* @hidden
|
|
5973
|
+
*/
|
|
5776
5974
|
framesDecoded: number;
|
|
5975
|
+
/** {zh}
|
|
5976
|
+
* @hidden
|
|
5977
|
+
*/
|
|
5978
|
+
/** {en}
|
|
5979
|
+
* @hidden
|
|
5980
|
+
*/
|
|
5777
5981
|
framesDropped: number;
|
|
5982
|
+
/** {zh}
|
|
5983
|
+
* @brief 视频帧率
|
|
5984
|
+
*/
|
|
5985
|
+
/** {en}
|
|
5986
|
+
* @brief 视频帧率
|
|
5987
|
+
*/
|
|
5778
5988
|
framesPerSecond: number;
|
|
5989
|
+
/** {zh}
|
|
5990
|
+
* @hidden
|
|
5991
|
+
*/
|
|
5992
|
+
/** {en}
|
|
5993
|
+
* @hidden
|
|
5994
|
+
*/
|
|
5779
5995
|
framesReceived: number;
|
|
5996
|
+
/** {zh}
|
|
5997
|
+
* @hidden
|
|
5998
|
+
*/
|
|
5999
|
+
/** {en}
|
|
6000
|
+
* @hidden
|
|
6001
|
+
*/
|
|
5780
6002
|
jitter: number;
|
|
6003
|
+
/** {zh}
|
|
6004
|
+
* @hidden
|
|
6005
|
+
*/
|
|
6006
|
+
/** {en}
|
|
6007
|
+
* @hidden
|
|
6008
|
+
*/
|
|
5781
6009
|
jitterBufferDelay: number;
|
|
6010
|
+
/** {zh}
|
|
6011
|
+
* @hidden
|
|
6012
|
+
*/
|
|
6013
|
+
/** {en}
|
|
6014
|
+
* @hidden
|
|
6015
|
+
*/
|
|
5782
6016
|
keyFramesDecoded: number;
|
|
6017
|
+
/** {zh}
|
|
6018
|
+
* @hidden
|
|
6019
|
+
*/
|
|
6020
|
+
/** {en}
|
|
6021
|
+
* @hidden
|
|
6022
|
+
*/
|
|
5783
6023
|
nackCount: number;
|
|
6024
|
+
/** {zh}
|
|
6025
|
+
* @brief 视频丢包总数
|
|
6026
|
+
*/
|
|
6027
|
+
/** {en}
|
|
6028
|
+
* @brief 视频丢包总数
|
|
6029
|
+
*/
|
|
5784
6030
|
packetsLost: number;
|
|
6031
|
+
/** {zh}
|
|
6032
|
+
* @brief 视频收包总数
|
|
6033
|
+
*/
|
|
6034
|
+
/** {en}
|
|
6035
|
+
* @brief 视频收包总数
|
|
6036
|
+
*/
|
|
5785
6037
|
packetsReceived: number;
|
|
5786
6038
|
};
|
|
6039
|
+
/** {en}
|
|
6040
|
+
* @brief Audio information.
|
|
6041
|
+
*/
|
|
6042
|
+
/** {zh}
|
|
6043
|
+
* @brief 音频信息。
|
|
6044
|
+
*/
|
|
5787
6045
|
audio?: {
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
6046
|
+
/** {zh}
|
|
6047
|
+
* @hidden
|
|
6048
|
+
*/
|
|
6049
|
+
/** {en}
|
|
6050
|
+
* @hidden
|
|
6051
|
+
*/
|
|
6052
|
+
codec: string;
|
|
6053
|
+
/** {zh}
|
|
6054
|
+
* @hidden
|
|
6055
|
+
*/
|
|
6056
|
+
/** {en}
|
|
6057
|
+
* @hidden
|
|
6058
|
+
*/
|
|
6059
|
+
payloadType: string;
|
|
6060
|
+
/** {zh}
|
|
6061
|
+
* @hidden
|
|
6062
|
+
*/
|
|
6063
|
+
/** {en}
|
|
6064
|
+
* @hidden
|
|
6065
|
+
*/
|
|
6066
|
+
sdpFmtpLine: string;
|
|
6067
|
+
/** {zh}
|
|
6068
|
+
* @hidden
|
|
6069
|
+
*/
|
|
6070
|
+
/** {en}
|
|
6071
|
+
* @hidden
|
|
6072
|
+
*/
|
|
6073
|
+
audioLevel: number;
|
|
6074
|
+
/** {zh}
|
|
6075
|
+
* @hidden
|
|
6076
|
+
*/
|
|
6077
|
+
/** {en}
|
|
6078
|
+
* @hidden
|
|
6079
|
+
*/
|
|
6080
|
+
bytesReceived: number;
|
|
6081
|
+
/** {zh}
|
|
6082
|
+
* @hidden
|
|
6083
|
+
*/
|
|
6084
|
+
/** {en}
|
|
6085
|
+
* @hidden
|
|
6086
|
+
*/
|
|
5793
6087
|
jitter: number;
|
|
6088
|
+
/** {zh}
|
|
6089
|
+
* @hidden
|
|
6090
|
+
*/
|
|
6091
|
+
/** {en}
|
|
6092
|
+
* @hidden
|
|
6093
|
+
*/
|
|
5794
6094
|
jitterBufferDelay: number;
|
|
6095
|
+
/** {zh}
|
|
6096
|
+
* @brief 音频丢包总数
|
|
6097
|
+
*/
|
|
6098
|
+
/** {en}
|
|
6099
|
+
* @brief 音频丢包总数
|
|
6100
|
+
*/
|
|
5795
6101
|
packetsLost: number;
|
|
6102
|
+
/** {zh}
|
|
6103
|
+
* @brief 音频收包总数
|
|
6104
|
+
*/
|
|
6105
|
+
/** {en}
|
|
6106
|
+
* @brief 音频收包总数
|
|
6107
|
+
*/
|
|
5796
6108
|
packetsReceived: number;
|
|
6109
|
+
/** {zh}
|
|
6110
|
+
* @hidden
|
|
6111
|
+
*/
|
|
6112
|
+
/** {en}
|
|
6113
|
+
* @hidden
|
|
6114
|
+
*/
|
|
5797
6115
|
totalSamplesDuration: number;
|
|
6116
|
+
/** {zh}
|
|
6117
|
+
* @hidden
|
|
6118
|
+
*/
|
|
6119
|
+
/** {en}
|
|
6120
|
+
* @hidden
|
|
6121
|
+
*/
|
|
5798
6122
|
totalSamplesReceived: number;
|
|
5799
6123
|
};
|
|
5800
6124
|
}
|
|
5801
6125
|
/** {zh}
|
|
5802
|
-
* @
|
|
6126
|
+
* @list option
|
|
6127
|
+
* @kind property
|
|
6128
|
+
* @brief FLV 直播流播放信息。
|
|
6129
|
+
*/
|
|
6130
|
+
/** {en}
|
|
6131
|
+
* @list option
|
|
6132
|
+
* @kind property
|
|
6133
|
+
* @brief FLV live stream information.
|
|
5803
6134
|
*/
|
|
5804
6135
|
interface FlvStats {
|
|
6136
|
+
/** {zh}
|
|
6137
|
+
* @brief 音频格式。
|
|
6138
|
+
* @hidden
|
|
6139
|
+
*/
|
|
6140
|
+
/** {en}
|
|
6141
|
+
* @brief Audio format.
|
|
6142
|
+
* @hidden
|
|
6143
|
+
*/
|
|
5805
6144
|
audioCodec: string;
|
|
6145
|
+
/** {zh}
|
|
6146
|
+
* @brief 平均下载速度。
|
|
6147
|
+
*/
|
|
6148
|
+
/** {en}
|
|
6149
|
+
* @brief Average download speed.
|
|
6150
|
+
*/
|
|
5806
6151
|
avgSpeed: number;
|
|
6152
|
+
/** {zh}
|
|
6153
|
+
* @brief 码率。
|
|
6154
|
+
*/
|
|
6155
|
+
/** {en}
|
|
6156
|
+
* @brief bitrate.
|
|
6157
|
+
*/
|
|
5807
6158
|
bitrate: number;
|
|
6159
|
+
/** {zh}
|
|
6160
|
+
* @brief 剩余缓冲时间。
|
|
6161
|
+
*/
|
|
6162
|
+
/** {en}
|
|
6163
|
+
* @brief Remaining buffer time.
|
|
6164
|
+
*/
|
|
5808
6165
|
bufferEnd: number;
|
|
6166
|
+
/** {zh}
|
|
6167
|
+
* @hidden
|
|
6168
|
+
*/
|
|
6169
|
+
/** {en}
|
|
6170
|
+
* @hidden
|
|
6171
|
+
*/
|
|
5809
6172
|
channelCount: number;
|
|
6173
|
+
/** {zh}
|
|
6174
|
+
* @brief 当前播放时间。
|
|
6175
|
+
*/
|
|
6176
|
+
/** {en}
|
|
6177
|
+
* @brief The current playing time.
|
|
6178
|
+
*/
|
|
5810
6179
|
currentTime: number;
|
|
6180
|
+
/** {zh}
|
|
6181
|
+
* @hidden
|
|
6182
|
+
*/
|
|
6183
|
+
/** {en}
|
|
6184
|
+
* @hidden
|
|
6185
|
+
*/
|
|
5811
6186
|
decodeFps: number;
|
|
6187
|
+
/** {zh}
|
|
6188
|
+
* @hidden
|
|
6189
|
+
*/
|
|
6190
|
+
/** {en}
|
|
6191
|
+
* @hidden
|
|
6192
|
+
*/
|
|
5812
6193
|
domain: string;
|
|
6194
|
+
/** {zh}
|
|
6195
|
+
* @brief 当前下载速度。
|
|
6196
|
+
*/
|
|
6197
|
+
/** {en}
|
|
6198
|
+
* @brief Current download speed.
|
|
6199
|
+
*/
|
|
5813
6200
|
downloadSpeed: number;
|
|
6201
|
+
/** {zh}
|
|
6202
|
+
* @brief 编码方式。
|
|
6203
|
+
*/
|
|
6204
|
+
/** {en}
|
|
6205
|
+
* @brief Encoding method.
|
|
6206
|
+
*/
|
|
5814
6207
|
encodeType: string;
|
|
6208
|
+
/** {zh}
|
|
6209
|
+
* @brief 帧率。
|
|
6210
|
+
*/
|
|
6211
|
+
/** {en}
|
|
6212
|
+
* @brief Frame rate.
|
|
6213
|
+
*/
|
|
5815
6214
|
fps: number;
|
|
6215
|
+
/** {zh}
|
|
6216
|
+
* @hidden
|
|
6217
|
+
*/
|
|
6218
|
+
/** {en}
|
|
6219
|
+
* @hidden
|
|
6220
|
+
*/
|
|
5816
6221
|
gop: number;
|
|
6222
|
+
/** {zh}
|
|
6223
|
+
* @brief 视频高度。
|
|
6224
|
+
*/
|
|
6225
|
+
/** {en}
|
|
6226
|
+
* @brief Video height.
|
|
6227
|
+
*/
|
|
5817
6228
|
height: number;
|
|
6229
|
+
/** {zh}
|
|
6230
|
+
* @hidden
|
|
6231
|
+
*/
|
|
6232
|
+
/** {en}
|
|
6233
|
+
* @hidden
|
|
6234
|
+
*/
|
|
5818
6235
|
samplerate: number;
|
|
6236
|
+
/** {zh}
|
|
6237
|
+
* @brief 总共收到的字节数。
|
|
6238
|
+
*/
|
|
6239
|
+
/** {en}
|
|
6240
|
+
* @brief The total number of bytes received.
|
|
6241
|
+
*/
|
|
5819
6242
|
totalReceivedByte: number;
|
|
6243
|
+
/** {zh}
|
|
6244
|
+
* @brief 接收所有字节消耗时长。
|
|
6245
|
+
*/
|
|
6246
|
+
/** {en}
|
|
6247
|
+
* @brief The time consumed for receiving all bytes.
|
|
6248
|
+
*/
|
|
5820
6249
|
totalReceivedCost: number;
|
|
6250
|
+
/** {zh}
|
|
6251
|
+
* @hidden
|
|
6252
|
+
*/
|
|
6253
|
+
/** {en}
|
|
6254
|
+
* @hidden
|
|
6255
|
+
*/
|
|
5821
6256
|
videoCodec: string;
|
|
6257
|
+
/** {zh}
|
|
6258
|
+
* @brief 视频宽度。
|
|
6259
|
+
*/
|
|
6260
|
+
/** {en}
|
|
6261
|
+
* @brief Video wight.
|
|
6262
|
+
*/
|
|
5822
6263
|
width: number;
|
|
5823
6264
|
}
|
|
5824
6265
|
/** {zh}
|
|
@@ -5842,7 +6283,10 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5842
6283
|
*/
|
|
5843
6284
|
constructor(options: LiveVePlayerOptions);
|
|
5844
6285
|
/** {zh}
|
|
5845
|
-
* @brief
|
|
6286
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
6287
|
+
*/
|
|
6288
|
+
/** {en}
|
|
6289
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
5846
6290
|
*/
|
|
5847
6291
|
get playTime(): number;
|
|
5848
6292
|
/** {zh}
|
|
@@ -5876,49 +6320,80 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5876
6320
|
*/
|
|
5877
6321
|
closeInfoPanel(): void;
|
|
5878
6322
|
/** {zh}
|
|
5879
|
-
* @brief
|
|
6323
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
6324
|
+
*/
|
|
6325
|
+
/** {en}
|
|
6326
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
5880
6327
|
*/
|
|
5881
6328
|
openAbr(): void;
|
|
5882
6329
|
/** {zh}
|
|
5883
|
-
* @brief
|
|
6330
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
6331
|
+
*/
|
|
6332
|
+
/** {en}
|
|
6333
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
5884
6334
|
*/
|
|
5885
6335
|
closeAbr(): void;
|
|
5886
6336
|
/** {zh}
|
|
5887
|
-
* @brief 调用此方法更新 DRM
|
|
5888
|
-
|
|
6337
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
6338
|
+
*/
|
|
6339
|
+
/** {en}
|
|
6340
|
+
* @brief Use this method to update DRM configuration.
|
|
6341
|
+
* @param config
|
|
5889
6342
|
*/
|
|
5890
6343
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5891
6344
|
/** {zh}
|
|
5892
|
-
* @brief
|
|
5893
|
-
* @param options
|
|
6345
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
6346
|
+
* @param options ABR 的配置。
|
|
5894
6347
|
* @returns
|
|
5895
6348
|
*/
|
|
6349
|
+
/** {en}
|
|
6350
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
6351
|
+
* @param options Configuration of ABR.
|
|
6352
|
+
*/
|
|
5896
6353
|
switchAbr(options: {
|
|
5897
6354
|
/** {zh}
|
|
5898
|
-
* @brief 是否开启
|
|
5899
|
-
*
|
|
5900
|
-
*
|
|
6355
|
+
* @brief 是否开启 ABR 功能。
|
|
6356
|
+
* - true:开启
|
|
6357
|
+
* - false:关闭
|
|
6358
|
+
*/
|
|
6359
|
+
/** {en}
|
|
6360
|
+
* @brief Whether to enable the ABR function.
|
|
6361
|
+
* - true: Enabled ;
|
|
6362
|
+
* - false: Disabled
|
|
6363
|
+
* @default -
|
|
5901
6364
|
*/
|
|
5902
6365
|
enable: boolean;
|
|
5903
6366
|
/** {zh}
|
|
5904
|
-
* @brief
|
|
6367
|
+
* @brief 切换自适应码率直播流对应的码率。
|
|
6368
|
+
*/
|
|
6369
|
+
/** {en}
|
|
6370
|
+
* @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
|
|
5905
6371
|
*/
|
|
5906
6372
|
bitrate: number;
|
|
5907
6373
|
}): void;
|
|
5908
6374
|
/** {zh}
|
|
5909
|
-
* @brief 获取 RTM
|
|
6375
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
5910
6376
|
* @returns
|
|
5911
6377
|
*/
|
|
6378
|
+
/** {en}
|
|
6379
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
6380
|
+
*/
|
|
5912
6381
|
getRTMNetWorkInfo(): RTMNetWorkInfo;
|
|
5913
6382
|
/** {zh}
|
|
5914
|
-
* @brief 获取 RTM
|
|
6383
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
5915
6384
|
* @returns
|
|
5916
6385
|
*/
|
|
6386
|
+
/** {en}
|
|
6387
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
6388
|
+
*/
|
|
5917
6389
|
getRTMStats(): Promise<StatsSnapShoot>;
|
|
5918
6390
|
/** {zh}
|
|
5919
|
-
* @brief 获取 FLV
|
|
6391
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
5920
6392
|
* @returns
|
|
5921
6393
|
*/
|
|
6394
|
+
/** {en}
|
|
6395
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
6396
|
+
*/
|
|
5922
6397
|
getFLVStats(): FlvStats;
|
|
5923
6398
|
}
|
|
5924
6399
|
/** {zh}
|
|
@@ -5976,7 +6451,7 @@ declare function isRTMSupported(): Promise<boolean>;
|
|
|
5976
6451
|
/** {zh}
|
|
5977
6452
|
* @detail api
|
|
5978
6453
|
* @brief 当前浏览器是否支持 H264 RTM 流播放。
|
|
5979
|
-
* @param codec 播放格式,目前只支持 `H264
|
|
6454
|
+
* @param codec 播放格式,目前只支持 `H264`。
|
|
5980
6455
|
* @returns
|
|
5981
6456
|
*/
|
|
5982
6457
|
/** {en}
|
|
@@ -5986,6 +6461,7 @@ declare function isRTMSupported(): Promise<boolean>;
|
|
|
5986
6461
|
* @returns
|
|
5987
6462
|
*/
|
|
5988
6463
|
declare function isRTMSupportCodec(codec?: string): Promise<boolean>;
|
|
6464
|
+
declare function isFLVSupported(codec?: string): boolean;
|
|
5989
6465
|
declare module MobilePlayerPanelWrapper {
|
|
5990
6466
|
export { MobilePlayerPanel };
|
|
5991
6467
|
}
|
|
@@ -6130,14 +6606,15 @@ declare namespace live {
|
|
|
6130
6606
|
}
|
|
6131
6607
|
/** {zh}
|
|
6132
6608
|
* @detail error
|
|
6609
|
+
* @brief 错误等级。
|
|
6133
6610
|
*/
|
|
6134
6611
|
/** {en}
|
|
6135
6612
|
* @detail error
|
|
6613
|
+
* @brief Error level.
|
|
6136
6614
|
*/
|
|
6137
6615
|
enum Level {
|
|
6138
6616
|
/** {zh}
|
|
6139
|
-
* @brief
|
|
6140
|
-
*
|
|
6617
|
+
* @brief 严重。
|
|
6141
6618
|
*/
|
|
6142
6619
|
/** {en}
|
|
6143
6620
|
* @brief Fatal.
|
|
@@ -6145,7 +6622,7 @@ declare namespace live {
|
|
|
6145
6622
|
*/
|
|
6146
6623
|
Fatal = "Fatal",
|
|
6147
6624
|
/** {zh}
|
|
6148
|
-
* @brief
|
|
6625
|
+
* @brief 报错。
|
|
6149
6626
|
*/
|
|
6150
6627
|
/** {en}
|
|
6151
6628
|
* @brief Error.
|
|
@@ -6513,7 +6990,7 @@ declare namespace live {
|
|
|
6513
6990
|
/** {zh}
|
|
6514
6991
|
* @list error
|
|
6515
6992
|
* @detail error
|
|
6516
|
-
* @brief
|
|
6993
|
+
* @brief 错误对象。
|
|
6517
6994
|
* @name VeError
|
|
6518
6995
|
* @id VeError
|
|
6519
6996
|
*/
|
|
@@ -6525,11 +7002,11 @@ declare namespace live {
|
|
|
6525
7002
|
* @id VeError
|
|
6526
7003
|
*/
|
|
6527
7004
|
class VeError<T extends string = TextKey> extends Error {
|
|
6528
|
-
/**
|
|
7005
|
+
/** {zh}
|
|
6529
7006
|
* @brief 错误码。
|
|
6530
7007
|
*/
|
|
6531
7008
|
/** {en}
|
|
6532
|
-
* @brief
|
|
7009
|
+
* @brief Error code.
|
|
6533
7010
|
*/
|
|
6534
7011
|
readonly errorCode: ErrorCode;
|
|
6535
7012
|
/** {zh}
|
|
@@ -7025,20 +7502,32 @@ declare namespace live {
|
|
|
7025
7502
|
REFRESH_CLICK = "refreshClick",
|
|
7026
7503
|
/** {zh}
|
|
7027
7504
|
* Abr 切换码率
|
|
7505
|
+
* @brief 切换自适应码率流
|
|
7506
|
+
*/
|
|
7507
|
+
/** {en}
|
|
7508
|
+
* @brief Event for switching Adaptive Bitrate (ABR) streams.
|
|
7028
7509
|
*/
|
|
7029
7510
|
ABR_SWITCH_START = "abrSwitchStart",
|
|
7030
7511
|
/** {zh}
|
|
7031
7512
|
* Abr 切换码率成功
|
|
7513
|
+
* @brief 成功切换自适应码率直播流
|
|
7514
|
+
*/
|
|
7515
|
+
/** {en}
|
|
7516
|
+
* @brief Event of successfully switching Adaptive Bitrate (ABR) live stream.
|
|
7032
7517
|
*/
|
|
7033
7518
|
ABR_SWITCH_SUCCESS = "abrSwitchedSuccess",
|
|
7034
7519
|
/** {zh}
|
|
7035
7520
|
* Abr 切换码率失败
|
|
7521
|
+
* @brief 切换自适应码率直播流失败
|
|
7522
|
+
*/
|
|
7523
|
+
/** {en}
|
|
7524
|
+
* @brief Event of failing to switch Adaptive Bitrate (ABR) live stream.
|
|
7036
7525
|
*/
|
|
7037
7526
|
ABR_SWITCH_FAILED = "abrSwitchFailed"
|
|
7038
7527
|
}
|
|
7039
7528
|
/** {zh}
|
|
7040
7529
|
* @detail events
|
|
7041
|
-
* @brief
|
|
7530
|
+
* @brief 事件回调。
|
|
7042
7531
|
* @hiddenDefault
|
|
7043
7532
|
* @example
|
|
7044
7533
|
* ```js
|
|
@@ -7181,6 +7670,8 @@ declare namespace live {
|
|
|
7181
7670
|
/** {en}
|
|
7182
7671
|
* The player has focus.
|
|
7183
7672
|
* @param data Information about the event.
|
|
7673
|
+
* @brief
|
|
7674
|
+
* The player has focus.
|
|
7184
7675
|
*/
|
|
7185
7676
|
[LiveEvents.PLAYER_FOCUS]: (data: {
|
|
7186
7677
|
/** {zh}
|
|
@@ -7568,53 +8059,77 @@ declare namespace live {
|
|
|
7568
8059
|
};
|
|
7569
8060
|
}) => void;
|
|
7570
8061
|
/** {zh}
|
|
7571
|
-
* 时移状态切换。
|
|
8062
|
+
* @brief 时移状态切换。
|
|
7572
8063
|
* @param isTimeShift 是否是时移状态。
|
|
7573
8064
|
*/
|
|
7574
8065
|
/** {en}
|
|
7575
|
-
* The time-shift state changes.
|
|
8066
|
+
* @brief The time-shift state changes.
|
|
7576
8067
|
* @param isTimeShift Whether the live stream is time-shifted.
|
|
7577
8068
|
*/
|
|
7578
8069
|
[LiveEvents.TIME_SHIFT_CHANGE]: (isTimeShift: boolean) => void;
|
|
7579
8070
|
/** {zh}
|
|
7580
|
-
* 点击刷新按钮。
|
|
8071
|
+
* @brief 点击刷新按钮。
|
|
7581
8072
|
*/
|
|
7582
8073
|
/** {en}
|
|
7583
|
-
* The user clicks the Refresh button.
|
|
8074
|
+
* @brief The user clicks the Refresh button.
|
|
7584
8075
|
*/
|
|
7585
8076
|
[LiveEvents.REFRESH_CLICK]: () => void;
|
|
7586
8077
|
/** {zh}
|
|
7587
|
-
*
|
|
8078
|
+
* @brief 切换自适应码率流的事件回调。
|
|
8079
|
+
*/
|
|
8080
|
+
/** {en}
|
|
8081
|
+
* @brief Event callback for switching Adaptive Bitrate (ABR) streams.
|
|
7588
8082
|
*/
|
|
7589
8083
|
[LiveEvents.ABR_SWITCH_START]: (data: {
|
|
7590
8084
|
/** {zh}
|
|
7591
|
-
*
|
|
8085
|
+
* @brief 切换后的码率。
|
|
8086
|
+
*/
|
|
8087
|
+
/** {en}
|
|
8088
|
+
* @brief Bitrate after switching.
|
|
7592
8089
|
*/
|
|
7593
8090
|
bitrate: number;
|
|
7594
8091
|
}) => void;
|
|
7595
8092
|
/** {zh}
|
|
7596
|
-
*
|
|
8093
|
+
* @brief 成功切换自适应码率流的事件回调。
|
|
8094
|
+
*/
|
|
8095
|
+
/** {en}
|
|
8096
|
+
* @brief Event callback of successfully switching Adaptive Bitrate (ABR) live stream.
|
|
7597
8097
|
*/
|
|
7598
8098
|
[LiveEvents.ABR_SWITCH_SUCCESS]: (data: {
|
|
7599
8099
|
/** {zh}
|
|
7600
|
-
*
|
|
8100
|
+
* @brief 切换后的码率。
|
|
8101
|
+
*/
|
|
8102
|
+
/** {en}
|
|
8103
|
+
* @brief Bitrate after switching.
|
|
7601
8104
|
*/
|
|
7602
8105
|
bitrate: number;
|
|
7603
|
-
/**
|
|
7604
|
-
*
|
|
8106
|
+
/** {zh}
|
|
8107
|
+
* @brief 切换后的播放地址。
|
|
8108
|
+
*/
|
|
8109
|
+
/** {en}
|
|
8110
|
+
* @brief The playback address after the switch.
|
|
7605
8111
|
*/
|
|
7606
8112
|
url: string;
|
|
7607
8113
|
}) => void;
|
|
7608
8114
|
/** {zh}
|
|
7609
|
-
*
|
|
8115
|
+
* @brief 切换自适应码率直播流失败的事件回调。
|
|
8116
|
+
*/
|
|
8117
|
+
/** {en}
|
|
8118
|
+
* @brief Event callback of failing to switch Adaptive Bitrate (ABR) live stream.
|
|
7610
8119
|
*/
|
|
7611
8120
|
[LiveEvents.ABR_SWITCH_FAILED]: (data: {
|
|
7612
8121
|
/** {zh}
|
|
7613
|
-
*
|
|
8122
|
+
* @brief 切换的码率。
|
|
8123
|
+
*/
|
|
8124
|
+
/** {en}
|
|
8125
|
+
* @brief Bitrate after switching.
|
|
7614
8126
|
*/
|
|
7615
8127
|
bitrate: number;
|
|
7616
|
-
/**
|
|
7617
|
-
*
|
|
8128
|
+
/** {zh}
|
|
8129
|
+
* @brief 切换后的播放地址。
|
|
8130
|
+
*/
|
|
8131
|
+
/** {en}
|
|
8132
|
+
* @brief The playback address after the switch.
|
|
7618
8133
|
*/
|
|
7619
8134
|
url: string;
|
|
7620
8135
|
}) => void;
|
|
@@ -7759,7 +8274,7 @@ declare namespace live {
|
|
|
7759
8274
|
*/
|
|
7760
8275
|
enum ListType {
|
|
7761
8276
|
/** {zh}
|
|
7762
|
-
* @brief
|
|
8277
|
+
* @brief 全屏布局。
|
|
7763
8278
|
* @hidden
|
|
7764
8279
|
*/
|
|
7765
8280
|
/** {en}
|
|
@@ -7768,21 +8283,21 @@ declare namespace live {
|
|
|
7768
8283
|
*/
|
|
7769
8284
|
Middle = "middle",
|
|
7770
8285
|
/** {zh}
|
|
7771
|
-
* @brief
|
|
8286
|
+
* @brief 底部抽屉。
|
|
7772
8287
|
*/
|
|
7773
8288
|
/** {en}
|
|
7774
8289
|
* @brief Bottom navigation drawer.
|
|
7775
8290
|
*/
|
|
7776
8291
|
Bottom = "bottom",
|
|
7777
8292
|
/** {zh}
|
|
7778
|
-
* @brief
|
|
8293
|
+
* @brief 右侧抽屉,常用于全屏时展示。
|
|
7779
8294
|
*/
|
|
7780
8295
|
/** {en}
|
|
7781
8296
|
* @brief Right navigation drawer. This is often used for fullscreen display.
|
|
7782
8297
|
*/
|
|
7783
8298
|
Fullscreen = "fullscreen",
|
|
7784
8299
|
/** {zh}
|
|
7785
|
-
* @brief
|
|
8300
|
+
* @brief 窗口蒙层展示。
|
|
7786
8301
|
*/
|
|
7787
8302
|
/** {en}
|
|
7788
8303
|
* @brief Overlay.
|
|
@@ -8195,11 +8710,9 @@ declare namespace live {
|
|
|
8195
8710
|
poster?: string;
|
|
8196
8711
|
/** {zh}
|
|
8197
8712
|
* @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
|
|
8198
|
-
* @default -
|
|
8199
8713
|
*/
|
|
8200
8714
|
/** {en}
|
|
8201
8715
|
* @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
8716
|
*/
|
|
8204
8717
|
lang?: Lang;
|
|
8205
8718
|
/** {zh}
|
|
@@ -8258,25 +8771,20 @@ declare namespace live {
|
|
|
8258
8771
|
* @brief Whether to display the full-screen button.
|
|
8259
8772
|
* - `true`: Display;
|
|
8260
8773
|
* - `false`: Do not display.
|
|
8261
|
-
* @default -
|
|
8262
8774
|
*/
|
|
8263
8775
|
fullscreen?: boolean | Fullscreen;
|
|
8264
8776
|
/** {zh}
|
|
8265
8777
|
* @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
|
|
8266
|
-
* @default -
|
|
8267
8778
|
*/
|
|
8268
8779
|
/** {en}
|
|
8269
8780
|
* @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
8781
|
*/
|
|
8272
8782
|
error?: ErrorConfig;
|
|
8273
8783
|
/** {zh}
|
|
8274
8784
|
* @brief 为播放器设置清晰度的相关配置。
|
|
8275
|
-
* @default -
|
|
8276
8785
|
*/
|
|
8277
8786
|
/** {en}
|
|
8278
8787
|
* @brief Resolution-related configurations.
|
|
8279
|
-
* @default -
|
|
8280
8788
|
*/
|
|
8281
8789
|
definition?: DefinitionConfig;
|
|
8282
8790
|
/** {zh}
|
|
@@ -8501,13 +9009,13 @@ declare namespace live {
|
|
|
8501
9009
|
*/
|
|
8502
9010
|
interface Fullscreen {
|
|
8503
9011
|
/** {zh}
|
|
8504
|
-
* @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90
|
|
8505
|
-
*
|
|
8506
|
-
*
|
|
9012
|
+
* @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级低于 useCssFullscreen。
|
|
9013
|
+
* - `true`:使用旋转横屏;
|
|
9014
|
+
* - `false`:不使用旋转横屏。
|
|
8507
9015
|
* @default false
|
|
8508
9016
|
*/
|
|
8509
9017
|
/** {en}
|
|
8510
|
-
* @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a
|
|
9018
|
+
* @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a lower priority than `useCssFullscreen`.
|
|
8511
9019
|
* - `true`: Enable.
|
|
8512
9020
|
* - `false`: Disable.
|
|
8513
9021
|
* @default false
|
|
@@ -8537,8 +9045,7 @@ declare namespace live {
|
|
|
8537
9045
|
* `true`: Display;
|
|
8538
9046
|
* `false`: Do not display.
|
|
8539
9047
|
* @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.
|
|
9048
|
+
* @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
9049
|
* - `true`: Display;
|
|
8543
9050
|
* - `false`: Do not display.
|
|
8544
9051
|
*/
|
|
@@ -8556,7 +9063,7 @@ declare namespace live {
|
|
|
8556
9063
|
*/
|
|
8557
9064
|
interface CommonStyle {
|
|
8558
9065
|
/** {zh}
|
|
8559
|
-
* @brief
|
|
9066
|
+
* @brief 进度条底色。
|
|
8560
9067
|
* @default 无
|
|
8561
9068
|
*/
|
|
8562
9069
|
/** {en}
|
|
@@ -8564,7 +9071,7 @@ declare namespace live {
|
|
|
8564
9071
|
*/
|
|
8565
9072
|
progressColor?: string;
|
|
8566
9073
|
/** {zh}
|
|
8567
|
-
* @brief
|
|
9074
|
+
* @brief 播放完成部分进度条底色。
|
|
8568
9075
|
* @default 无
|
|
8569
9076
|
*/
|
|
8570
9077
|
/** {en}
|
|
@@ -8572,7 +9079,7 @@ declare namespace live {
|
|
|
8572
9079
|
*/
|
|
8573
9080
|
playedColor?: string;
|
|
8574
9081
|
/** {zh}
|
|
8575
|
-
* @brief
|
|
9082
|
+
* @brief 缓存部分进度条底色。
|
|
8576
9083
|
* @default 无
|
|
8577
9084
|
*/
|
|
8578
9085
|
/** {en}
|
|
@@ -8581,7 +9088,7 @@ declare namespace live {
|
|
|
8581
9088
|
*/
|
|
8582
9089
|
cachedColor?: string;
|
|
8583
9090
|
/** {zh}
|
|
8584
|
-
* @brief
|
|
9091
|
+
* @brief 进度条滑块样式。
|
|
8585
9092
|
* @default 无
|
|
8586
9093
|
*/
|
|
8587
9094
|
/** {en}
|
|
@@ -8592,7 +9099,7 @@ declare namespace live {
|
|
|
8592
9099
|
[propName: string]: any;
|
|
8593
9100
|
};
|
|
8594
9101
|
/** {zh}
|
|
8595
|
-
* @brief
|
|
9102
|
+
* @brief 音量颜色。
|
|
8596
9103
|
* @default 无
|
|
8597
9104
|
*/
|
|
8598
9105
|
/** {en}
|
|
@@ -8616,14 +9123,14 @@ declare namespace live {
|
|
|
8616
9123
|
*/
|
|
8617
9124
|
enum Codec {
|
|
8618
9125
|
/** {zh}
|
|
8619
|
-
* @brief H.265
|
|
9126
|
+
* @brief H.265 编码格式。
|
|
8620
9127
|
*/
|
|
8621
9128
|
/** {en}
|
|
8622
9129
|
* @brief H.265.
|
|
8623
9130
|
*/
|
|
8624
9131
|
H265 = "h265",
|
|
8625
9132
|
/** {zh}
|
|
8626
|
-
* @brief H.264
|
|
9133
|
+
* @brief H.264 编码格式。
|
|
8627
9134
|
*/
|
|
8628
9135
|
/** {en}
|
|
8629
9136
|
* @brief H.264.
|
|
@@ -8640,18 +9147,18 @@ declare namespace live {
|
|
|
8640
9147
|
*/
|
|
8641
9148
|
enum Degradation {
|
|
8642
9149
|
/** {zh}
|
|
8643
|
-
* @brief
|
|
9150
|
+
* @brief 硬解不支持时,优先降级到软解。
|
|
8644
9151
|
*/
|
|
8645
9152
|
/** {en}
|
|
8646
|
-
* @brief
|
|
9153
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
|
|
8647
9154
|
*/
|
|
8648
9155
|
SoftFirst = "soft-first",
|
|
8649
9156
|
/** {zh}
|
|
8650
|
-
* @brief
|
|
9157
|
+
* @brief 硬解不支持时,优先降级到 H.264 解码。
|
|
8651
9158
|
* @hidden
|
|
8652
9159
|
*/
|
|
8653
9160
|
/** {en}
|
|
8654
|
-
* @brief
|
|
9161
|
+
* @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
|
|
8655
9162
|
* @hidden
|
|
8656
9163
|
*/
|
|
8657
9164
|
H264First = "h264-first"
|
|
@@ -8668,14 +9175,14 @@ declare namespace live {
|
|
|
8668
9175
|
*/
|
|
8669
9176
|
enum DecodeType {
|
|
8670
9177
|
/** {zh}
|
|
8671
|
-
* @brief
|
|
9178
|
+
* @brief 软解。
|
|
8672
9179
|
*/
|
|
8673
9180
|
/** {en}
|
|
8674
9181
|
* @brief Software decoding.
|
|
8675
9182
|
*/
|
|
8676
9183
|
Software = "software",
|
|
8677
9184
|
/** {zh}
|
|
8678
|
-
* @brief
|
|
9185
|
+
* @brief 硬解。
|
|
8679
9186
|
*/
|
|
8680
9187
|
/** {en}
|
|
8681
9188
|
* @brief Hardware decoding.
|
|
@@ -8866,6 +9373,11 @@ declare namespace live {
|
|
|
8866
9373
|
/** {zh}
|
|
8867
9374
|
* 获取播放器版本号
|
|
8868
9375
|
* @returns
|
|
9376
|
+
* @brief
|
|
9377
|
+
* 获取播放器 SDK 版本号。
|
|
9378
|
+
*/
|
|
9379
|
+
/** {en}
|
|
9380
|
+
* @brief Retrieve the player SDK version number.
|
|
8869
9381
|
*/
|
|
8870
9382
|
get playerVersion(): string;
|
|
8871
9383
|
/** {zh}
|
|
@@ -8953,8 +9465,8 @@ declare namespace live {
|
|
|
8953
9465
|
static create<T extends VePlayerBase>(options?: VePlayerBaseOptions, Constructor?: Constructor<T>): Promise<T>;
|
|
8954
9466
|
/** {zh}
|
|
8955
9467
|
* @brief 调用此方法切换拉流地址、线路、清晰度。
|
|
8956
|
-
* @param target
|
|
8957
|
-
* @param options
|
|
9468
|
+
* @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
|
|
9469
|
+
* @param options 更多配置信息。
|
|
8958
9470
|
*/
|
|
8959
9471
|
/** {en}
|
|
8960
9472
|
* @brief Switches the pull stream address, playback source, or resolution.
|
|
@@ -8991,11 +9503,12 @@ declare namespace live {
|
|
|
8991
9503
|
*/
|
|
8992
9504
|
fallbackToFirstDefinition?: boolean;
|
|
8993
9505
|
/** {zh}
|
|
8994
|
-
* @brief
|
|
8995
|
-
* - true: 无缝切换
|
|
8996
|
-
* - false: 非无缝切换
|
|
9506
|
+
* @brief 是否无缝切换,true 为无缝切换,false 为非无缝切换。
|
|
8997
9507
|
* @default false
|
|
8998
9508
|
*/
|
|
9509
|
+
/** {en}
|
|
9510
|
+
* @brief Whether seamless switching or not. True means seamless switching and false means non-seamless switching.
|
|
9511
|
+
*/
|
|
8999
9512
|
seamless?: boolean;
|
|
9000
9513
|
}): Promise<ExposedDefinition>;
|
|
9001
9514
|
/** {zh}
|
|
@@ -9031,16 +9544,15 @@ declare namespace live {
|
|
|
9031
9544
|
source?: string;
|
|
9032
9545
|
}): Promise<void>;
|
|
9033
9546
|
// TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
|
|
9034
|
-
/**
|
|
9035
9547
|
/** {zh}
|
|
9036
9548
|
* @brief 调用此方法监听指定事件,事件处理函数只执行一次。
|
|
9037
9549
|
* @param event 表示事件的名称。
|
|
9038
9550
|
* @param callback 表示事件的回调函数。
|
|
9039
9551
|
*/
|
|
9040
9552
|
/** {en}
|
|
9041
|
-
* @brief
|
|
9042
|
-
* @param event The event
|
|
9043
|
-
* @param callback
|
|
9553
|
+
* @brief Call this method to listen for the specified event. The event handler is executed only once.
|
|
9554
|
+
* @param event The name representing the event.
|
|
9555
|
+
* @param callback Callback functions representing events.
|
|
9044
9556
|
*/
|
|
9045
9557
|
once(event: string, callback: (data?: any) => any): void;
|
|
9046
9558
|
/** {zh}
|
|
@@ -9166,10 +9678,14 @@ declare namespace live {
|
|
|
9166
9678
|
ignorePaused?: boolean;
|
|
9167
9679
|
}): void;
|
|
9168
9680
|
/** {zh}
|
|
9169
|
-
* @brief
|
|
9170
|
-
* @param type
|
|
9681
|
+
* @brief 判断浏览器是否支持播放格式。
|
|
9682
|
+
* @param type 播放格式。
|
|
9171
9683
|
* @returns
|
|
9172
9684
|
*/
|
|
9685
|
+
/** {en}
|
|
9686
|
+
* @brief Determine whether the browser supports the playback format.
|
|
9687
|
+
* @param type The playback format.
|
|
9688
|
+
*/
|
|
9173
9689
|
canPlayType(type: string): boolean;
|
|
9174
9690
|
/** {zh}
|
|
9175
9691
|
* @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
|
|
@@ -9249,7 +9765,7 @@ declare namespace live {
|
|
|
9249
9765
|
unRegisterPlugin(plugin: any): void;
|
|
9250
9766
|
/** {zh}
|
|
9251
9767
|
* @brief 调用此接口显示指定插件图标。
|
|
9252
|
-
* @param pluginNames
|
|
9768
|
+
* @param pluginNames 插件名称。
|
|
9253
9769
|
*/
|
|
9254
9770
|
/** {en}
|
|
9255
9771
|
* @brief Displays the icon of a specified plugin.
|
|
@@ -9258,7 +9774,7 @@ declare namespace live {
|
|
|
9258
9774
|
showIcon(pluginNames: string[]): void;
|
|
9259
9775
|
/** {zh}
|
|
9260
9776
|
* @brief 调用此接口隐藏指定插件图标。
|
|
9261
|
-
* @param pluginNames
|
|
9777
|
+
* @param pluginNames 插件名称。
|
|
9262
9778
|
*/
|
|
9263
9779
|
/** {en}
|
|
9264
9780
|
* @brief Hides the icon of a specified plugin.
|
|
@@ -9385,23 +9901,23 @@ declare namespace live {
|
|
|
9385
9901
|
/** {zh}
|
|
9386
9902
|
* @detail api
|
|
9387
9903
|
* @brief 当前浏览器是否支持播放编码格式。
|
|
9388
|
-
* @param codec
|
|
9389
|
-
* `Codec.H264`:
|
|
9390
|
-
* `Codec.H265`:
|
|
9904
|
+
* @param codec 编码格式,支持以下选择。
|
|
9905
|
+
* - `Codec.H264`: 检查 MSE 是否支持 H.264 编码格式。
|
|
9906
|
+
* - `Codec.H265`: 检查 MSE 是否支持 H.265 编码格式。
|
|
9391
9907
|
* @returns
|
|
9392
9908
|
*/
|
|
9393
9909
|
/** {en}
|
|
9394
9910
|
* @detail api
|
|
9395
9911
|
* @brief Checkes whether the current browser supports the specified encoding format.
|
|
9396
|
-
* @param codec
|
|
9397
|
-
* `Codec.H264`:
|
|
9398
|
-
* `Codec.H265`:
|
|
9912
|
+
* @param codec Code format supports the following options.
|
|
9913
|
+
* - `Codec.H264`: Check whether MSE supports H.264 encoding format.
|
|
9914
|
+
* - `Codec.H265`: Check whether MSE supports H.265 encoding format.
|
|
9399
9915
|
* @returns
|
|
9400
9916
|
*/
|
|
9401
9917
|
function isMseSupported(codec?: string): boolean;
|
|
9402
9918
|
/** {zh}
|
|
9403
9919
|
* @detail api
|
|
9404
|
-
* @brief
|
|
9920
|
+
* @brief 当前浏览器是否支持软解。
|
|
9405
9921
|
* @returns
|
|
9406
9922
|
*/
|
|
9407
9923
|
/** {en}
|
|
@@ -9410,10 +9926,32 @@ declare namespace live {
|
|
|
9410
9926
|
* @returns
|
|
9411
9927
|
*/
|
|
9412
9928
|
function isSoftDecodeSupported(): Promise<boolean>;
|
|
9929
|
+
/** {zh}
|
|
9930
|
+
* @detail api
|
|
9931
|
+
* @brief 判断当前浏览器是否支持 MMS(ManagedMediaSource) API,如果支持的话可满足大部分 H.264 视频播放。
|
|
9932
|
+
* :::tip
|
|
9933
|
+
* - 当前方法无法判断是否支持 H.265 视频播放。
|
|
9934
|
+
* - 使用场景:检查 Safari 浏览器是否满足 H.264 编码流拉流要求。
|
|
9935
|
+
* - Safari 17.1 以上版本浏览器开始支持 MMS。
|
|
9936
|
+
* :::
|
|
9937
|
+
* @returns
|
|
9938
|
+
*/
|
|
9939
|
+
/** {en}
|
|
9940
|
+
* @detail api
|
|
9941
|
+
* @returns
|
|
9942
|
+
* @brief Determine whether the current browser supports the MMS (ManagedMediaSource) API, if so, it can meet most of the H.264 playback.
|
|
9943
|
+
* :::tip
|
|
9944
|
+
* - The current method cannot determine whether H.265 video playback is supported.
|
|
9945
|
+
* - Usage scenario: Check whether Safari browser meets the requirements for pulling H.264 encoded streams.
|
|
9946
|
+
* - Browsers with iOS 17.1 or above start to support MMS.
|
|
9947
|
+
* :::
|
|
9948
|
+
*/
|
|
9949
|
+
function isMMSSupported(codec?: string): any;
|
|
9413
9950
|
const util: {
|
|
9414
9951
|
getStreamType: typeof getStreamType;
|
|
9415
9952
|
isMseSupported: typeof isMseSupported;
|
|
9416
9953
|
isSoftDecodeSupported: typeof isSoftDecodeSupported;
|
|
9954
|
+
isMMSSupported: typeof isMMSSupported;
|
|
9417
9955
|
appendSearchParams: (url?: string | undefined, searchParams?: Record<string, string> | undefined) => string;
|
|
9418
9956
|
getUrlObject: (url?: string | undefined) => URL | undefined;
|
|
9419
9957
|
createDom(el?: string | undefined, tpl?: string | undefined, attrs?: {
|
|
@@ -9650,6 +10188,7 @@ declare namespace live {
|
|
|
9650
10188
|
}
|
|
9651
10189
|
const EN$0: {
|
|
9652
10190
|
INVALID_PARAMETER: string;
|
|
10191
|
+
INVALID_LOGGER: string;
|
|
9653
10192
|
FORMAT: string;
|
|
9654
10193
|
FPS: string;
|
|
9655
10194
|
BITRATE: string;
|
|
@@ -9722,6 +10261,7 @@ declare namespace live {
|
|
|
9722
10261
|
};
|
|
9723
10262
|
const ZH_CN$0: {
|
|
9724
10263
|
INVALID_PARAMETER: string;
|
|
10264
|
+
INVALID_LOGGER: string;
|
|
9725
10265
|
FORMAT: string;
|
|
9726
10266
|
FPS: string;
|
|
9727
10267
|
BITRATE: string;
|
|
@@ -9794,6 +10334,10 @@ declare namespace live {
|
|
|
9794
10334
|
};
|
|
9795
10335
|
type TextKey$0 = keyof typeof EN$0;
|
|
9796
10336
|
const VeError$0: typeof error.VeError;
|
|
10337
|
+
// ve 自定义错误码
|
|
10338
|
+
// 第一位: 1 表示点播,2 表示直播
|
|
10339
|
+
// 第二位: 功能粒度,比如 210 中 1 表示入参参数有问题
|
|
10340
|
+
// 第三位: 某功能下细分,如果细拆成地址有问题就可以用 211 表示。
|
|
9797
10341
|
enum LiveErrorCode {
|
|
9798
10342
|
/** {zh}
|
|
9799
10343
|
* @brief 参数错误
|
|
@@ -9803,7 +10347,16 @@ declare namespace live {
|
|
|
9803
10347
|
* @brief Parameter errors.
|
|
9804
10348
|
* @solution Please check whether the required parameters `url` and `playlist` are specified.
|
|
9805
10349
|
*/
|
|
9806
|
-
INVALID_PARAMETER = 210
|
|
10350
|
+
INVALID_PARAMETER = 210,
|
|
10351
|
+
/** {zh}
|
|
10352
|
+
* @brief 日志错误
|
|
10353
|
+
* @solution 未正确配置质量日志参数, 请参考 https://www.volcengine.com/docs/6469/138655#日志上报 配置。
|
|
10354
|
+
*/
|
|
10355
|
+
/** {en}
|
|
10356
|
+
* @brief Log errors.
|
|
10357
|
+
* @solution Log options not configured correctly. Please refer to this document https://docs.byteplus.com/en/docs/byteplus-media-live/docs-feature-implementation#uploading-logs to configure the logs.
|
|
10358
|
+
*/
|
|
10359
|
+
INVALID_LOGGER = 220
|
|
9807
10360
|
}
|
|
9808
10361
|
const Level$0: typeof error.Level;
|
|
9809
10362
|
type ErrorInfo$0 = error.ErrorInfo;
|
|
@@ -9857,10 +10410,11 @@ declare namespace live {
|
|
|
9857
10410
|
MODULE_LOAD_ERROR: error.ErrorCode.MODULE_LOAD_ERROR;
|
|
9858
10411
|
UNKNOWN: error.ErrorCode.UNKNOWN;
|
|
9859
10412
|
INVALID_PARAMETER: LiveErrorCode.INVALID_PARAMETER;
|
|
10413
|
+
INVALID_LOGGER: LiveErrorCode.INVALID_LOGGER;
|
|
9860
10414
|
};
|
|
9861
10415
|
type ValueOf<T> = T[keyof T];
|
|
9862
10416
|
const ERRORS: Partial<Record<ValueOf<typeof ErrorCode$0>, error.ErrorInfo<TextKey$0>>>;
|
|
9863
|
-
function create$0(errorCode: ValueOf<typeof ErrorCode$0>, i18n?: VeI18n<TextKey$0>): error.VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP" | "GOP" | "INVALID_PARAMETER" | "FORMAT" | "FPS" | "BITRATE" | "RESOLUTION" | "ENCODE_TYPE" | "BUFFER_END" | "CURRENT_TIME" | "DECODE_EFFICIENCY" | "DECODE_COST" | "DECODE_INFO">;
|
|
10417
|
+
function create$0(errorCode: ValueOf<typeof ErrorCode$0>, i18n?: VeI18n<TextKey$0>): error.VeError<"DEFINITION_FALLBACK_TOAST" | "DEFINITION_SWITCHING" | "ERROR_REFRESH" | "UNMUTE" | "MANIFEST" | "NETWORK" | "NETWORK_TIMEOUT" | "NETWORK_FORBIDDEN" | "NETWORK_NOTFOUND" | "DEMUX" | "REMUX" | "MEDIA" | "MEDIA_ERR_CODEC_NOT_SUPPORTED" | "MEDIA_ERR_URL_EMPTY" | "DRM" | "DRM_LICENSE" | "OTHER" | "RUNTIME" | "MODULE_LOAD_ERROR" | "UNKNOWN" | "ERROR_TYPES" | "HAVE_NOTHING" | "HAVE_METADATA" | "HAVE_CURRENT_DATA" | "HAVE_FUTURE_DATA" | "HAVE_ENOUGH_DATA" | "NETWORK_EMPTY" | "NETWORK_IDLE" | "NETWORK_LOADING" | "NETWORK_NO_SOURCE" | "MEDIA_ERR_ABORTED" | "MEDIA_ERR_NETWORK" | "MEDIA_ERR_DECODE" | "MEDIA_ERR_SRC_NOT_SUPPORTED" | "REPLAY" | "ERROR" | "PLAY_TIPS" | "PAUSE_TIPS" | "PLAYNEXT_TIPS" | "DOWNLOAD_TIPS" | "ROTATE_TIPS" | "RELOAD_TIPS" | "FULLSCREEN_TIPS" | "EXITFULLSCREEN_TIPS" | "CSSFULLSCREEN_TIPS" | "EXITCSSFULLSCREEN_TIPS" | "TEXTTRACK" | "PIP" | "SCREENSHOT" | "LIVE" | "OFF" | "OPEN" | "MINI_DRAG" | "MINISCREEN" | "REFRESH_TIPS" | "REFRESH" | "FORWARD" | "LIVE_TIP" | "GOP" | "INVALID_PARAMETER" | "INVALID_LOGGER" | "FORMAT" | "FPS" | "BITRATE" | "RESOLUTION" | "ENCODE_TYPE" | "BUFFER_END" | "CURRENT_TIME" | "DECODE_EFFICIENCY" | "DECODE_COST" | "DECODE_INFO">;
|
|
9864
10418
|
/** {zh}
|
|
9865
10419
|
* @list option
|
|
9866
10420
|
* @kind property
|
|
@@ -9966,7 +10520,7 @@ declare namespace live {
|
|
|
9966
10520
|
/** {en}
|
|
9967
10521
|
* @brief The SDK application ID. You can access it by logging in to the BytePlus MediaLive console and navigating to [SDK Management](https://console.byteplus.com/live/main/sdk).
|
|
9968
10522
|
*/
|
|
9969
|
-
appId
|
|
10523
|
+
appId?: string;
|
|
9970
10524
|
/** {zh}
|
|
9971
10525
|
* @brief 应用名称。
|
|
9972
10526
|
* @default 无
|
|
@@ -10044,60 +10598,52 @@ declare namespace live {
|
|
|
10044
10598
|
interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
10045
10599
|
/** {zh}
|
|
10046
10600
|
* @brief 为播放器设置 RTM 拉流配置。
|
|
10047
|
-
* @default -
|
|
10048
10601
|
*/
|
|
10049
10602
|
/** {en}
|
|
10050
10603
|
* @brief Configurations for playing an RTM stream.
|
|
10051
|
-
* @default -
|
|
10052
10604
|
*/
|
|
10053
10605
|
rtm?: Rtm;
|
|
10054
10606
|
/** {zh}
|
|
10055
|
-
* @brief 为播放器设置 FLV 拉流配置。
|
|
10056
|
-
* @
|
|
10607
|
+
* @brief 为播放器设置 FLV 拉流配置。
|
|
10608
|
+
* @listtip FLV 拉流格式流相关配置适用于支持 MSE 播放的 PC 端浏览器、安卓端浏览器和支持 MMS API 的 iOS 浏览器。
|
|
10057
10609
|
*/
|
|
10058
10610
|
/** {en}
|
|
10059
|
-
* @brief Configurations for playing an FLV stream.
|
|
10060
|
-
* @
|
|
10611
|
+
* @brief Configurations for playing an FLV stream.
|
|
10612
|
+
* @listtip FLV pull stream format stream configurations are applicable to PC browsers, Android browsers that support MSE playback, and iOS browsers that support MMS API.
|
|
10061
10613
|
*/
|
|
10062
10614
|
flv?: Flv;
|
|
10063
10615
|
/** {zh}
|
|
10064
|
-
* @brief 为播放器设置 HLS 拉流配置。
|
|
10065
|
-
* @listtip
|
|
10066
|
-
*
|
|
10067
|
-
*
|
|
10616
|
+
* @brief 为播放器设置 HLS 拉流配置。
|
|
10617
|
+
* @listtip - HLS 格式流相关配置仅适用于支持 MSE API的 PC 端浏览器和安卓端浏览器。
|
|
10618
|
+
* - PC 端该配置默认生效;
|
|
10619
|
+
* - 移动端仅在 `enableMSE` 设置为 `true` 且支持 MSE 的浏览器中生效。
|
|
10068
10620
|
*/
|
|
10069
10621
|
/** {en}
|
|
10070
|
-
* @brief
|
|
10071
|
-
* @listtip
|
|
10072
|
-
*
|
|
10073
|
-
*
|
|
10622
|
+
* @brief Configurations for playing an HLS stream.
|
|
10623
|
+
* @listtip - The HLS format stream configuration is only applicable to PC browsers and Android browsers that support the MSE API.
|
|
10624
|
+
* - This configuration takes effect by default on PC;
|
|
10625
|
+
* - For mobile devices, the configuration takes effect only when `enableMSE` is set to `true` for the browser.
|
|
10074
10626
|
*/
|
|
10075
10627
|
hls?: Hls;
|
|
10076
10628
|
/** {zh}
|
|
10077
10629
|
* @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
|
|
10078
|
-
* @default -
|
|
10079
10630
|
*/
|
|
10080
10631
|
/** {en}
|
|
10081
10632
|
* @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
10633
|
*/
|
|
10084
10634
|
infoPanel?: InfoPanelConfig;
|
|
10085
10635
|
/** {zh}
|
|
10086
10636
|
* @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
|
|
10087
|
-
* @default -
|
|
10088
10637
|
*/
|
|
10089
10638
|
/** {en}
|
|
10090
10639
|
* @brief Configurations for time shifting.
|
|
10091
|
-
* @default -
|
|
10092
10640
|
*/
|
|
10093
10641
|
timeShift?: TimeShiftConfig;
|
|
10094
10642
|
/** {zh}
|
|
10095
10643
|
* @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
|
|
10096
|
-
* @default -
|
|
10097
10644
|
*/
|
|
10098
10645
|
/** {en}
|
|
10099
10646
|
* @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
|
|
10100
|
-
* @default -
|
|
10101
10647
|
*/
|
|
10102
10648
|
logger?: LoggerConfig;
|
|
10103
10649
|
/** {zh}
|
|
@@ -10117,13 +10663,10 @@ declare namespace live {
|
|
|
10117
10663
|
*/
|
|
10118
10664
|
icons?: any;
|
|
10119
10665
|
/** {zh}
|
|
10120
|
-
* @hidden
|
|
10121
10666
|
* @brief 商业 DRM 播放配置。
|
|
10122
|
-
* @default -
|
|
10123
10667
|
*/
|
|
10124
10668
|
/** {en}
|
|
10125
10669
|
* @brief Digital Rights Management (DRM) configurations.
|
|
10126
|
-
* @default -
|
|
10127
10670
|
*/
|
|
10128
10671
|
drm?: Drm;
|
|
10129
10672
|
}
|
|
@@ -10137,31 +10680,56 @@ declare namespace live {
|
|
|
10137
10680
|
*/
|
|
10138
10681
|
interface Abr {
|
|
10139
10682
|
/** {zh}
|
|
10140
|
-
* @brief 是否开启
|
|
10141
|
-
*
|
|
10142
|
-
*
|
|
10683
|
+
* @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
|
|
10684
|
+
* - `true`: 开启;
|
|
10685
|
+
* - `false`: 关闭。
|
|
10143
10686
|
* @default true
|
|
10144
10687
|
*/
|
|
10688
|
+
/** {en}
|
|
10689
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
10690
|
+
* - `true`: Enable;
|
|
10691
|
+
* - `false`: Disable.
|
|
10692
|
+
*/
|
|
10145
10693
|
enable?: boolean;
|
|
10146
10694
|
/** {zh}
|
|
10147
|
-
* @brief 未开启
|
|
10148
|
-
*
|
|
10149
|
-
*
|
|
10695
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
10696
|
+
* - true: 开启;
|
|
10697
|
+
* - false: 关闭。
|
|
10150
10698
|
* @default false
|
|
10699
|
+
* @hidden
|
|
10700
|
+
*/
|
|
10701
|
+
/** {en}
|
|
10702
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
10703
|
+
* - true: Enable;
|
|
10704
|
+
* - false: Disable.
|
|
10705
|
+
* @hidden
|
|
10151
10706
|
*/
|
|
10152
10707
|
downTip?: boolean;
|
|
10153
10708
|
/** {zh}
|
|
10154
|
-
* @brief
|
|
10155
|
-
*
|
|
10156
|
-
*
|
|
10709
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
10710
|
+
* - `true`: 开启;
|
|
10711
|
+
* - `false`: 关闭。
|
|
10712
|
+
* @default false
|
|
10713
|
+
*/
|
|
10714
|
+
/** {en}
|
|
10715
|
+
* @brief Whether to start debug mode, default is false.
|
|
10716
|
+
* - `true`: Enable,
|
|
10717
|
+
* - `false`: Disable.
|
|
10718
|
+
* @default false
|
|
10157
10719
|
*/
|
|
10158
10720
|
debug?: boolean;
|
|
10159
10721
|
/** {zh}
|
|
10160
|
-
* @brief
|
|
10722
|
+
* @brief 当前拉流地址 URL 对应的码率。
|
|
10723
|
+
*/
|
|
10724
|
+
/** {en}
|
|
10725
|
+
* @brief The bitrate corresponding to the current pull-stream address URL.
|
|
10161
10726
|
*/
|
|
10162
10727
|
bitrate?: number;
|
|
10163
10728
|
/** {zh}
|
|
10164
|
-
* @brief
|
|
10729
|
+
* @brief 自适应码率流信息。
|
|
10730
|
+
*/
|
|
10731
|
+
/** {en}
|
|
10732
|
+
* @brief Adaptive bitrate (ABR) stream information.
|
|
10165
10733
|
*/
|
|
10166
10734
|
urls?: {
|
|
10167
10735
|
[bitrate: number]: string;
|
|
@@ -10170,35 +10738,53 @@ declare namespace live {
|
|
|
10170
10738
|
/** {zh}
|
|
10171
10739
|
* @list option
|
|
10172
10740
|
* @kind property
|
|
10741
|
+
* @hidden
|
|
10173
10742
|
*/
|
|
10174
10743
|
/** {en}
|
|
10175
10744
|
* @list option
|
|
10176
10745
|
* @kind property
|
|
10746
|
+
* @hidden
|
|
10177
10747
|
*/
|
|
10178
10748
|
interface HlsAbr {
|
|
10179
10749
|
/** {zh}
|
|
10180
|
-
* @brief 是否开启
|
|
10181
|
-
*
|
|
10182
|
-
*
|
|
10750
|
+
* @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
|
|
10751
|
+
* - true: 开启;
|
|
10752
|
+
* - false: 关闭。
|
|
10183
10753
|
* @default true
|
|
10184
10754
|
*/
|
|
10755
|
+
/** {en}
|
|
10756
|
+
* @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
|
|
10757
|
+
* - true: Enable;
|
|
10758
|
+
* - false: Disable.
|
|
10759
|
+
*/
|
|
10185
10760
|
enable?: boolean;
|
|
10186
10761
|
/** {zh}
|
|
10187
|
-
* @brief 未开启
|
|
10188
|
-
*
|
|
10189
|
-
*
|
|
10762
|
+
* @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
|
|
10763
|
+
* - true: 开启;
|
|
10764
|
+
* - false: 关闭。
|
|
10190
10765
|
* @default false
|
|
10191
10766
|
*/
|
|
10767
|
+
/** {en}
|
|
10768
|
+
* @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
|
|
10769
|
+
* - true: Enable;
|
|
10770
|
+
* - false: Disable.
|
|
10771
|
+
*/
|
|
10192
10772
|
downTip?: boolean;
|
|
10193
10773
|
/** {zh}
|
|
10194
|
-
* @brief
|
|
10195
|
-
*
|
|
10196
|
-
*
|
|
10774
|
+
* @brief 是否开始调试模式,默认为关闭。
|
|
10775
|
+
* - true: 开启;
|
|
10776
|
+
* - false: 关闭。
|
|
10777
|
+
* @default false
|
|
10778
|
+
*/
|
|
10779
|
+
/** {en}
|
|
10780
|
+
* @brief Whether to start debug mode, default is false.
|
|
10781
|
+
* - true: Enable,
|
|
10782
|
+
* - false: Disable.
|
|
10783
|
+
* @default false
|
|
10197
10784
|
*/
|
|
10198
10785
|
debug?: boolean;
|
|
10199
10786
|
}
|
|
10200
10787
|
/** {zh}
|
|
10201
|
-
* @hidden
|
|
10202
10788
|
* @list option
|
|
10203
10789
|
* @kind property
|
|
10204
10790
|
*/
|
|
@@ -10208,15 +10794,14 @@ declare namespace live {
|
|
|
10208
10794
|
*/
|
|
10209
10795
|
interface Drm {
|
|
10210
10796
|
/** {zh}
|
|
10211
|
-
* @brief FairPlay DRM
|
|
10797
|
+
* @brief FairPlay DRM 配置。
|
|
10212
10798
|
*/
|
|
10213
10799
|
/** {en}
|
|
10214
|
-
* @brief FairPlay DRM configurations
|
|
10800
|
+
* @brief FairPlay DRM configurations.
|
|
10215
10801
|
*/
|
|
10216
10802
|
fairplay?: FairplayDrm;
|
|
10217
10803
|
}
|
|
10218
10804
|
/** {zh}
|
|
10219
|
-
* @hidden
|
|
10220
10805
|
* @list option
|
|
10221
10806
|
* @kind property
|
|
10222
10807
|
*/
|
|
@@ -10226,7 +10811,6 @@ declare namespace live {
|
|
|
10226
10811
|
*/
|
|
10227
10812
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
10228
10813
|
/** {zh}
|
|
10229
|
-
* @hidden
|
|
10230
10814
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
10231
10815
|
* @param config
|
|
10232
10816
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -10241,7 +10825,6 @@ declare namespace live {
|
|
|
10241
10825
|
}) => Promise<FairplayDrmConfig>;
|
|
10242
10826
|
}
|
|
10243
10827
|
/** {zh}
|
|
10244
|
-
* @hidden
|
|
10245
10828
|
* @list option
|
|
10246
10829
|
* @kind property
|
|
10247
10830
|
*/
|
|
@@ -10251,17 +10834,17 @@ declare namespace live {
|
|
|
10251
10834
|
*/
|
|
10252
10835
|
interface FairplayDrmConfig {
|
|
10253
10836
|
/** {zh}
|
|
10254
|
-
* @brief
|
|
10837
|
+
* @brief 获取证书的请求地址。
|
|
10255
10838
|
*/
|
|
10256
10839
|
/** {en}
|
|
10257
|
-
* @brief URL used to acquire the FairPlay certificate
|
|
10840
|
+
* @brief URL used to acquire the FairPlay certificate.
|
|
10258
10841
|
*/
|
|
10259
10842
|
serverCertificatePath?: string;
|
|
10260
10843
|
/** {zh}
|
|
10261
|
-
* @brief
|
|
10844
|
+
* @brief 获取内容密钥许可证的请求地址。
|
|
10262
10845
|
*/
|
|
10263
10846
|
/** {en}
|
|
10264
|
-
* @brief URL used to acquire the DRM license
|
|
10847
|
+
* @brief URL used to acquire the DRM license.
|
|
10265
10848
|
*/
|
|
10266
10849
|
serverProcessSPCPath?: string;
|
|
10267
10850
|
}
|
|
@@ -10369,26 +10952,62 @@ declare namespace live {
|
|
|
10369
10952
|
retryDelay?: number;
|
|
10370
10953
|
/** {zh}
|
|
10371
10954
|
* @brief 播放器发起 RTM 拉流请求时,是否开启自动转码。
|
|
10372
|
-
*
|
|
10373
|
-
*
|
|
10955
|
+
* - `true`:开启;
|
|
10956
|
+
* - `false`:关闭。
|
|
10374
10957
|
* @listtip
|
|
10375
10958
|
* 如有使用 RTM 拉流自动转码的需求,请先创建工单联系[技术支持](https://console.volcengine.com/workorder/create?step=2&SubProductID=P00000076)进行配置。
|
|
10376
10959
|
* @default false
|
|
10377
10960
|
*/
|
|
10378
10961
|
/** {en}
|
|
10379
10962
|
* @brief Whether to enable automatic transcoding when the player requests to pull an RTM stream.
|
|
10380
|
-
*
|
|
10381
|
-
*
|
|
10963
|
+
* - `true`: Enable;
|
|
10964
|
+
* - `false`: Disable.
|
|
10382
10965
|
* @listtip
|
|
10383
10966
|
* If you want to use the automatic transcoding feature when playing an RTM stream, contact your [technical support](https://www.byteplus.com/en/support).
|
|
10384
10967
|
* @default false
|
|
10385
10968
|
*/
|
|
10386
10969
|
enableRTMAutoTranscode?: boolean;
|
|
10387
10970
|
/** {zh}
|
|
10388
|
-
* @brief
|
|
10971
|
+
* @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
|
|
10389
10972
|
* @default 1000
|
|
10390
10973
|
*/
|
|
10974
|
+
/** {en}
|
|
10975
|
+
* @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.
|
|
10976
|
+
*/
|
|
10391
10977
|
networkEvaluateInterval?: number;
|
|
10978
|
+
/** {zh}
|
|
10979
|
+
* @brief 暂停后重新拉流的处理方式是否为无缝替换。
|
|
10980
|
+
* - `true`:是,重新拉流期间不会出现黑屏现象。
|
|
10981
|
+
* - `false`:否,重新拉流期间会出现黑屏现象。
|
|
10982
|
+
* @default false
|
|
10983
|
+
* @listtip Safari 浏览器在进行 RTM 拉流时不支持使用此配置。
|
|
10984
|
+
*/
|
|
10985
|
+
/** {en}
|
|
10986
|
+
* @brief Whether the processing method for re-pulling the stream after pausing is seamless replacement.
|
|
10987
|
+
* - `true`: Yes, there will be no black screen phenomenon during re-pulling the stream.
|
|
10988
|
+
* - `false`: No, there will be a black screen phenomenon during re-pulling the stream.
|
|
10989
|
+
* :::tip
|
|
10990
|
+
* Safari browsers do not support using this configuration when performing RTM stream pulling.
|
|
10991
|
+
* :::
|
|
10992
|
+
* @default false
|
|
10993
|
+
*/
|
|
10994
|
+
seamlesslyReload?: boolean;
|
|
10995
|
+
/** {zh}
|
|
10996
|
+
* @brief 暂停播放后的断联时间,单位为秒,默认不断联。
|
|
10997
|
+
* @listtip Safari 浏览器在进行 RTM 拉流时,如果出现断联,重新拉流时会出现短暂黑屏或加载情况。
|
|
10998
|
+
*/
|
|
10999
|
+
/** {en}
|
|
11000
|
+
* @brief The disconnection time after pausing playback is in seconds. By default, there is no disconnection.
|
|
11001
|
+
* @listtip When Safari browser performs RTM streaming, if there is a disconnection, there will be a short black screen or loading situation when re-streaming.
|
|
11002
|
+
*/
|
|
11003
|
+
disconnectTime?: number;
|
|
11004
|
+
/** {zh}
|
|
11005
|
+
* @hidden
|
|
11006
|
+
*/
|
|
11007
|
+
/** {en}
|
|
11008
|
+
* @hidden
|
|
11009
|
+
*/
|
|
11010
|
+
enableOriginSdpLogger?: boolean;
|
|
10392
11011
|
}
|
|
10393
11012
|
/** {zh}
|
|
10394
11013
|
* @list option
|
|
@@ -10428,40 +11047,68 @@ declare namespace live {
|
|
|
10428
11047
|
loadTimeout?: number;
|
|
10429
11048
|
/** {zh}
|
|
10430
11049
|
* @brief 播放器发起 FLV 拉流请求时,是否开启低延时。例如,当您开启低延时且推流端 GOP 设置为 2s 的情况下,FLV 拉流平均端到端延时约为 2s。
|
|
10431
|
-
*
|
|
10432
|
-
*
|
|
11050
|
+
* - `true`:开启;
|
|
11051
|
+
* - `false`:关闭
|
|
10433
11052
|
* @default false
|
|
10434
11053
|
*/
|
|
10435
11054
|
/** {en}
|
|
10436
11055
|
* @brief Whether to enable low latency when playing an FLV address. For example, if you have enabled low latency, and set GOP to 2 seconds, the average latency will be around 2 seconds.
|
|
10437
|
-
*
|
|
10438
|
-
*
|
|
11056
|
+
* - `true`: Enable;
|
|
11057
|
+
* - `false`: Disable.
|
|
10439
11058
|
* @default false
|
|
10440
11059
|
*/
|
|
10441
11060
|
enableLowLatency?: boolean;
|
|
10442
11061
|
/** {zh}
|
|
10443
|
-
* @brief
|
|
10444
|
-
* @default -
|
|
11062
|
+
* @brief 低延时的详细配置。
|
|
10445
11063
|
*/
|
|
10446
11064
|
/** {en}
|
|
10447
|
-
* @brief
|
|
10448
|
-
* @default -
|
|
11065
|
+
* @brief Detailed configuration for low latency.
|
|
10449
11066
|
*/
|
|
10450
11067
|
lowLatency?: LowLatency;
|
|
10451
11068
|
/** {zh}
|
|
10452
|
-
* @brief 为播放器设置 FLV
|
|
10453
|
-
|
|
11069
|
+
* @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
|
|
11070
|
+
*/
|
|
11071
|
+
/** {en}
|
|
11072
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
|
|
10454
11073
|
*/
|
|
10455
11074
|
abr?: Abr;
|
|
10456
11075
|
/** {zh}
|
|
10457
11076
|
* @hidden
|
|
10458
11077
|
*/
|
|
11078
|
+
/** {en}
|
|
11079
|
+
* @hidden
|
|
11080
|
+
*/
|
|
10459
11081
|
mseLowLatency?: boolean;
|
|
10460
11082
|
/** {zh}
|
|
10461
|
-
* @brief
|
|
10462
|
-
* @default
|
|
11083
|
+
* @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
|
|
11084
|
+
* @default 5000
|
|
11085
|
+
*/
|
|
11086
|
+
/** {en}
|
|
11087
|
+
* @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
11088
|
*/
|
|
10464
11089
|
maxReaderInterval?: number;
|
|
11090
|
+
/** {zh}
|
|
11091
|
+
* @brief 暂停播放后的断联时间,单位为秒,默认值为 0,表示暂停播放后立即断联。
|
|
11092
|
+
* @default 0
|
|
11093
|
+
*/
|
|
11094
|
+
/** {en}
|
|
11095
|
+
* @brief The disconnection time after pausing playback is in seconds. The default value is 0, indicating immediate disconnection after pausing playback.
|
|
11096
|
+
* @default 0
|
|
11097
|
+
*/
|
|
11098
|
+
disconnectTime?: number;
|
|
11099
|
+
/** {zh}
|
|
11100
|
+
* @brief 暂停后重新拉流的处理方式是否为无缝替换。
|
|
11101
|
+
* - `true`:是,重新拉流期间不会出现黑屏现象。
|
|
11102
|
+
* - `false`:否,重新拉流期间会出现黑屏现象。
|
|
11103
|
+
* @default false
|
|
11104
|
+
*/
|
|
11105
|
+
/** {en}
|
|
11106
|
+
* @brief Whether the processing method for re-pulling the stream after pausing is seamless replacement.
|
|
11107
|
+
* - `true`: Yes, there will be no black screen phenomenon during re-pulling the stream.
|
|
11108
|
+
* - `false`: No, there will be a black screen phenomenon during re-pulling the stream.
|
|
11109
|
+
* @default false
|
|
11110
|
+
*/
|
|
11111
|
+
seamlesslyReload?: boolean;
|
|
10465
11112
|
}
|
|
10466
11113
|
/** {zh}
|
|
10467
11114
|
* @list option
|
|
@@ -10480,15 +11127,15 @@ declare namespace live {
|
|
|
10480
11127
|
*/
|
|
10481
11128
|
abrPts?: string | number;
|
|
10482
11129
|
/** {zh}
|
|
10483
|
-
* @brief FLV
|
|
10484
|
-
*
|
|
10485
|
-
*
|
|
11130
|
+
* @brief FLV 低延时模式下,是否开启倍速追帧。
|
|
11131
|
+
* - `true`:开启;
|
|
11132
|
+
* - `false`:关闭。
|
|
10486
11133
|
* @default true
|
|
10487
11134
|
*/
|
|
10488
11135
|
/** {en}
|
|
10489
|
-
* @brief
|
|
10490
|
-
*
|
|
10491
|
-
*
|
|
11136
|
+
* @brief Whether to enable speed-up frame chasing in FLV low latency mode.
|
|
11137
|
+
* - `true`: enabled;
|
|
11138
|
+
* - `false`: disabled.
|
|
10492
11139
|
* @default true
|
|
10493
11140
|
*/
|
|
10494
11141
|
enableFrameChasing?: boolean;
|
|
@@ -10543,8 +11190,12 @@ declare namespace live {
|
|
|
10543
11190
|
*/
|
|
10544
11191
|
enableMSE?: boolean;
|
|
10545
11192
|
/** {zh}
|
|
10546
|
-
* @brief 为播放器设置 HLS
|
|
10547
|
-
* @
|
|
11193
|
+
* @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
|
|
11194
|
+
* @hidden
|
|
11195
|
+
*/
|
|
11196
|
+
/** {en}
|
|
11197
|
+
* @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
|
|
11198
|
+
* @hidden
|
|
10548
11199
|
*/
|
|
10549
11200
|
abr?: HlsAbr;
|
|
10550
11201
|
/**
|
|
@@ -10552,83 +11203,415 @@ declare namespace live {
|
|
|
10552
11203
|
*/
|
|
10553
11204
|
mseLowLatency?: boolean;
|
|
10554
11205
|
}
|
|
11206
|
+
/** {zh}
|
|
11207
|
+
* @list option
|
|
11208
|
+
* @kind property
|
|
11209
|
+
* @brief 在 RTM 拉流场景下,获取到的网络情况。
|
|
11210
|
+
*/
|
|
11211
|
+
/** {en}
|
|
11212
|
+
* @list option
|
|
11213
|
+
* @kind property
|
|
11214
|
+
* @brief Network conditions obtained in the RTM pull stream scenario.
|
|
11215
|
+
*/
|
|
10555
11216
|
interface RTMNetWorkInfo {
|
|
10556
11217
|
/** {zh}
|
|
10557
|
-
* @brief
|
|
11218
|
+
* @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
|
|
11219
|
+
*/
|
|
11220
|
+
/** {en}
|
|
11221
|
+
* @brief The download speed within the latest network evaluation period, in units of bps.
|
|
10558
11222
|
*/
|
|
10559
11223
|
speed?: number;
|
|
10560
11224
|
/** {zh}
|
|
10561
|
-
* @brief
|
|
11225
|
+
* @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
|
|
11226
|
+
*/
|
|
11227
|
+
/** {en}
|
|
11228
|
+
* @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
|
|
10562
11229
|
*/
|
|
10563
11230
|
avgSpeed?: number;
|
|
10564
11231
|
/** {zh}
|
|
10565
|
-
* @brief
|
|
11232
|
+
* @brief 最近一次网络评估周期内的网络丢包率。
|
|
11233
|
+
*/
|
|
11234
|
+
/** {en}
|
|
11235
|
+
* @brief The packet loss rate of the network within the latest network evaluation cycle.
|
|
10566
11236
|
*/
|
|
10567
11237
|
lostRate?: number;
|
|
10568
11238
|
/** {zh}
|
|
10569
|
-
* @brief
|
|
11239
|
+
* @brief 最近 5 次网络评估周期内的网络丢包率平均值。
|
|
11240
|
+
*/
|
|
11241
|
+
/** {en}
|
|
11242
|
+
* @brief The average network packet loss rate within the recent 5 network evaluation cycles.
|
|
10570
11243
|
*/
|
|
10571
11244
|
avgLostRate?: number;
|
|
10572
11245
|
}
|
|
10573
11246
|
/** {zh}
|
|
10574
|
-
* @
|
|
11247
|
+
* @list option
|
|
11248
|
+
* @kind property
|
|
11249
|
+
* @brief RTM 直播流播放信息。
|
|
11250
|
+
*/
|
|
11251
|
+
/** {en}
|
|
11252
|
+
* @list option
|
|
11253
|
+
* @kind property
|
|
11254
|
+
* @brief RTM live stream information.
|
|
10575
11255
|
*/
|
|
10576
11256
|
interface StatsSnapShoot {
|
|
11257
|
+
/** {en}
|
|
11258
|
+
* @brief Video information.
|
|
11259
|
+
*/
|
|
11260
|
+
/** {zh}
|
|
11261
|
+
* @brief 视频信息。
|
|
11262
|
+
*/
|
|
10577
11263
|
video?: {
|
|
11264
|
+
/** {zh}
|
|
11265
|
+
* @hidden
|
|
11266
|
+
*/
|
|
11267
|
+
/** {en}
|
|
11268
|
+
* @hidden
|
|
11269
|
+
*/
|
|
10578
11270
|
codec: string;
|
|
11271
|
+
/** {zh}
|
|
11272
|
+
* @hidden
|
|
11273
|
+
*/
|
|
11274
|
+
/** {en}
|
|
11275
|
+
* @hidden
|
|
11276
|
+
*/
|
|
10579
11277
|
payloadType: string;
|
|
11278
|
+
/** {zh}
|
|
11279
|
+
* @hidden
|
|
11280
|
+
*/
|
|
11281
|
+
/** {en}
|
|
11282
|
+
* @hidden
|
|
11283
|
+
*/
|
|
10580
11284
|
sdpFmtpLine: string;
|
|
11285
|
+
/** {zh}
|
|
11286
|
+
* @hidden
|
|
11287
|
+
*/
|
|
11288
|
+
/** {en}
|
|
11289
|
+
* @hidden
|
|
11290
|
+
*/
|
|
10581
11291
|
bytesReceived: number;
|
|
11292
|
+
/** {zh}
|
|
11293
|
+
* @hidden
|
|
11294
|
+
*/
|
|
11295
|
+
/** {en}
|
|
11296
|
+
* @hidden
|
|
11297
|
+
*/
|
|
10582
11298
|
firCount: number;
|
|
11299
|
+
/** {zh}
|
|
11300
|
+
* @hidden
|
|
11301
|
+
*/
|
|
11302
|
+
/** {en}
|
|
11303
|
+
* @hidden
|
|
11304
|
+
*/
|
|
10583
11305
|
pliCount: number;
|
|
11306
|
+
/** {zh}
|
|
11307
|
+
* @brief 视频高度
|
|
11308
|
+
*/
|
|
11309
|
+
/** {en}
|
|
11310
|
+
* @brief 视频高度
|
|
11311
|
+
*/
|
|
10584
11312
|
frameHeight: number;
|
|
11313
|
+
/** {zh}
|
|
11314
|
+
* @brief 视频宽度
|
|
11315
|
+
*/
|
|
11316
|
+
/** {en}
|
|
11317
|
+
* @brief 视频宽度
|
|
11318
|
+
*/
|
|
10585
11319
|
frameWidth: number;
|
|
11320
|
+
/** {zh}
|
|
11321
|
+
* @hidden
|
|
11322
|
+
*/
|
|
11323
|
+
/** {en}
|
|
11324
|
+
* @hidden
|
|
11325
|
+
*/
|
|
10586
11326
|
framesDecoded: number;
|
|
11327
|
+
/** {zh}
|
|
11328
|
+
* @hidden
|
|
11329
|
+
*/
|
|
11330
|
+
/** {en}
|
|
11331
|
+
* @hidden
|
|
11332
|
+
*/
|
|
10587
11333
|
framesDropped: number;
|
|
11334
|
+
/** {zh}
|
|
11335
|
+
* @brief 视频帧率
|
|
11336
|
+
*/
|
|
11337
|
+
/** {en}
|
|
11338
|
+
* @brief 视频帧率
|
|
11339
|
+
*/
|
|
10588
11340
|
framesPerSecond: number;
|
|
11341
|
+
/** {zh}
|
|
11342
|
+
* @hidden
|
|
11343
|
+
*/
|
|
11344
|
+
/** {en}
|
|
11345
|
+
* @hidden
|
|
11346
|
+
*/
|
|
10589
11347
|
framesReceived: number;
|
|
11348
|
+
/** {zh}
|
|
11349
|
+
* @hidden
|
|
11350
|
+
*/
|
|
11351
|
+
/** {en}
|
|
11352
|
+
* @hidden
|
|
11353
|
+
*/
|
|
10590
11354
|
jitter: number;
|
|
11355
|
+
/** {zh}
|
|
11356
|
+
* @hidden
|
|
11357
|
+
*/
|
|
11358
|
+
/** {en}
|
|
11359
|
+
* @hidden
|
|
11360
|
+
*/
|
|
10591
11361
|
jitterBufferDelay: number;
|
|
11362
|
+
/** {zh}
|
|
11363
|
+
* @hidden
|
|
11364
|
+
*/
|
|
11365
|
+
/** {en}
|
|
11366
|
+
* @hidden
|
|
11367
|
+
*/
|
|
10592
11368
|
keyFramesDecoded: number;
|
|
11369
|
+
/** {zh}
|
|
11370
|
+
* @hidden
|
|
11371
|
+
*/
|
|
11372
|
+
/** {en}
|
|
11373
|
+
* @hidden
|
|
11374
|
+
*/
|
|
10593
11375
|
nackCount: number;
|
|
11376
|
+
/** {zh}
|
|
11377
|
+
* @brief 视频丢包总数
|
|
11378
|
+
*/
|
|
11379
|
+
/** {en}
|
|
11380
|
+
* @brief 视频丢包总数
|
|
11381
|
+
*/
|
|
10594
11382
|
packetsLost: number;
|
|
11383
|
+
/** {zh}
|
|
11384
|
+
* @brief 视频收包总数
|
|
11385
|
+
*/
|
|
11386
|
+
/** {en}
|
|
11387
|
+
* @brief 视频收包总数
|
|
11388
|
+
*/
|
|
10595
11389
|
packetsReceived: number;
|
|
10596
11390
|
};
|
|
11391
|
+
/** {en}
|
|
11392
|
+
* @brief Audio information.
|
|
11393
|
+
*/
|
|
11394
|
+
/** {zh}
|
|
11395
|
+
* @brief 音频信息。
|
|
11396
|
+
*/
|
|
10597
11397
|
audio?: {
|
|
11398
|
+
/** {zh}
|
|
11399
|
+
* @hidden
|
|
11400
|
+
*/
|
|
11401
|
+
/** {en}
|
|
11402
|
+
* @hidden
|
|
11403
|
+
*/
|
|
10598
11404
|
codec: string;
|
|
11405
|
+
/** {zh}
|
|
11406
|
+
* @hidden
|
|
11407
|
+
*/
|
|
11408
|
+
/** {en}
|
|
11409
|
+
* @hidden
|
|
11410
|
+
*/
|
|
10599
11411
|
payloadType: string;
|
|
11412
|
+
/** {zh}
|
|
11413
|
+
* @hidden
|
|
11414
|
+
*/
|
|
11415
|
+
/** {en}
|
|
11416
|
+
* @hidden
|
|
11417
|
+
*/
|
|
10600
11418
|
sdpFmtpLine: string;
|
|
11419
|
+
/** {zh}
|
|
11420
|
+
* @hidden
|
|
11421
|
+
*/
|
|
11422
|
+
/** {en}
|
|
11423
|
+
* @hidden
|
|
11424
|
+
*/
|
|
10601
11425
|
audioLevel: number;
|
|
11426
|
+
/** {zh}
|
|
11427
|
+
* @hidden
|
|
11428
|
+
*/
|
|
11429
|
+
/** {en}
|
|
11430
|
+
* @hidden
|
|
11431
|
+
*/
|
|
10602
11432
|
bytesReceived: number;
|
|
11433
|
+
/** {zh}
|
|
11434
|
+
* @hidden
|
|
11435
|
+
*/
|
|
11436
|
+
/** {en}
|
|
11437
|
+
* @hidden
|
|
11438
|
+
*/
|
|
10603
11439
|
jitter: number;
|
|
11440
|
+
/** {zh}
|
|
11441
|
+
* @hidden
|
|
11442
|
+
*/
|
|
11443
|
+
/** {en}
|
|
11444
|
+
* @hidden
|
|
11445
|
+
*/
|
|
10604
11446
|
jitterBufferDelay: number;
|
|
11447
|
+
/** {zh}
|
|
11448
|
+
* @brief 音频丢包总数
|
|
11449
|
+
*/
|
|
11450
|
+
/** {en}
|
|
11451
|
+
* @brief 音频丢包总数
|
|
11452
|
+
*/
|
|
10605
11453
|
packetsLost: number;
|
|
11454
|
+
/** {zh}
|
|
11455
|
+
* @brief 音频收包总数
|
|
11456
|
+
*/
|
|
11457
|
+
/** {en}
|
|
11458
|
+
* @brief 音频收包总数
|
|
11459
|
+
*/
|
|
10606
11460
|
packetsReceived: number;
|
|
11461
|
+
/** {zh}
|
|
11462
|
+
* @hidden
|
|
11463
|
+
*/
|
|
11464
|
+
/** {en}
|
|
11465
|
+
* @hidden
|
|
11466
|
+
*/
|
|
10607
11467
|
totalSamplesDuration: number;
|
|
11468
|
+
/** {zh}
|
|
11469
|
+
* @hidden
|
|
11470
|
+
*/
|
|
11471
|
+
/** {en}
|
|
11472
|
+
* @hidden
|
|
11473
|
+
*/
|
|
10608
11474
|
totalSamplesReceived: number;
|
|
10609
11475
|
};
|
|
10610
11476
|
}
|
|
10611
11477
|
/** {zh}
|
|
10612
|
-
* @
|
|
11478
|
+
* @list option
|
|
11479
|
+
* @kind property
|
|
11480
|
+
* @brief FLV 直播流播放信息。
|
|
11481
|
+
*/
|
|
11482
|
+
/** {en}
|
|
11483
|
+
* @list option
|
|
11484
|
+
* @kind property
|
|
11485
|
+
* @brief FLV live stream information.
|
|
10613
11486
|
*/
|
|
10614
11487
|
interface FlvStats {
|
|
11488
|
+
/** {zh}
|
|
11489
|
+
* @brief 音频格式。
|
|
11490
|
+
* @hidden
|
|
11491
|
+
*/
|
|
11492
|
+
/** {en}
|
|
11493
|
+
* @brief Audio format.
|
|
11494
|
+
* @hidden
|
|
11495
|
+
*/
|
|
10615
11496
|
audioCodec: string;
|
|
11497
|
+
/** {zh}
|
|
11498
|
+
* @brief 平均下载速度。
|
|
11499
|
+
*/
|
|
11500
|
+
/** {en}
|
|
11501
|
+
* @brief Average download speed.
|
|
11502
|
+
*/
|
|
10616
11503
|
avgSpeed: number;
|
|
11504
|
+
/** {zh}
|
|
11505
|
+
* @brief 码率。
|
|
11506
|
+
*/
|
|
11507
|
+
/** {en}
|
|
11508
|
+
* @brief bitrate.
|
|
11509
|
+
*/
|
|
10617
11510
|
bitrate: number;
|
|
11511
|
+
/** {zh}
|
|
11512
|
+
* @brief 剩余缓冲时间。
|
|
11513
|
+
*/
|
|
11514
|
+
/** {en}
|
|
11515
|
+
* @brief Remaining buffer time.
|
|
11516
|
+
*/
|
|
10618
11517
|
bufferEnd: number;
|
|
11518
|
+
/** {zh}
|
|
11519
|
+
* @hidden
|
|
11520
|
+
*/
|
|
11521
|
+
/** {en}
|
|
11522
|
+
* @hidden
|
|
11523
|
+
*/
|
|
10619
11524
|
channelCount: number;
|
|
11525
|
+
/** {zh}
|
|
11526
|
+
* @brief 当前播放时间。
|
|
11527
|
+
*/
|
|
11528
|
+
/** {en}
|
|
11529
|
+
* @brief The current playing time.
|
|
11530
|
+
*/
|
|
10620
11531
|
currentTime: number;
|
|
11532
|
+
/** {zh}
|
|
11533
|
+
* @hidden
|
|
11534
|
+
*/
|
|
11535
|
+
/** {en}
|
|
11536
|
+
* @hidden
|
|
11537
|
+
*/
|
|
10621
11538
|
decodeFps: number;
|
|
11539
|
+
/** {zh}
|
|
11540
|
+
* @hidden
|
|
11541
|
+
*/
|
|
11542
|
+
/** {en}
|
|
11543
|
+
* @hidden
|
|
11544
|
+
*/
|
|
10622
11545
|
domain: string;
|
|
11546
|
+
/** {zh}
|
|
11547
|
+
* @brief 当前下载速度。
|
|
11548
|
+
*/
|
|
11549
|
+
/** {en}
|
|
11550
|
+
* @brief Current download speed.
|
|
11551
|
+
*/
|
|
10623
11552
|
downloadSpeed: number;
|
|
11553
|
+
/** {zh}
|
|
11554
|
+
* @brief 编码方式。
|
|
11555
|
+
*/
|
|
11556
|
+
/** {en}
|
|
11557
|
+
* @brief Encoding method.
|
|
11558
|
+
*/
|
|
10624
11559
|
encodeType: string;
|
|
11560
|
+
/** {zh}
|
|
11561
|
+
* @brief 帧率。
|
|
11562
|
+
*/
|
|
11563
|
+
/** {en}
|
|
11564
|
+
* @brief Frame rate.
|
|
11565
|
+
*/
|
|
10625
11566
|
fps: number;
|
|
11567
|
+
/** {zh}
|
|
11568
|
+
* @hidden
|
|
11569
|
+
*/
|
|
11570
|
+
/** {en}
|
|
11571
|
+
* @hidden
|
|
11572
|
+
*/
|
|
10626
11573
|
gop: number;
|
|
11574
|
+
/** {zh}
|
|
11575
|
+
* @brief 视频高度。
|
|
11576
|
+
*/
|
|
11577
|
+
/** {en}
|
|
11578
|
+
* @brief Video height.
|
|
11579
|
+
*/
|
|
10627
11580
|
height: number;
|
|
11581
|
+
/** {zh}
|
|
11582
|
+
* @hidden
|
|
11583
|
+
*/
|
|
11584
|
+
/** {en}
|
|
11585
|
+
* @hidden
|
|
11586
|
+
*/
|
|
10628
11587
|
samplerate: number;
|
|
11588
|
+
/** {zh}
|
|
11589
|
+
* @brief 总共收到的字节数。
|
|
11590
|
+
*/
|
|
11591
|
+
/** {en}
|
|
11592
|
+
* @brief The total number of bytes received.
|
|
11593
|
+
*/
|
|
10629
11594
|
totalReceivedByte: number;
|
|
11595
|
+
/** {zh}
|
|
11596
|
+
* @brief 接收所有字节消耗时长。
|
|
11597
|
+
*/
|
|
11598
|
+
/** {en}
|
|
11599
|
+
* @brief The time consumed for receiving all bytes.
|
|
11600
|
+
*/
|
|
10630
11601
|
totalReceivedCost: number;
|
|
11602
|
+
/** {zh}
|
|
11603
|
+
* @hidden
|
|
11604
|
+
*/
|
|
11605
|
+
/** {en}
|
|
11606
|
+
* @hidden
|
|
11607
|
+
*/
|
|
10631
11608
|
videoCodec: string;
|
|
11609
|
+
/** {zh}
|
|
11610
|
+
* @brief 视频宽度。
|
|
11611
|
+
*/
|
|
11612
|
+
/** {en}
|
|
11613
|
+
* @brief Video wight.
|
|
11614
|
+
*/
|
|
10632
11615
|
width: number;
|
|
10633
11616
|
}
|
|
10634
11617
|
/** {zh}
|
|
@@ -10652,7 +11635,10 @@ declare namespace live {
|
|
|
10652
11635
|
*/
|
|
10653
11636
|
constructor(options: LiveVePlayerOptions);
|
|
10654
11637
|
/** {zh}
|
|
10655
|
-
* @brief
|
|
11638
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
11639
|
+
*/
|
|
11640
|
+
/** {en}
|
|
11641
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
10656
11642
|
*/
|
|
10657
11643
|
get playTime(): number;
|
|
10658
11644
|
/** {zh}
|
|
@@ -10686,49 +11672,80 @@ declare namespace live {
|
|
|
10686
11672
|
*/
|
|
10687
11673
|
closeInfoPanel(): void;
|
|
10688
11674
|
/** {zh}
|
|
10689
|
-
* @brief
|
|
11675
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
11676
|
+
*/
|
|
11677
|
+
/** {en}
|
|
11678
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
10690
11679
|
*/
|
|
10691
11680
|
openAbr(): void;
|
|
10692
11681
|
/** {zh}
|
|
10693
|
-
* @brief
|
|
11682
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
11683
|
+
*/
|
|
11684
|
+
/** {en}
|
|
11685
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
10694
11686
|
*/
|
|
10695
11687
|
closeAbr(): void;
|
|
10696
11688
|
/** {zh}
|
|
10697
|
-
* @brief 调用此方法更新 DRM
|
|
10698
|
-
|
|
11689
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
11690
|
+
*/
|
|
11691
|
+
/** {en}
|
|
11692
|
+
* @brief Use this method to update DRM configuration.
|
|
11693
|
+
* @param config
|
|
10699
11694
|
*/
|
|
10700
11695
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10701
11696
|
/** {zh}
|
|
10702
|
-
* @brief
|
|
10703
|
-
* @param options
|
|
11697
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
11698
|
+
* @param options ABR 的配置。
|
|
10704
11699
|
* @returns
|
|
10705
11700
|
*/
|
|
11701
|
+
/** {en}
|
|
11702
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
11703
|
+
* @param options Configuration of ABR.
|
|
11704
|
+
*/
|
|
10706
11705
|
switchAbr(options: {
|
|
10707
11706
|
/** {zh}
|
|
10708
|
-
* @brief 是否开启
|
|
10709
|
-
*
|
|
10710
|
-
*
|
|
11707
|
+
* @brief 是否开启 ABR 功能。
|
|
11708
|
+
* - true:开启
|
|
11709
|
+
* - false:关闭
|
|
11710
|
+
*/
|
|
11711
|
+
/** {en}
|
|
11712
|
+
* @brief Whether to enable the ABR function.
|
|
11713
|
+
* - true: Enabled ;
|
|
11714
|
+
* - false: Disabled
|
|
11715
|
+
* @default -
|
|
10711
11716
|
*/
|
|
10712
11717
|
enable: boolean;
|
|
10713
11718
|
/** {zh}
|
|
10714
|
-
* @brief
|
|
11719
|
+
* @brief 切换自适应码率直播流对应的码率。
|
|
11720
|
+
*/
|
|
11721
|
+
/** {en}
|
|
11722
|
+
* @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
|
|
10715
11723
|
*/
|
|
10716
11724
|
bitrate: number;
|
|
10717
11725
|
}): void;
|
|
10718
11726
|
/** {zh}
|
|
10719
|
-
* @brief 获取 RTM
|
|
11727
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
10720
11728
|
* @returns
|
|
10721
11729
|
*/
|
|
11730
|
+
/** {en}
|
|
11731
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
11732
|
+
*/
|
|
10722
11733
|
getRTMNetWorkInfo(): RTMNetWorkInfo;
|
|
10723
11734
|
/** {zh}
|
|
10724
|
-
* @brief 获取 RTM
|
|
11735
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
10725
11736
|
* @returns
|
|
10726
11737
|
*/
|
|
11738
|
+
/** {en}
|
|
11739
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
11740
|
+
*/
|
|
10727
11741
|
getRTMStats(): Promise<StatsSnapShoot>;
|
|
10728
11742
|
/** {zh}
|
|
10729
|
-
* @brief 获取 FLV
|
|
11743
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
10730
11744
|
* @returns
|
|
10731
11745
|
*/
|
|
11746
|
+
/** {en}
|
|
11747
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
11748
|
+
*/
|
|
10732
11749
|
getFLVStats(): FlvStats;
|
|
10733
11750
|
}
|
|
10734
11751
|
/** {zh}
|
|
@@ -10771,4 +11788,4 @@ declare namespace live {
|
|
|
10771
11788
|
*/
|
|
10772
11789
|
function createLivePlayer(options?: LiveVePlayerOptions): Promise<VePlayerLive>;
|
|
10773
11790
|
}
|
|
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 };
|
|
11791
|
+
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 };
|