@volcengine/veplayer 2.4.3-rc.1 → 2.4.5-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/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 The error code.
871
+ * @brief Error code.
871
872
  */
872
873
  readonly errorCode: ErrorCode;
873
874
  /** {zh}
@@ -1230,11 +1231,9 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
1230
1231
  poster?: string;
1231
1232
  /** {zh}
1232
1233
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
1233
- * @default -
1234
1234
  */
1235
1235
  /** {en}
1236
1236
  * @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
1237
- * @default -
1238
1237
  */
1239
1238
  lang?: Lang;
1240
1239
  /** {zh}
@@ -1293,25 +1292,20 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
1293
1292
  * @brief Whether to display the full-screen button.
1294
1293
  * - `true`: Display;
1295
1294
  * - `false`: Do not display.
1296
- * @default -
1297
1295
  */
1298
1296
  fullscreen?: boolean | Fullscreen;
1299
1297
  /** {zh}
1300
1298
  * @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
1301
- * @default -
1302
1299
  */
1303
1300
  /** {en}
1304
1301
  * @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
1305
- * @default -
1306
1302
  */
1307
1303
  error?: ErrorConfig;
1308
1304
  /** {zh}
1309
1305
  * @brief 为播放器设置清晰度的相关配置。
1310
- * @default -
1311
1306
  */
1312
1307
  /** {en}
1313
1308
  * @brief Resolution-related configurations.
1314
- * @default -
1315
1309
  */
1316
1310
  definition?: DefinitionConfig;
1317
1311
  /** {zh}
@@ -1572,8 +1566,7 @@ interface Fullscreen {
1572
1566
  * `true`: Display;
1573
1567
  * `false`: Do not display.
1574
1568
  * @default false
1575
- * @brief
1576
- * Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
1569
+ * @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
1577
1570
  * - `true`: Display;
1578
1571
  * - `false`: Do not display.
1579
1572
  */
@@ -1591,7 +1584,7 @@ interface Fullscreen {
1591
1584
  */
1592
1585
  interface CommonStyle {
1593
1586
  /** {zh}
1594
- * @brief 进度条底色
1587
+ * @brief 进度条底色。
1595
1588
  * @default 无
1596
1589
  */
1597
1590
  /** {en}
@@ -1599,7 +1592,7 @@ interface CommonStyle {
1599
1592
  */
1600
1593
  progressColor?: string;
1601
1594
  /** {zh}
1602
- * @brief 播放完成部分进度条底色
1595
+ * @brief 播放完成部分进度条底色。
1603
1596
  * @default 无
1604
1597
  */
1605
1598
  /** {en}
@@ -1607,7 +1600,7 @@ interface CommonStyle {
1607
1600
  */
1608
1601
  playedColor?: string;
1609
1602
  /** {zh}
1610
- * @brief 缓存部分进度条底色
1603
+ * @brief 缓存部分进度条底色。
1611
1604
  * @default 无
1612
1605
  */
1613
1606
  /** {en}
@@ -1616,7 +1609,7 @@ interface CommonStyle {
1616
1609
  */
1617
1610
  cachedColor?: string;
1618
1611
  /** {zh}
1619
- * @brief 进度条滑块样式
1612
+ * @brief 进度条滑块样式。
1620
1613
  * @default 无
1621
1614
  */
1622
1615
  /** {en}
@@ -1627,7 +1620,7 @@ interface CommonStyle {
1627
1620
  [propName: string]: any;
1628
1621
  };
1629
1622
  /** {zh}
1630
- * @brief 音量颜色
1623
+ * @brief 音量颜色。
1631
1624
  * @default 无
1632
1625
  */
1633
1626
  /** {en}
@@ -1651,14 +1644,14 @@ type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
1651
1644
  */
1652
1645
  declare enum Codec {
1653
1646
  /** {zh}
1654
- * @brief H.265 编码格式
1647
+ * @brief H.265 编码格式。
1655
1648
  */
1656
1649
  /** {en}
1657
1650
  * @brief H.265.
1658
1651
  */
1659
1652
  H265 = "h265",
1660
1653
  /** {zh}
1661
- * @brief H.264 编码格式
1654
+ * @brief H.264 编码格式。
1662
1655
  */
1663
1656
  /** {en}
1664
1657
  * @brief H.264.
@@ -1675,18 +1668,18 @@ declare enum Codec {
1675
1668
  */
1676
1669
  declare enum Degradation {
1677
1670
  /** {zh}
1678
- * @brief 硬解不支持降级到软解
1671
+ * @brief 硬解不支持时,优先降级到软解。
1679
1672
  */
1680
1673
  /** {en}
1681
- * @brief The player does not support falling back to software decoding.
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 硬解不支持降级到h264
1678
+ * @brief 硬解不支持时,优先降级到 H.264 解码。
1686
1679
  * @hidden
1687
1680
  */
1688
1681
  /** {en}
1689
- * @brief The player does not support falling back to H.264.
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 Add a one-time listener function for the specified event.
2076
- * @param event The event name.
2077
- * @param callback The callback function for the event.
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 The error code.
3234
+ * @brief Error code.
3232
3235
  */
3233
3236
  readonly errorCode: ErrorCode;
3234
3237
  /** {zh}
@@ -3593,11 +3596,9 @@ declare namespace strategy {
3593
3596
  poster?: string;
3594
3597
  /** {zh}
3595
3598
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
3596
- * @default -
3597
3599
  */
3598
3600
  /** {en}
3599
3601
  * @brief The initial display language of the player. If the language pack does not exist, the 'en'language pack will be displayed by default. The default value is `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`.
3600
- * @default -
3601
3602
  */
3602
3603
  lang?: Lang;
3603
3604
  /** {zh}
@@ -3656,25 +3657,20 @@ declare namespace strategy {
3656
3657
  * @brief Whether to display the full-screen button.
3657
3658
  * - `true`: Display;
3658
3659
  * - `false`: Do not display.
3659
- * @default -
3660
3660
  */
3661
3661
  fullscreen?: boolean | Fullscreen;
3662
3662
  /** {zh}
3663
3663
  * @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
3664
- * @default -
3665
3664
  */
3666
3665
  /** {en}
3667
3666
  * @brief The error message of the player. When a playback error occurs, you can configure the error message and image displayed and whether to display the refresh button.
3668
- * @default -
3669
3667
  */
3670
3668
  error?: ErrorConfig;
3671
3669
  /** {zh}
3672
3670
  * @brief 为播放器设置清晰度的相关配置。
3673
- * @default -
3674
3671
  */
3675
3672
  /** {en}
3676
3673
  * @brief Resolution-related configurations.
3677
- * @default -
3678
3674
  */
3679
3675
  definition?: DefinitionConfig;
3680
3676
  /** {zh}
@@ -3935,8 +3931,7 @@ declare namespace strategy {
3935
3931
  * `true`: Display;
3936
3932
  * `false`: Do not display.
3937
3933
  * @default false
3938
- * @brief
3939
- * Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
3934
+ * @brief Whether to display a return button at the top-right corner when the player is in full-screen mode. This feature is usually turned on on mobile devices.
3940
3935
  * - `true`: Display;
3941
3936
  * - `false`: Do not display.
3942
3937
  */
@@ -3954,7 +3949,7 @@ declare namespace strategy {
3954
3949
  */
3955
3950
  interface CommonStyle {
3956
3951
  /** {zh}
3957
- * @brief 进度条底色
3952
+ * @brief 进度条底色。
3958
3953
  * @default 无
3959
3954
  */
3960
3955
  /** {en}
@@ -3962,7 +3957,7 @@ declare namespace strategy {
3962
3957
  */
3963
3958
  progressColor?: string;
3964
3959
  /** {zh}
3965
- * @brief 播放完成部分进度条底色
3960
+ * @brief 播放完成部分进度条底色。
3966
3961
  * @default 无
3967
3962
  */
3968
3963
  /** {en}
@@ -3970,7 +3965,7 @@ declare namespace strategy {
3970
3965
  */
3971
3966
  playedColor?: string;
3972
3967
  /** {zh}
3973
- * @brief 缓存部分进度条底色
3968
+ * @brief 缓存部分进度条底色。
3974
3969
  * @default 无
3975
3970
  */
3976
3971
  /** {en}
@@ -3979,7 +3974,7 @@ declare namespace strategy {
3979
3974
  */
3980
3975
  cachedColor?: string;
3981
3976
  /** {zh}
3982
- * @brief 进度条滑块样式
3977
+ * @brief 进度条滑块样式。
3983
3978
  * @default 无
3984
3979
  */
3985
3980
  /** {en}
@@ -3990,7 +3985,7 @@ declare namespace strategy {
3990
3985
  [propName: string]: any;
3991
3986
  };
3992
3987
  /** {zh}
3993
- * @brief 音量颜色
3988
+ * @brief 音量颜色。
3994
3989
  * @default 无
3995
3990
  */
3996
3991
  /** {en}
@@ -4014,14 +4009,14 @@ declare namespace strategy {
4014
4009
  */
4015
4010
  enum Codec {
4016
4011
  /** {zh}
4017
- * @brief H.265 编码格式
4012
+ * @brief H.265 编码格式。
4018
4013
  */
4019
4014
  /** {en}
4020
4015
  * @brief H.265.
4021
4016
  */
4022
4017
  H265 = "h265",
4023
4018
  /** {zh}
4024
- * @brief H.264 编码格式
4019
+ * @brief H.264 编码格式。
4025
4020
  */
4026
4021
  /** {en}
4027
4022
  * @brief H.264.
@@ -4038,18 +4033,18 @@ declare namespace strategy {
4038
4033
  */
4039
4034
  enum Degradation {
4040
4035
  /** {zh}
4041
- * @brief 硬解不支持降级到软解
4036
+ * @brief 硬解不支持时,优先降级到软解。
4042
4037
  */
4043
4038
  /** {en}
4044
- * @brief The player does not support falling back to software decoding.
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 硬解不支持降级到h264
4043
+ * @brief 硬解不支持时,优先降级到 H.264 解码。
4049
4044
  * @hidden
4050
4045
  */
4051
4046
  /** {en}
4052
- * @brief The player does not support falling back to H.264.
4047
+ * @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
4053
4048
  * @hidden
4054
4049
  */
4055
4050
  H264First = "h264-first"
@@ -4066,14 +4061,14 @@ declare namespace strategy {
4066
4061
  */
4067
4062
  enum DecodeType {
4068
4063
  /** {zh}
4069
- * @brief 软解
4064
+ * @brief 软解。
4070
4065
  */
4071
4066
  /** {en}
4072
4067
  * @brief Software decoding.
4073
4068
  */
4074
4069
  Software = "software",
4075
4070
  /** {zh}
4076
- * @brief 硬解
4071
+ * @brief 硬解。
4077
4072
  */
4078
4073
  /** {en}
4079
4074
  * @brief Hardware decoding.
@@ -4199,22 +4194,22 @@ declare function getStreamType(url: string): "unknown" | "hls" | "flv" | "rtm" |
4199
4194
  * @detail api
4200
4195
  * @brief 当前浏览器是否支持播放编码格式。
4201
4196
  * @param codec 编码格式。
4202
- * `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
4203
- * `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
4197
+ * - `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
4198
+ * - `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
4204
4199
  * @returns
4205
4200
  */
4206
4201
  /** {en}
4207
4202
  * @detail api
4208
4203
  * @brief Checkes whether the current browser supports the specified encoding format.
4209
4204
  * @param codec The encoding format.
4210
- * `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
4211
- * `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
4205
+ * - `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
4206
+ * - `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
4212
4207
  * @returns
4213
4208
  */
4214
4209
  declare function isMseSupported(codec?: string): boolean;
4215
4210
  /** {zh}
4216
4211
  * @detail api
4217
- * @brief 当前浏览器是否支持软解
4212
+ * @brief 当前浏览器是否支持软解。
4218
4213
  * @returns
4219
4214
  */
4220
4215
  /** {en}
@@ -4448,14 +4443,15 @@ declare namespace error {
4448
4443
  }
4449
4444
  /** {zh}
4450
4445
  * @detail error
4446
+ * @brief 错误等级。
4451
4447
  */
4452
4448
  /** {en}
4453
4449
  * @detail error
4450
+ * @brief Error level.
4454
4451
  */
4455
4452
  enum Level {
4456
4453
  /** {zh}
4457
- * @brief 严重
4458
- *
4454
+ * @brief 严重。
4459
4455
  */
4460
4456
  /** {en}
4461
4457
  * @brief Fatal.
@@ -4463,7 +4459,7 @@ declare namespace error {
4463
4459
  */
4464
4460
  Fatal = "Fatal",
4465
4461
  /** {zh}
4466
- * @brief 报错
4462
+ * @brief 报错。
4467
4463
  */
4468
4464
  /** {en}
4469
4465
  * @brief Error.
@@ -4831,7 +4827,7 @@ declare namespace error {
4831
4827
  /** {zh}
4832
4828
  * @list error
4833
4829
  * @detail error
4834
- * @brief 错误对象
4830
+ * @brief 错误对象。
4835
4831
  * @name VeError
4836
4832
  * @id VeError
4837
4833
  */
@@ -4843,11 +4839,11 @@ declare namespace error {
4843
4839
  * @id VeError
4844
4840
  */
4845
4841
  class VeError<T extends string = TextKey> extends Error {
4846
- /**
4842
+ /** {zh}
4847
4843
  * @brief 错误码。
4848
4844
  */
4849
4845
  /** {en}
4850
- * @brief The error code.
4846
+ * @brief Error code.
4851
4847
  */
4852
4848
  readonly errorCode: ErrorCode;
4853
4849
  /** {zh}
@@ -5234,20 +5230,16 @@ interface LoggerConfig {
5234
5230
  interface LiveVePlayerOptions extends VePlayerBaseOptions {
5235
5231
  /** {zh}
5236
5232
  * @brief 为播放器设置 RTM 拉流配置。
5237
- * @default -
5238
5233
  */
5239
5234
  /** {en}
5240
5235
  * @brief Configurations for playing an RTM stream.
5241
- * @default -
5242
5236
  */
5243
5237
  rtm?: Rtm;
5244
5238
  /** {zh}
5245
5239
  * @brief 为播放器设置 FLV 拉流配置。FLV 格式流相关配置仅适用于支持 MSE 播放的 PC 端浏览器和安卓端浏览器。
5246
- * @default -
5247
5240
  */
5248
5241
  /** {en}
5249
5242
  * @brief Configurations for playing an FLV stream. You can only play FLV streams with web browsers on PC and Android devices, and the browsers need to support Media Source Extensions (MSE) playback.
5250
- * @default -
5251
5243
  */
5252
5244
  flv?: Flv;
5253
5245
  /** {zh}
@@ -5265,29 +5257,23 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
5265
5257
  hls?: Hls;
5266
5258
  /** {zh}
5267
5259
  * @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
5268
- * @default -
5269
5260
  */
5270
5261
  /** {en}
5271
5262
  * @brief Configures the information panel for the player, including options to show/hide the panel and the time interval between each information update. The panel supports displaying information for HLS and FLV addresses. If you opt for software decoding, additional information related to software decoding will be displayed.
5272
- * @default -
5273
5263
  */
5274
5264
  infoPanel?: InfoPanelConfig;
5275
5265
  /** {zh}
5276
5266
  * @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
5277
- * @default -
5278
5267
  */
5279
5268
  /** {en}
5280
5269
  * @brief Configurations for time shifting.
5281
- * @default -
5282
5270
  */
5283
5271
  timeShift?: TimeShiftConfig;
5284
5272
  /** {zh}
5285
5273
  * @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
5286
- * @default -
5287
5274
  */
5288
5275
  /** {en}
5289
5276
  * @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
5290
- * @default -
5291
5277
  */
5292
5278
  logger?: LoggerConfig;
5293
5279
  /** {zh}
@@ -5307,13 +5293,10 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
5307
5293
  */
5308
5294
  icons?: any;
5309
5295
  /** {zh}
5310
- * @hidden
5311
5296
  * @brief 商业 DRM 播放配置。
5312
- * @default -
5313
5297
  */
5314
5298
  /** {en}
5315
5299
  * @brief Digital Rights Management (DRM) configurations.
5316
- * @default -
5317
5300
  */
5318
5301
  drm?: Drm;
5319
5302
  }
@@ -5327,31 +5310,56 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
5327
5310
  */
5328
5311
  interface Abr {
5329
5312
  /** {zh}
5330
- * @brief 是否开启 abr
5331
- * - true: 开启
5332
- * - false: 关闭
5313
+ * @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
5314
+ * - true: 开启
5315
+ * - false: 关闭
5333
5316
  * @default true
5334
5317
  */
5318
+ /** {en}
5319
+ * @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
5320
+ * - true: Enable;
5321
+ * - false: Disable.
5322
+ */
5335
5323
  enable?: boolean;
5336
5324
  /** {zh}
5337
- * @brief 未开启abr的时候,是否开启降码率建议
5338
- * - true: 开启
5339
- * - false: 关闭
5325
+ * @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
5326
+ * - true: 开启;
5327
+ * - false: 关闭。
5340
5328
  * @default false
5329
+ * @hidden
5330
+ */
5331
+ /** {en}
5332
+ * @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
5333
+ * - true: Enable;
5334
+ * - false: Disable.
5335
+ * @hidden
5341
5336
  */
5342
5337
  downTip?: boolean;
5343
5338
  /** {zh}
5344
- * @brief 是否开始调试模式
5345
- * - true: 开启
5346
- * - false: 关闭
5339
+ * @brief 是否开始调试模式,默认为关闭。
5340
+ * - true: 开启;
5341
+ * - false: 关闭。
5342
+ * @default false
5343
+ */
5344
+ /** {en}
5345
+ * @brief Whether to start debug mode, default is false.
5346
+ * - true: Enable,
5347
+ * - false: Disable.
5348
+ * @default false
5347
5349
  */
5348
5350
  debug?: boolean;
5349
5351
  /** {zh}
5350
- * @brief url 参数对应的码率
5352
+ * @brief 当前拉流地址 URL 对应的码率。
5353
+ */
5354
+ /** {en}
5355
+ * @brief The bitrate corresponding to the current pull-stream address URL.
5351
5356
  */
5352
5357
  bitrate?: number;
5353
5358
  /** {zh}
5354
- * @brief 多个码率的拉流地址
5359
+ * @brief 自适应码率流信息。
5360
+ */
5361
+ /** {en}
5362
+ * @brief Adaptive bitrate (ABR) stream information.
5355
5363
  */
5356
5364
  urls?: {
5357
5365
  [bitrate: number]: string;
@@ -5360,35 +5368,53 @@ interface Abr {
5360
5368
  /** {zh}
5361
5369
  * @list option
5362
5370
  * @kind property
5371
+ * @hidden
5363
5372
  */
5364
5373
  /** {en}
5365
5374
  * @list option
5366
5375
  * @kind property
5376
+ * @hidden
5367
5377
  */
5368
5378
  interface HlsAbr {
5369
5379
  /** {zh}
5370
- * @brief 是否开启 abr
5371
- * - true: 开启
5372
- * - false: 关闭
5380
+ * @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
5381
+ * - true: 开启;
5382
+ * - false: 关闭。
5373
5383
  * @default true
5374
5384
  */
5385
+ /** {en}
5386
+ * @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
5387
+ * - true: Enable;
5388
+ * - false: Disable.
5389
+ */
5375
5390
  enable?: boolean;
5376
5391
  /** {zh}
5377
- * @brief 未开启abr的时候,是否开启降码率建议
5378
- * - true: 开启
5379
- * - false: 关闭
5392
+ * @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
5393
+ * - true: 开启;
5394
+ * - false: 关闭。
5380
5395
  * @default false
5381
5396
  */
5397
+ /** {en}
5398
+ * @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
5399
+ * - true: Enable;
5400
+ * - false: Disable.
5401
+ */
5382
5402
  downTip?: boolean;
5383
5403
  /** {zh}
5384
- * @brief 是否开始调试模式
5385
- * - true: 开启
5386
- * - false: 关闭
5404
+ * @brief 是否开始调试模式,默认为关闭。
5405
+ * - true: 开启;
5406
+ * - false: 关闭。
5407
+ * @default false
5408
+ */
5409
+ /** {en}
5410
+ * @brief Whether to start debug mode, default is false.
5411
+ * - true: Enable,
5412
+ * - false: Disable.
5413
+ * @default false
5387
5414
  */
5388
5415
  debug?: boolean;
5389
5416
  }
5390
5417
  /** {zh}
5391
- * @hidden
5392
5418
  * @list option
5393
5419
  * @kind property
5394
5420
  */
@@ -5398,15 +5424,14 @@ interface HlsAbr {
5398
5424
  */
5399
5425
  interface Drm {
5400
5426
  /** {zh}
5401
- * @brief FairPlay DRM 配置
5427
+ * @brief FairPlay DRM 配置。
5402
5428
  */
5403
5429
  /** {en}
5404
- * @brief FairPlay DRM configurations
5430
+ * @brief FairPlay DRM configurations.
5405
5431
  */
5406
5432
  fairplay?: FairplayDrm;
5407
5433
  }
5408
5434
  /** {zh}
5409
- * @hidden
5410
5435
  * @list option
5411
5436
  * @kind property
5412
5437
  */
@@ -5416,7 +5441,6 @@ interface Drm {
5416
5441
  */
5417
5442
  interface FairplayDrm extends FairplayDrmConfig {
5418
5443
  /** {zh}
5419
- * @hidden
5420
5444
  * @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
5421
5445
  * @param config
5422
5446
  * @returns 证书的请求地址和内容密钥许可证的请求地址。
@@ -5431,7 +5455,6 @@ interface FairplayDrm extends FairplayDrmConfig {
5431
5455
  }) => Promise<FairplayDrmConfig>;
5432
5456
  }
5433
5457
  /** {zh}
5434
- * @hidden
5435
5458
  * @list option
5436
5459
  * @kind property
5437
5460
  */
@@ -5441,17 +5464,17 @@ interface FairplayDrm extends FairplayDrmConfig {
5441
5464
  */
5442
5465
  interface FairplayDrmConfig {
5443
5466
  /** {zh}
5444
- * @brief 获取证书的请求地址
5467
+ * @brief 获取证书的请求地址。
5445
5468
  */
5446
5469
  /** {en}
5447
- * @brief URL used to acquire the FairPlay certificate
5470
+ * @brief URL used to acquire the FairPlay certificate.
5448
5471
  */
5449
5472
  serverCertificatePath?: string;
5450
5473
  /** {zh}
5451
- * @brief 获取内容密钥许可证的请求地址
5474
+ * @brief 获取内容密钥许可证的请求地址。
5452
5475
  */
5453
5476
  /** {en}
5454
- * @brief URL used to acquire the DRM license
5477
+ * @brief URL used to acquire the DRM license.
5455
5478
  */
5456
5479
  serverProcessSPCPath?: string;
5457
5480
  }
@@ -5575,9 +5598,12 @@ interface Rtm {
5575
5598
  */
5576
5599
  enableRTMAutoTranscode?: boolean;
5577
5600
  /** {zh}
5578
- * @brief 评估当前网络情况的间隔
5601
+ * @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
5579
5602
  * @default 1000
5580
5603
  */
5604
+ /** {en}
5605
+ * @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.
5606
+ */
5581
5607
  networkEvaluateInterval?: number;
5582
5608
  }
5583
5609
  /** {zh}
@@ -5630,28 +5656,55 @@ interface Flv {
5630
5656
  */
5631
5657
  enableLowLatency?: boolean;
5632
5658
  /** {zh}
5633
- * @brief 播放器发起 FLV 拉流请求时,开启低延时的详细配置。。
5634
- * @default -
5659
+ * @brief 低延时的详细配置。
5635
5660
  */
5636
5661
  /** {en}
5637
- * @brief
5638
- * @default -
5662
+ * @brief Detailed configuration for low latency.
5639
5663
  */
5640
5664
  lowLatency?: LowLatency;
5641
5665
  /** {zh}
5642
- * @brief 为播放器设置 FLV Abr 配置。
5643
- * @default -
5666
+ * @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
5667
+ */
5668
+ /** {en}
5669
+ * @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
5644
5670
  */
5645
5671
  abr?: Abr;
5646
5672
  /** {zh}
5647
5673
  * @hidden
5648
5674
  */
5675
+ /** {en}
5676
+ * @hidden
5677
+ */
5649
5678
  mseLowLatency?: boolean;
5650
5679
  /** {zh}
5651
- * @brief 超过 maxReaderInterval 时间还没有新数据返回视为断流,播放器触发 ended 事件, 单位 s。
5652
- * @default 5
5680
+ * @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
5681
+ * @default 5000
5682
+ */
5683
+ /** {en}
5684
+ * @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
5685
  */
5654
5686
  maxReaderInterval?: number;
5687
+ /** {zh}
5688
+ * @brief
5689
+ * 直播暂停时的断流等待时间,单位为秒,默认值为 0,表示直播暂停时即断流。
5690
+ * @default 0
5691
+ */
5692
+ /** {en}
5693
+ * @brief The waiting time for disconnection during live streaming suspension, measured in seconds. The default value is 0, indicating immediate disconnection when live streaming is suspended.
5694
+ * @default 0
5695
+ */
5696
+ disconnectTime?: number;
5697
+ /** {zh}
5698
+ * @brief 断流后重新拉流是否无缝,无缝拉流时重新拉流不会出现黑帧。
5699
+ * - `true`:是;
5700
+ * - `false`:否。
5701
+ * @default false
5702
+ */
5703
+ /** {en}
5704
+ * @brief Whether re-pulling the stream after disconnection is seamless. When seamless stream pulling, there will be no black frames during re-pulling. - `true`: Yes; - `false`: No.
5705
+ * @default false
5706
+ */
5707
+ seamlesslyReload?: boolean;
5655
5708
  }
5656
5709
  /** {zh}
5657
5710
  * @list option
@@ -5670,15 +5723,15 @@ interface LowLatency {
5670
5723
  */
5671
5724
  abrPts?: string | number;
5672
5725
  /** {zh}
5673
- * @brief FLV 低延时模式下,是否允许追帧
5674
- * - true:开启
5675
- * - false:关闭
5726
+ * @brief FLV 低延时模式下,是否开启倍速追帧。
5727
+ * - true:开启;
5728
+ * - false:关闭。
5676
5729
  * @default true
5677
5730
  */
5678
5731
  /** {en}
5679
- * @brief
5680
- * - true: Enable
5681
- * - false: Disable
5732
+ * @brief Whether to enable speed-up frame chasing in FLV low latency mode.
5733
+ * - true: enabled;
5734
+ * - false: disabled.
5682
5735
  * @default true
5683
5736
  */
5684
5737
  enableFrameChasing?: boolean;
@@ -5733,8 +5786,12 @@ interface Hls {
5733
5786
  */
5734
5787
  enableMSE?: boolean;
5735
5788
  /** {zh}
5736
- * @brief 为播放器设置 HLS Abr 配置。
5737
- * @default -
5789
+ * @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
5790
+ * @hidden
5791
+ */
5792
+ /** {en}
5793
+ * @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
5794
+ * @hidden
5738
5795
  */
5739
5796
  abr?: HlsAbr;
5740
5797
  /**
@@ -5742,83 +5799,415 @@ interface Hls {
5742
5799
  */
5743
5800
  mseLowLatency?: boolean;
5744
5801
  }
5802
+ /** {zh}
5803
+ * @list option
5804
+ * @kind property
5805
+ * @brief 在 RTM 拉流场景下,获取到的网络情况。
5806
+ */
5807
+ /** {en}
5808
+ * @list option
5809
+ * @kind property
5810
+ * @brief Network conditions obtained in the RTM pull stream scenario.
5811
+ */
5745
5812
  interface RTMNetWorkInfo {
5746
5813
  /** {zh}
5747
- * @brief 当前下载速度
5814
+ * @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
5815
+ */
5816
+ /** {en}
5817
+ * @brief The download speed within the latest network evaluation period, in units of bps.
5748
5818
  */
5749
5819
  speed?: number;
5750
5820
  /** {zh}
5751
- * @brief 当前平均下载速度
5821
+ * @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
5822
+ */
5823
+ /** {en}
5824
+ * @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
5752
5825
  */
5753
5826
  avgSpeed?: number;
5754
5827
  /** {zh}
5755
- * @brief 当前丢包率
5828
+ * @brief 最近一次网络评估周期内的网络丢包率。
5829
+ */
5830
+ /** {en}
5831
+ * @brief The packet loss rate of the network within the latest network evaluation cycle.
5756
5832
  */
5757
5833
  lostRate?: number;
5758
5834
  /** {zh}
5759
- * @brief 当前平均丢包率
5835
+ * @brief 最近 5 次网络评估周期内的网络丢包率平均值。
5836
+ */
5837
+ /** {en}
5838
+ * @brief The average network packet loss rate within the recent 5 network evaluation cycles.
5760
5839
  */
5761
5840
  avgLostRate?: number;
5762
5841
  }
5763
5842
  /** {zh}
5764
- * @brief RTM 信息
5843
+ * @list option
5844
+ * @kind property
5845
+ * @brief RTM 直播流播放信息。
5846
+ */
5847
+ /** {en}
5848
+ * @list option
5849
+ * @kind property
5850
+ * @brief RTM live stream information.
5765
5851
  */
5766
5852
  interface StatsSnapShoot {
5853
+ /** {en}
5854
+ * @brief Video information.
5855
+ */
5856
+ /** {zh}
5857
+ * @brief 视频信息。
5858
+ */
5767
5859
  video?: {
5860
+ /** {zh}
5861
+ * @hidden
5862
+ */
5863
+ /** {en}
5864
+ * @hidden
5865
+ */
5768
5866
  codec: string;
5867
+ /** {zh}
5868
+ * @hidden
5869
+ */
5870
+ /** {en}
5871
+ * @hidden
5872
+ */
5769
5873
  payloadType: string;
5874
+ /** {zh}
5875
+ * @hidden
5876
+ */
5877
+ /** {en}
5878
+ * @hidden
5879
+ */
5770
5880
  sdpFmtpLine: string;
5881
+ /** {zh}
5882
+ * @hidden
5883
+ */
5884
+ /** {en}
5885
+ * @hidden
5886
+ */
5771
5887
  bytesReceived: number;
5888
+ /** {zh}
5889
+ * @hidden
5890
+ */
5891
+ /** {en}
5892
+ * @hidden
5893
+ */
5772
5894
  firCount: number;
5895
+ /** {zh}
5896
+ * @hidden
5897
+ */
5898
+ /** {en}
5899
+ * @hidden
5900
+ */
5773
5901
  pliCount: number;
5902
+ /** {zh}
5903
+ * @brief 视频高度
5904
+ */
5905
+ /** {en}
5906
+ * @brief 视频高度
5907
+ */
5774
5908
  frameHeight: number;
5909
+ /** {zh}
5910
+ * @brief 视频宽度
5911
+ */
5912
+ /** {en}
5913
+ * @brief 视频宽度
5914
+ */
5775
5915
  frameWidth: number;
5916
+ /** {zh}
5917
+ * @hidden
5918
+ */
5919
+ /** {en}
5920
+ * @hidden
5921
+ */
5776
5922
  framesDecoded: number;
5923
+ /** {zh}
5924
+ * @hidden
5925
+ */
5926
+ /** {en}
5927
+ * @hidden
5928
+ */
5777
5929
  framesDropped: number;
5930
+ /** {zh}
5931
+ * @brief 视频帧率
5932
+ */
5933
+ /** {en}
5934
+ * @brief 视频帧率
5935
+ */
5778
5936
  framesPerSecond: number;
5937
+ /** {zh}
5938
+ * @hidden
5939
+ */
5940
+ /** {en}
5941
+ * @hidden
5942
+ */
5779
5943
  framesReceived: number;
5944
+ /** {zh}
5945
+ * @hidden
5946
+ */
5947
+ /** {en}
5948
+ * @hidden
5949
+ */
5780
5950
  jitter: number;
5951
+ /** {zh}
5952
+ * @hidden
5953
+ */
5954
+ /** {en}
5955
+ * @hidden
5956
+ */
5781
5957
  jitterBufferDelay: number;
5958
+ /** {zh}
5959
+ * @hidden
5960
+ */
5961
+ /** {en}
5962
+ * @hidden
5963
+ */
5782
5964
  keyFramesDecoded: number;
5965
+ /** {zh}
5966
+ * @hidden
5967
+ */
5968
+ /** {en}
5969
+ * @hidden
5970
+ */
5783
5971
  nackCount: number;
5972
+ /** {zh}
5973
+ * @brief 视频丢包总数
5974
+ */
5975
+ /** {en}
5976
+ * @brief 视频丢包总数
5977
+ */
5784
5978
  packetsLost: number;
5979
+ /** {zh}
5980
+ * @brief 视频收包总数
5981
+ */
5982
+ /** {en}
5983
+ * @brief 视频收包总数
5984
+ */
5785
5985
  packetsReceived: number;
5786
5986
  };
5987
+ /** {en}
5988
+ * @brief Audio information.
5989
+ */
5990
+ /** {zh}
5991
+ * @brief 音频信息。
5992
+ */
5787
5993
  audio?: {
5994
+ /** {zh}
5995
+ * @hidden
5996
+ */
5997
+ /** {en}
5998
+ * @hidden
5999
+ */
5788
6000
  codec: string;
6001
+ /** {zh}
6002
+ * @hidden
6003
+ */
6004
+ /** {en}
6005
+ * @hidden
6006
+ */
5789
6007
  payloadType: string;
6008
+ /** {zh}
6009
+ * @hidden
6010
+ */
6011
+ /** {en}
6012
+ * @hidden
6013
+ */
5790
6014
  sdpFmtpLine: string;
6015
+ /** {zh}
6016
+ * @hidden
6017
+ */
6018
+ /** {en}
6019
+ * @hidden
6020
+ */
5791
6021
  audioLevel: number;
6022
+ /** {zh}
6023
+ * @hidden
6024
+ */
6025
+ /** {en}
6026
+ * @hidden
6027
+ */
5792
6028
  bytesReceived: number;
6029
+ /** {zh}
6030
+ * @hidden
6031
+ */
6032
+ /** {en}
6033
+ * @hidden
6034
+ */
5793
6035
  jitter: number;
6036
+ /** {zh}
6037
+ * @hidden
6038
+ */
6039
+ /** {en}
6040
+ * @hidden
6041
+ */
5794
6042
  jitterBufferDelay: number;
6043
+ /** {zh}
6044
+ * @brief 音频丢包总数
6045
+ */
6046
+ /** {en}
6047
+ * @brief 音频丢包总数
6048
+ */
5795
6049
  packetsLost: number;
6050
+ /** {zh}
6051
+ * @brief 音频收包总数
6052
+ */
6053
+ /** {en}
6054
+ * @brief 音频收包总数
6055
+ */
5796
6056
  packetsReceived: number;
6057
+ /** {zh}
6058
+ * @hidden
6059
+ */
6060
+ /** {en}
6061
+ * @hidden
6062
+ */
5797
6063
  totalSamplesDuration: number;
6064
+ /** {zh}
6065
+ * @hidden
6066
+ */
6067
+ /** {en}
6068
+ * @hidden
6069
+ */
5798
6070
  totalSamplesReceived: number;
5799
6071
  };
5800
6072
  }
5801
6073
  /** {zh}
5802
- * @brief FLV 信息
6074
+ * @list option
6075
+ * @kind property
6076
+ * @brief FLV 直播流播放信息。
6077
+ */
6078
+ /** {en}
6079
+ * @list option
6080
+ * @kind property
6081
+ * @brief FLV live stream information.
5803
6082
  */
5804
6083
  interface FlvStats {
6084
+ /** {zh}
6085
+ * @brief 音频格式。
6086
+ * @hidden
6087
+ */
6088
+ /** {en}
6089
+ * @brief Audio format.
6090
+ * @hidden
6091
+ */
5805
6092
  audioCodec: string;
6093
+ /** {zh}
6094
+ * @brief 平均下载速度。
6095
+ */
6096
+ /** {en}
6097
+ * @brief Average download speed.
6098
+ */
5806
6099
  avgSpeed: number;
6100
+ /** {zh}
6101
+ * @brief 码率。
6102
+ */
6103
+ /** {en}
6104
+ * @brief bitrate.
6105
+ */
5807
6106
  bitrate: number;
6107
+ /** {zh}
6108
+ * @brief 剩余缓冲时间。
6109
+ */
6110
+ /** {en}
6111
+ * @brief Remaining buffer time.
6112
+ */
5808
6113
  bufferEnd: number;
6114
+ /** {zh}
6115
+ * @hidden
6116
+ */
6117
+ /** {en}
6118
+ * @hidden
6119
+ */
5809
6120
  channelCount: number;
6121
+ /** {zh}
6122
+ * @brief 当前播放时间。
6123
+ */
6124
+ /** {en}
6125
+ * @brief The current playing time.
6126
+ */
5810
6127
  currentTime: number;
6128
+ /** {zh}
6129
+ * @hidden
6130
+ */
6131
+ /** {en}
6132
+ * @hidden
6133
+ */
5811
6134
  decodeFps: number;
6135
+ /** {zh}
6136
+ * @hidden
6137
+ */
6138
+ /** {en}
6139
+ * @hidden
6140
+ */
5812
6141
  domain: string;
6142
+ /** {zh}
6143
+ * @brief 当前下载速度。
6144
+ */
6145
+ /** {en}
6146
+ * @brief Current download speed.
6147
+ */
5813
6148
  downloadSpeed: number;
6149
+ /** {zh}
6150
+ * @brief 编码方式。
6151
+ */
6152
+ /** {en}
6153
+ * @brief Encoding method.
6154
+ */
5814
6155
  encodeType: string;
6156
+ /** {zh}
6157
+ * @brief 帧率。
6158
+ */
6159
+ /** {en}
6160
+ * @brief Frame rate.
6161
+ */
5815
6162
  fps: number;
6163
+ /** {zh}
6164
+ * @hidden
6165
+ */
6166
+ /** {en}
6167
+ * @hidden
6168
+ */
5816
6169
  gop: number;
6170
+ /** {zh}
6171
+ * @brief 视频高度。
6172
+ */
6173
+ /** {en}
6174
+ * @brief Video height.
6175
+ */
5817
6176
  height: number;
6177
+ /** {zh}
6178
+ * @hidden
6179
+ */
6180
+ /** {en}
6181
+ * @hidden
6182
+ */
5818
6183
  samplerate: number;
6184
+ /** {zh}
6185
+ * @brief 总共收到的字节数。
6186
+ */
6187
+ /** {en}
6188
+ * @brief The total number of bytes received.
6189
+ */
5819
6190
  totalReceivedByte: number;
6191
+ /** {zh}
6192
+ * @brief 接收所有字节消耗时长。
6193
+ */
6194
+ /** {en}
6195
+ * @brief The time consumed for receiving all bytes.
6196
+ */
5820
6197
  totalReceivedCost: number;
6198
+ /** {zh}
6199
+ * @hidden
6200
+ */
6201
+ /** {en}
6202
+ * @hidden
6203
+ */
5821
6204
  videoCodec: string;
6205
+ /** {zh}
6206
+ * @brief 视频宽度。
6207
+ */
6208
+ /** {en}
6209
+ * @brief Video wight.
6210
+ */
5822
6211
  width: number;
5823
6212
  }
5824
6213
  /** {zh}
@@ -5842,7 +6231,10 @@ declare class VePlayerLive extends VePlayerBase {
5842
6231
  */
5843
6232
  constructor(options: LiveVePlayerOptions);
5844
6233
  /** {zh}
5845
- * @brief 获取已经播放的时间
6234
+ * @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
6235
+ */
6236
+ /** {en}
6237
+ * @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
5846
6238
  */
5847
6239
  get playTime(): number;
5848
6240
  /** {zh}
@@ -5876,49 +6268,80 @@ declare class VePlayerLive extends VePlayerBase {
5876
6268
  */
5877
6269
  closeInfoPanel(): void;
5878
6270
  /** {zh}
5879
- * @brief 打开 Abr
6271
+ * @brief 打开码率自适应(ABR)切换功能。
6272
+ */
6273
+ /** {en}
6274
+ * @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
5880
6275
  */
5881
6276
  openAbr(): void;
5882
6277
  /** {zh}
5883
- * @brief 关闭 Abr
6278
+ * @brief 关闭码率自适应(ABR)切换功能。
6279
+ */
6280
+ /** {en}
6281
+ * @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
5884
6282
  */
5885
6283
  closeAbr(): void;
5886
6284
  /** {zh}
5887
- * @brief 调用此方法更新 DRM 鉴权配置。
5888
- * @hidden
6285
+ * @brief 调用此方法更新 DRM 配置。
6286
+ */
6287
+ /** {en}
6288
+ * @brief Use this method to update DRM configuration.
6289
+ * @param config
5889
6290
  */
5890
6291
  updateDrmConfig(config: FairplayDrmConfig): void;
5891
6292
  /** {zh}
5892
- * @brief 切换 flv Abr
5893
- * @param options 切换 Abr 的配置。
6293
+ * @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
6294
+ * @param options ABR 的配置。
5894
6295
  * @returns
5895
6296
  */
6297
+ /** {en}
6298
+ * @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
6299
+ * @param options Configuration of ABR.
6300
+ */
5896
6301
  switchAbr(options: {
5897
6302
  /** {zh}
5898
- * @brief 是否开启 Abr
5899
- * - true: 开启
5900
- * - false: 关闭
6303
+ * @brief 是否开启 ABR 功能。
6304
+ * - true:开启
6305
+ * - false:关闭
6306
+ */
6307
+ /** {en}
6308
+ * @brief Whether to enable the ABR function.
6309
+ * - true: Enabled ;
6310
+ * - false: Disabled
6311
+ * @default -
5901
6312
  */
5902
6313
  enable: boolean;
5903
6314
  /** {zh}
5904
- * @brief 切换 Abr 的码率
6315
+ * @brief 切换自适应码率直播流对应的码率。
6316
+ */
6317
+ /** {en}
6318
+ * @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
5905
6319
  */
5906
6320
  bitrate: number;
5907
6321
  }): void;
5908
6322
  /** {zh}
5909
- * @brief 获取 RTM 的网络相关信息
6323
+ * @brief 获取 RTM 拉流的网络评估信息。
5910
6324
  * @returns
5911
6325
  */
6326
+ /** {en}
6327
+ * @brief Obtain the network assessment information of RTM pull streaming.
6328
+ */
5912
6329
  getRTMNetWorkInfo(): RTMNetWorkInfo;
5913
6330
  /** {zh}
5914
- * @brief 获取 RTM 播放信息
6331
+ * @brief 获取 RTM 拉流的播放信息。
5915
6332
  * @returns
5916
6333
  */
6334
+ /** {en}
6335
+ * @brief Obtain the playback information of RTM pull stream.
6336
+ */
5917
6337
  getRTMStats(): Promise<StatsSnapShoot>;
5918
6338
  /** {zh}
5919
- * @brief 获取 FLV 播放信息
6339
+ * @brief 获取 FLV 拉流的播放信息。
5920
6340
  * @returns
5921
6341
  */
6342
+ /** {en}
6343
+ * @brief Obtain the playback information of FLV pull streaming.
6344
+ */
5922
6345
  getFLVStats(): FlvStats;
5923
6346
  }
5924
6347
  /** {zh}
@@ -5976,7 +6399,7 @@ declare function isRTMSupported(): Promise<boolean>;
5976
6399
  /** {zh}
5977
6400
  * @detail api
5978
6401
  * @brief 当前浏览器是否支持 H264 RTM 流播放。
5979
- * @param codec 播放格式,目前只支持 `H264`
6402
+ * @param codec 播放格式,目前只支持 `H264`。
5980
6403
  * @returns
5981
6404
  */
5982
6405
  /** {en}
@@ -6130,14 +6553,15 @@ declare namespace live {
6130
6553
  }
6131
6554
  /** {zh}
6132
6555
  * @detail error
6556
+ * @brief 错误等级。
6133
6557
  */
6134
6558
  /** {en}
6135
6559
  * @detail error
6560
+ * @brief Error level.
6136
6561
  */
6137
6562
  enum Level {
6138
6563
  /** {zh}
6139
- * @brief 严重
6140
- *
6564
+ * @brief 严重。
6141
6565
  */
6142
6566
  /** {en}
6143
6567
  * @brief Fatal.
@@ -6145,7 +6569,7 @@ declare namespace live {
6145
6569
  */
6146
6570
  Fatal = "Fatal",
6147
6571
  /** {zh}
6148
- * @brief 报错
6572
+ * @brief 报错。
6149
6573
  */
6150
6574
  /** {en}
6151
6575
  * @brief Error.
@@ -6513,7 +6937,7 @@ declare namespace live {
6513
6937
  /** {zh}
6514
6938
  * @list error
6515
6939
  * @detail error
6516
- * @brief 错误对象
6940
+ * @brief 错误对象。
6517
6941
  * @name VeError
6518
6942
  * @id VeError
6519
6943
  */
@@ -6525,11 +6949,11 @@ declare namespace live {
6525
6949
  * @id VeError
6526
6950
  */
6527
6951
  class VeError<T extends string = TextKey> extends Error {
6528
- /**
6952
+ /** {zh}
6529
6953
  * @brief 错误码。
6530
6954
  */
6531
6955
  /** {en}
6532
- * @brief The error code.
6956
+ * @brief Error code.
6533
6957
  */
6534
6958
  readonly errorCode: ErrorCode;
6535
6959
  /** {zh}
@@ -7025,20 +7449,32 @@ declare namespace live {
7025
7449
  REFRESH_CLICK = "refreshClick",
7026
7450
  /** {zh}
7027
7451
  * Abr 切换码率
7452
+ * @brief 切换自适应码率流
7453
+ */
7454
+ /** {en}
7455
+ * @brief Event for switching Adaptive Bitrate (ABR) streams.
7028
7456
  */
7029
7457
  ABR_SWITCH_START = "abrSwitchStart",
7030
7458
  /** {zh}
7031
7459
  * Abr 切换码率成功
7460
+ * @brief 成功切换自适应码率直播流
7461
+ */
7462
+ /** {en}
7463
+ * @brief Event of successfully switching Adaptive Bitrate (ABR) live stream.
7032
7464
  */
7033
7465
  ABR_SWITCH_SUCCESS = "abrSwitchedSuccess",
7034
7466
  /** {zh}
7035
7467
  * Abr 切换码率失败
7468
+ * @brief 切换自适应码率直播流失败
7469
+ */
7470
+ /** {en}
7471
+ * @brief Event of failing to switch Adaptive Bitrate (ABR) live stream.
7036
7472
  */
7037
7473
  ABR_SWITCH_FAILED = "abrSwitchFailed"
7038
7474
  }
7039
7475
  /** {zh}
7040
7476
  * @detail events
7041
- * @brief 事件回调
7477
+ * @brief 事件回调。
7042
7478
  * @hiddenDefault
7043
7479
  * @example
7044
7480
  * ```js
@@ -7181,6 +7617,8 @@ declare namespace live {
7181
7617
  /** {en}
7182
7618
  * The player has focus.
7183
7619
  * @param data Information about the event.
7620
+ * @brief
7621
+ * The player has focus.
7184
7622
  */
7185
7623
  [LiveEvents.PLAYER_FOCUS]: (data: {
7186
7624
  /** {zh}
@@ -7568,53 +8006,77 @@ declare namespace live {
7568
8006
  };
7569
8007
  }) => void;
7570
8008
  /** {zh}
7571
- * 时移状态切换。
8009
+ * @brief 时移状态切换。
7572
8010
  * @param isTimeShift 是否是时移状态。
7573
8011
  */
7574
8012
  /** {en}
7575
- * The time-shift state changes.
8013
+ * @brief The time-shift state changes.
7576
8014
  * @param isTimeShift Whether the live stream is time-shifted.
7577
8015
  */
7578
8016
  [LiveEvents.TIME_SHIFT_CHANGE]: (isTimeShift: boolean) => void;
7579
8017
  /** {zh}
7580
- * 点击刷新按钮。
8018
+ * @brief 点击刷新按钮。
7581
8019
  */
7582
8020
  /** {en}
7583
- * The user clicks the Refresh button.
8021
+ * @brief The user clicks the Refresh button.
7584
8022
  */
7585
8023
  [LiveEvents.REFRESH_CLICK]: () => void;
7586
8024
  /** {zh}
7587
- * Abr 切换码率
8025
+ * @brief 切换自适应码率流的事件回调。
8026
+ */
8027
+ /** {en}
8028
+ * @brief Event callback for switching Adaptive Bitrate (ABR) streams.
7588
8029
  */
7589
8030
  [LiveEvents.ABR_SWITCH_START]: (data: {
7590
8031
  /** {zh}
7591
- * 切换的码率
8032
+ * @brief 切换后的码率。
8033
+ */
8034
+ /** {en}
8035
+ * @brief Bitrate after switching.
7592
8036
  */
7593
8037
  bitrate: number;
7594
8038
  }) => void;
7595
8039
  /** {zh}
7596
- * Abr 切换码率成功
8040
+ * @brief 成功切换自适应码率流的事件回调。
8041
+ */
8042
+ /** {en}
8043
+ * @brief Event callback of successfully switching Adaptive Bitrate (ABR) live stream.
7597
8044
  */
7598
8045
  [LiveEvents.ABR_SWITCH_SUCCESS]: (data: {
7599
8046
  /** {zh}
7600
- * 切换的码率
8047
+ * @brief 切换后的码率。
8048
+ */
8049
+ /** {en}
8050
+ * @brief Bitrate after switching.
7601
8051
  */
7602
8052
  bitrate: number;
7603
- /**
7604
- * 切换的地址
8053
+ /** {zh}
8054
+ * @brief 切换后的播放地址。
8055
+ */
8056
+ /** {en}
8057
+ * @brief The playback address after the switch.
7605
8058
  */
7606
8059
  url: string;
7607
8060
  }) => void;
7608
8061
  /** {zh}
7609
- * Abr 切换码率失败
8062
+ * @brief 切换自适应码率直播流失败的事件回调。
8063
+ */
8064
+ /** {en}
8065
+ * @brief Event callback of failing to switch Adaptive Bitrate (ABR) live stream.
7610
8066
  */
7611
8067
  [LiveEvents.ABR_SWITCH_FAILED]: (data: {
7612
8068
  /** {zh}
7613
- * 切换的码率
8069
+ * @brief 切换的码率。
8070
+ */
8071
+ /** {en}
8072
+ * @brief Bitrate after switching.
7614
8073
  */
7615
8074
  bitrate: number;
7616
- /**
7617
- * 切换的地址
8075
+ /** {zh}
8076
+ * @brief 切换后的播放地址。
8077
+ */
8078
+ /** {en}
8079
+ * @brief The playback address after the switch.
7618
8080
  */
7619
8081
  url: string;
7620
8082
  }) => void;
@@ -7759,7 +8221,7 @@ declare namespace live {
7759
8221
  */
7760
8222
  enum ListType {
7761
8223
  /** {zh}
7762
- * @brief 全屏布局
8224
+ * @brief 全屏布局。
7763
8225
  * @hidden
7764
8226
  */
7765
8227
  /** {en}
@@ -7768,21 +8230,21 @@ declare namespace live {
7768
8230
  */
7769
8231
  Middle = "middle",
7770
8232
  /** {zh}
7771
- * @brief 底部抽屉
8233
+ * @brief 底部抽屉。
7772
8234
  */
7773
8235
  /** {en}
7774
8236
  * @brief Bottom navigation drawer.
7775
8237
  */
7776
8238
  Bottom = "bottom",
7777
8239
  /** {zh}
7778
- * @brief 右侧抽屉,常用于全屏时展示
8240
+ * @brief 右侧抽屉,常用于全屏时展示。
7779
8241
  */
7780
8242
  /** {en}
7781
8243
  * @brief Right navigation drawer. This is often used for fullscreen display.
7782
8244
  */
7783
8245
  Fullscreen = "fullscreen",
7784
8246
  /** {zh}
7785
- * @brief 窗口蒙层展示
8247
+ * @brief 窗口蒙层展示。
7786
8248
  */
7787
8249
  /** {en}
7788
8250
  * @brief Overlay.
@@ -8195,11 +8657,9 @@ declare namespace live {
8195
8657
  poster?: string;
8196
8658
  /** {zh}
8197
8659
  * @brief 为播放器设置初始显示语言,语言包不存在的情况下默认显示 'en' 语言包 。默认值为 `document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn'`
8198
- * @default -
8199
8660
  */
8200
8661
  /** {en}
8201
8662
  * @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
8663
  */
8204
8664
  lang?: Lang;
8205
8665
  /** {zh}
@@ -8258,25 +8718,20 @@ declare namespace live {
8258
8718
  * @brief Whether to display the full-screen button.
8259
8719
  * - `true`: Display;
8260
8720
  * - `false`: Do not display.
8261
- * @default -
8262
8721
  */
8263
8722
  fullscreen?: boolean | Fullscreen;
8264
8723
  /** {zh}
8265
8724
  * @brief 为播放器设置报错信息,支持配置播放异常时,播放器显示的异常文案、图片,以及是否提供刷新按钮等。
8266
- * @default -
8267
8725
  */
8268
8726
  /** {en}
8269
8727
  * @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
8728
  */
8272
8729
  error?: ErrorConfig;
8273
8730
  /** {zh}
8274
8731
  * @brief 为播放器设置清晰度的相关配置。
8275
- * @default -
8276
8732
  */
8277
8733
  /** {en}
8278
8734
  * @brief Resolution-related configurations.
8279
- * @default -
8280
8735
  */
8281
8736
  definition?: DefinitionConfig;
8282
8737
  /** {zh}
@@ -8537,8 +8992,7 @@ declare namespace live {
8537
8992
  * `true`: Display;
8538
8993
  * `false`: Do not display.
8539
8994
  * @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.
8995
+ * @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
8996
  * - `true`: Display;
8543
8997
  * - `false`: Do not display.
8544
8998
  */
@@ -8556,7 +9010,7 @@ declare namespace live {
8556
9010
  */
8557
9011
  interface CommonStyle {
8558
9012
  /** {zh}
8559
- * @brief 进度条底色
9013
+ * @brief 进度条底色。
8560
9014
  * @default 无
8561
9015
  */
8562
9016
  /** {en}
@@ -8564,7 +9018,7 @@ declare namespace live {
8564
9018
  */
8565
9019
  progressColor?: string;
8566
9020
  /** {zh}
8567
- * @brief 播放完成部分进度条底色
9021
+ * @brief 播放完成部分进度条底色。
8568
9022
  * @default 无
8569
9023
  */
8570
9024
  /** {en}
@@ -8572,7 +9026,7 @@ declare namespace live {
8572
9026
  */
8573
9027
  playedColor?: string;
8574
9028
  /** {zh}
8575
- * @brief 缓存部分进度条底色
9029
+ * @brief 缓存部分进度条底色。
8576
9030
  * @default 无
8577
9031
  */
8578
9032
  /** {en}
@@ -8581,7 +9035,7 @@ declare namespace live {
8581
9035
  */
8582
9036
  cachedColor?: string;
8583
9037
  /** {zh}
8584
- * @brief 进度条滑块样式
9038
+ * @brief 进度条滑块样式。
8585
9039
  * @default 无
8586
9040
  */
8587
9041
  /** {en}
@@ -8592,7 +9046,7 @@ declare namespace live {
8592
9046
  [propName: string]: any;
8593
9047
  };
8594
9048
  /** {zh}
8595
- * @brief 音量颜色
9049
+ * @brief 音量颜色。
8596
9050
  * @default 无
8597
9051
  */
8598
9052
  /** {en}
@@ -8616,14 +9070,14 @@ declare namespace live {
8616
9070
  */
8617
9071
  enum Codec {
8618
9072
  /** {zh}
8619
- * @brief H.265 编码格式
9073
+ * @brief H.265 编码格式。
8620
9074
  */
8621
9075
  /** {en}
8622
9076
  * @brief H.265.
8623
9077
  */
8624
9078
  H265 = "h265",
8625
9079
  /** {zh}
8626
- * @brief H.264 编码格式
9080
+ * @brief H.264 编码格式。
8627
9081
  */
8628
9082
  /** {en}
8629
9083
  * @brief H.264.
@@ -8640,18 +9094,18 @@ declare namespace live {
8640
9094
  */
8641
9095
  enum Degradation {
8642
9096
  /** {zh}
8643
- * @brief 硬解不支持降级到软解
9097
+ * @brief 硬解不支持时,优先降级到软解。
8644
9098
  */
8645
9099
  /** {en}
8646
- * @brief The player does not support falling back to software decoding.
9100
+ * @brief When hardware decoding is not supported, prioritize downgrading to software decoding.
8647
9101
  */
8648
9102
  SoftFirst = "soft-first",
8649
9103
  /** {zh}
8650
- * @brief 硬解不支持降级到h264
9104
+ * @brief 硬解不支持时,优先降级到 H.264 解码。
8651
9105
  * @hidden
8652
9106
  */
8653
9107
  /** {en}
8654
- * @brief The player does not support falling back to H.264.
9108
+ * @brief When hardware decoding is not supported, prioritize downgrading to H.264 decoding.
8655
9109
  * @hidden
8656
9110
  */
8657
9111
  H264First = "h264-first"
@@ -8668,14 +9122,14 @@ declare namespace live {
8668
9122
  */
8669
9123
  enum DecodeType {
8670
9124
  /** {zh}
8671
- * @brief 软解
9125
+ * @brief 软解。
8672
9126
  */
8673
9127
  /** {en}
8674
9128
  * @brief Software decoding.
8675
9129
  */
8676
9130
  Software = "software",
8677
9131
  /** {zh}
8678
- * @brief 硬解
9132
+ * @brief 硬解。
8679
9133
  */
8680
9134
  /** {en}
8681
9135
  * @brief Hardware decoding.
@@ -8866,6 +9320,11 @@ declare namespace live {
8866
9320
  /** {zh}
8867
9321
  * 获取播放器版本号
8868
9322
  * @returns
9323
+ * @brief
9324
+ * 获取播放器 SDK 版本号。
9325
+ */
9326
+ /** {en}
9327
+ * @brief Retrieve the player SDK version number.
8869
9328
  */
8870
9329
  get playerVersion(): string;
8871
9330
  /** {zh}
@@ -8953,8 +9412,8 @@ declare namespace live {
8953
9412
  static create<T extends VePlayerBase>(options?: VePlayerBaseOptions, Constructor?: Constructor<T>): Promise<T>;
8954
9413
  /** {zh}
8955
9414
  * @brief 调用此方法切换拉流地址、线路、清晰度。
8956
- * @param target 目标地址,可以是播放地址,也可以是线路和清晰度
8957
- * @param options 更多配置信息
9415
+ * @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
9416
+ * @param options 更多配置信息。
8958
9417
  */
8959
9418
  /** {en}
8960
9419
  * @brief Switches the pull stream address, playback source, or resolution.
@@ -8991,11 +9450,12 @@ declare namespace live {
8991
9450
  */
8992
9451
  fallbackToFirstDefinition?: boolean;
8993
9452
  /** {zh}
8994
- * @brief 是否无缝切换
8995
- * - true: 无缝切换
8996
- * - false: 非无缝切换
9453
+ * @brief 是否无缝切换,true 为无缝切换,false 为非无缝切换。
8997
9454
  * @default false
8998
9455
  */
9456
+ /** {en}
9457
+ * @brief Whether seamless switching or not. True means seamless switching and false means non-seamless switching.
9458
+ */
8999
9459
  seamless?: boolean;
9000
9460
  }): Promise<ExposedDefinition>;
9001
9461
  /** {zh}
@@ -9031,16 +9491,15 @@ declare namespace live {
9031
9491
  source?: string;
9032
9492
  }): Promise<void>;
9033
9493
  // TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
9034
- /**
9035
9494
  /** {zh}
9036
9495
  * @brief 调用此方法监听指定事件,事件处理函数只执行一次。
9037
9496
  * @param event 表示事件的名称。
9038
9497
  * @param callback 表示事件的回调函数。
9039
9498
  */
9040
9499
  /** {en}
9041
- * @brief Add a one-time listener function for the specified event.
9042
- * @param event The event name.
9043
- * @param callback The callback function for the event.
9500
+ * @brief Call this method to listen for the specified event. The event handler is executed only once.
9501
+ * @param event The name representing the event.
9502
+ * @param callback Callback functions representing events.
9044
9503
  */
9045
9504
  once(event: string, callback: (data?: any) => any): void;
9046
9505
  /** {zh}
@@ -9166,10 +9625,14 @@ declare namespace live {
9166
9625
  ignorePaused?: boolean;
9167
9626
  }): void;
9168
9627
  /** {zh}
9169
- * @brief 判断浏览器是否支持播放格式
9170
- * @param type 播放格式
9628
+ * @brief 判断浏览器是否支持播放格式。
9629
+ * @param type 播放格式。
9171
9630
  * @returns
9172
9631
  */
9632
+ /** {en}
9633
+ * @brief Determine whether the browser supports the playback format.
9634
+ * @param type The playback format.
9635
+ */
9173
9636
  canPlayType(type: string): boolean;
9174
9637
  /** {zh}
9175
9638
  * @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
@@ -9249,7 +9712,7 @@ declare namespace live {
9249
9712
  unRegisterPlugin(plugin: any): void;
9250
9713
  /** {zh}
9251
9714
  * @brief 调用此接口显示指定插件图标。
9252
- * @param pluginNames 插件名称
9715
+ * @param pluginNames 插件名称。
9253
9716
  */
9254
9717
  /** {en}
9255
9718
  * @brief Displays the icon of a specified plugin.
@@ -9258,7 +9721,7 @@ declare namespace live {
9258
9721
  showIcon(pluginNames: string[]): void;
9259
9722
  /** {zh}
9260
9723
  * @brief 调用此接口隐藏指定插件图标。
9261
- * @param pluginNames 插件名称
9724
+ * @param pluginNames 插件名称。
9262
9725
  */
9263
9726
  /** {en}
9264
9727
  * @brief Hides the icon of a specified plugin.
@@ -9386,22 +9849,22 @@ declare namespace live {
9386
9849
  * @detail api
9387
9850
  * @brief 当前浏览器是否支持播放编码格式。
9388
9851
  * @param codec 编码格式。
9389
- * `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
9390
- * `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
9852
+ * - `Codec.H264`: 返回当前浏览器是否支持 MediaSource Extends
9853
+ * - `Codec.H265`: 返回当前浏览器是否支持硬解播放 H265。
9391
9854
  * @returns
9392
9855
  */
9393
9856
  /** {en}
9394
9857
  * @detail api
9395
9858
  * @brief Checkes whether the current browser supports the specified encoding format.
9396
9859
  * @param codec The encoding format.
9397
- * `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
9398
- * `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
9860
+ * - `Codec.H264`: Checks whether the current browser supports MediaSource Extends.
9861
+ * - `Codec.H265`: Checks whether the current browser supports H.265 using hardware decoding.
9399
9862
  * @returns
9400
9863
  */
9401
9864
  function isMseSupported(codec?: string): boolean;
9402
9865
  /** {zh}
9403
9866
  * @detail api
9404
- * @brief 当前浏览器是否支持软解
9867
+ * @brief 当前浏览器是否支持软解。
9405
9868
  * @returns
9406
9869
  */
9407
9870
  /** {en}
@@ -10044,20 +10507,16 @@ declare namespace live {
10044
10507
  interface LiveVePlayerOptions extends VePlayerBaseOptions {
10045
10508
  /** {zh}
10046
10509
  * @brief 为播放器设置 RTM 拉流配置。
10047
- * @default -
10048
10510
  */
10049
10511
  /** {en}
10050
10512
  * @brief Configurations for playing an RTM stream.
10051
- * @default -
10052
10513
  */
10053
10514
  rtm?: Rtm;
10054
10515
  /** {zh}
10055
10516
  * @brief 为播放器设置 FLV 拉流配置。FLV 格式流相关配置仅适用于支持 MSE 播放的 PC 端浏览器和安卓端浏览器。
10056
- * @default -
10057
10517
  */
10058
10518
  /** {en}
10059
10519
  * @brief Configurations for playing an FLV stream. You can only play FLV streams with web browsers on PC and Android devices, and the browsers need to support Media Source Extensions (MSE) playback.
10060
- * @default -
10061
10520
  */
10062
10521
  flv?: Flv;
10063
10522
  /** {zh}
@@ -10075,29 +10534,23 @@ declare namespace live {
10075
10534
  hls?: Hls;
10076
10535
  /** {zh}
10077
10536
  * @brief 为播放器设置直播信息展示面板配置,支持设置是否显示面板和信息刷新时间间隔。当前直播信息面板支持展示 HLS 和 FLV 格式的直播信息,如果是软解播放,会额外显示软解相关信息。
10078
- * @default -
10079
10537
  */
10080
10538
  /** {en}
10081
10539
  * @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
10540
  */
10084
10541
  infoPanel?: InfoPanelConfig;
10085
10542
  /** {zh}
10086
10543
  * @brief 为播放器设置直播时移配置,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#直播时移)。
10087
- * @default -
10088
10544
  */
10089
10545
  /** {en}
10090
10546
  * @brief Configurations for time shifting.
10091
- * @default -
10092
10547
  */
10093
10548
  timeShift?: TimeShiftConfig;
10094
10549
  /** {zh}
10095
10550
  * @brief 日志上报配置,支持设置开启/关闭开始日志上报并设置日志参数,接入方法请参见[功能接入](https://www.volcengine.com/docs/6469/138655#日志上报)。
10096
- * @default -
10097
10551
  */
10098
10552
  /** {en}
10099
10553
  * @brief Configurations for log upload. Supports enabling/disabling log upload and setting log parameters.
10100
- * @default -
10101
10554
  */
10102
10555
  logger?: LoggerConfig;
10103
10556
  /** {zh}
@@ -10117,13 +10570,10 @@ declare namespace live {
10117
10570
  */
10118
10571
  icons?: any;
10119
10572
  /** {zh}
10120
- * @hidden
10121
10573
  * @brief 商业 DRM 播放配置。
10122
- * @default -
10123
10574
  */
10124
10575
  /** {en}
10125
10576
  * @brief Digital Rights Management (DRM) configurations.
10126
- * @default -
10127
10577
  */
10128
10578
  drm?: Drm;
10129
10579
  }
@@ -10137,31 +10587,56 @@ declare namespace live {
10137
10587
  */
10138
10588
  interface Abr {
10139
10589
  /** {zh}
10140
- * @brief 是否开启 abr
10141
- * - true: 开启
10142
- * - false: 关闭
10590
+ * @brief 是否开启 FLV 拉流时的自适应码率(ABR)功能,默认为开启。
10591
+ * - true: 开启
10592
+ * - false: 关闭
10143
10593
  * @default true
10144
10594
  */
10595
+ /** {en}
10596
+ * @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
10597
+ * - true: Enable;
10598
+ * - false: Disable.
10599
+ */
10145
10600
  enable?: boolean;
10146
10601
  /** {zh}
10147
- * @brief 未开启abr的时候,是否开启降码率建议
10148
- * - true: 开启
10149
- * - false: 关闭
10602
+ * @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
10603
+ * - true: 开启;
10604
+ * - false: 关闭。
10150
10605
  * @default false
10606
+ * @hidden
10607
+ */
10608
+ /** {en}
10609
+ * @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
10610
+ * - true: Enable;
10611
+ * - false: Disable.
10612
+ * @hidden
10151
10613
  */
10152
10614
  downTip?: boolean;
10153
10615
  /** {zh}
10154
- * @brief 是否开始调试模式
10155
- * - true: 开启
10156
- * - false: 关闭
10616
+ * @brief 是否开始调试模式,默认为关闭。
10617
+ * - true: 开启;
10618
+ * - false: 关闭。
10619
+ * @default false
10620
+ */
10621
+ /** {en}
10622
+ * @brief Whether to start debug mode, default is false.
10623
+ * - true: Enable,
10624
+ * - false: Disable.
10625
+ * @default false
10157
10626
  */
10158
10627
  debug?: boolean;
10159
10628
  /** {zh}
10160
- * @brief url 参数对应的码率
10629
+ * @brief 当前拉流地址 URL 对应的码率。
10630
+ */
10631
+ /** {en}
10632
+ * @brief The bitrate corresponding to the current pull-stream address URL.
10161
10633
  */
10162
10634
  bitrate?: number;
10163
10635
  /** {zh}
10164
- * @brief 多个码率的拉流地址
10636
+ * @brief 自适应码率流信息。
10637
+ */
10638
+ /** {en}
10639
+ * @brief Adaptive bitrate (ABR) stream information.
10165
10640
  */
10166
10641
  urls?: {
10167
10642
  [bitrate: number]: string;
@@ -10170,35 +10645,53 @@ declare namespace live {
10170
10645
  /** {zh}
10171
10646
  * @list option
10172
10647
  * @kind property
10648
+ * @hidden
10173
10649
  */
10174
10650
  /** {en}
10175
10651
  * @list option
10176
10652
  * @kind property
10653
+ * @hidden
10177
10654
  */
10178
10655
  interface HlsAbr {
10179
10656
  /** {zh}
10180
- * @brief 是否开启 abr
10181
- * - true: 开启
10182
- * - false: 关闭
10657
+ * @brief 是否开启 HLS 拉流自适应码率(ABR)功能,默认为开启。
10658
+ * - true: 开启;
10659
+ * - false: 关闭。
10183
10660
  * @default true
10184
10661
  */
10662
+ /** {en}
10663
+ * @brief Enable or disable the Adaptive Bitrate (ABR) feature. The default setting is enabled.
10664
+ * - true: Enable;
10665
+ * - false: Disable.
10666
+ */
10185
10667
  enable?: boolean;
10186
10668
  /** {zh}
10187
- * @brief 未开启abr的时候,是否开启降码率建议
10188
- * - true: 开启
10189
- * - false: 关闭
10669
+ * @brief 未开启 ABR 时,是否开启码率切换建议事件发送,默认为关闭。
10670
+ * - true: 开启;
10671
+ * - false: 关闭。
10190
10672
  * @default false
10191
10673
  */
10674
+ /** {en}
10675
+ * @brief When ABR is disabled, determine whether to enable the bitrate switch suggestion event. The default setting is false.
10676
+ * - true: Enable;
10677
+ * - false: Disable.
10678
+ */
10192
10679
  downTip?: boolean;
10193
10680
  /** {zh}
10194
- * @brief 是否开始调试模式
10195
- * - true: 开启
10196
- * - false: 关闭
10681
+ * @brief 是否开始调试模式,默认为关闭。
10682
+ * - true: 开启;
10683
+ * - false: 关闭。
10684
+ * @default false
10685
+ */
10686
+ /** {en}
10687
+ * @brief Whether to start debug mode, default is false.
10688
+ * - true: Enable,
10689
+ * - false: Disable.
10690
+ * @default false
10197
10691
  */
10198
10692
  debug?: boolean;
10199
10693
  }
10200
10694
  /** {zh}
10201
- * @hidden
10202
10695
  * @list option
10203
10696
  * @kind property
10204
10697
  */
@@ -10208,15 +10701,14 @@ declare namespace live {
10208
10701
  */
10209
10702
  interface Drm {
10210
10703
  /** {zh}
10211
- * @brief FairPlay DRM 配置
10704
+ * @brief FairPlay DRM 配置。
10212
10705
  */
10213
10706
  /** {en}
10214
- * @brief FairPlay DRM configurations
10707
+ * @brief FairPlay DRM configurations.
10215
10708
  */
10216
10709
  fairplay?: FairplayDrm;
10217
10710
  }
10218
10711
  /** {zh}
10219
- * @hidden
10220
10712
  * @list option
10221
10713
  * @kind property
10222
10714
  */
@@ -10226,7 +10718,6 @@ declare namespace live {
10226
10718
  */
10227
10719
  interface FairplayDrm extends FairplayDrmConfig {
10228
10720
  /** {zh}
10229
- * @hidden
10230
10721
  * @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
10231
10722
  * @param config
10232
10723
  * @returns 证书的请求地址和内容密钥许可证的请求地址。
@@ -10241,7 +10732,6 @@ declare namespace live {
10241
10732
  }) => Promise<FairplayDrmConfig>;
10242
10733
  }
10243
10734
  /** {zh}
10244
- * @hidden
10245
10735
  * @list option
10246
10736
  * @kind property
10247
10737
  */
@@ -10251,17 +10741,17 @@ declare namespace live {
10251
10741
  */
10252
10742
  interface FairplayDrmConfig {
10253
10743
  /** {zh}
10254
- * @brief 获取证书的请求地址
10744
+ * @brief 获取证书的请求地址。
10255
10745
  */
10256
10746
  /** {en}
10257
- * @brief URL used to acquire the FairPlay certificate
10747
+ * @brief URL used to acquire the FairPlay certificate.
10258
10748
  */
10259
10749
  serverCertificatePath?: string;
10260
10750
  /** {zh}
10261
- * @brief 获取内容密钥许可证的请求地址
10751
+ * @brief 获取内容密钥许可证的请求地址。
10262
10752
  */
10263
10753
  /** {en}
10264
- * @brief URL used to acquire the DRM license
10754
+ * @brief URL used to acquire the DRM license.
10265
10755
  */
10266
10756
  serverProcessSPCPath?: string;
10267
10757
  }
@@ -10385,9 +10875,12 @@ declare namespace live {
10385
10875
  */
10386
10876
  enableRTMAutoTranscode?: boolean;
10387
10877
  /** {zh}
10388
- * @brief 评估当前网络情况的间隔
10878
+ * @brief 指定进行网络评估的最近时间长度,单位为毫秒,默认为 1000,表示对最近 1000 毫秒内的网络情况进行评估。
10389
10879
  * @default 1000
10390
10880
  */
10881
+ /** {en}
10882
+ * @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.
10883
+ */
10391
10884
  networkEvaluateInterval?: number;
10392
10885
  }
10393
10886
  /** {zh}
@@ -10440,36 +10933,63 @@ declare namespace live {
10440
10933
  */
10441
10934
  enableLowLatency?: boolean;
10442
10935
  /** {zh}
10443
- * @brief 播放器发起 FLV 拉流请求时,开启低延时的详细配置。。
10444
- * @default -
10936
+ * @brief 低延时的详细配置。
10445
10937
  */
10446
10938
  /** {en}
10447
- * @brief
10448
- * @default -
10939
+ * @brief Detailed configuration for low latency.
10449
10940
  */
10450
10941
  lowLatency?: LowLatency;
10451
10942
  /** {zh}
10452
- * @brief 为播放器设置 FLV Abr 配置。
10453
- * @default -
10943
+ * @brief 为播放器设置 FLV 拉流时的 自适应码率(ABR)配置。
10944
+ */
10945
+ /** {en}
10946
+ * @brief Set the Adaptive Bitrate (ABR) configuration for FLV streaming in the player.
10454
10947
  */
10455
10948
  abr?: Abr;
10456
10949
  /** {zh}
10457
10950
  * @hidden
10458
10951
  */
10952
+ /** {en}
10953
+ * @hidden
10954
+ */
10459
10955
  mseLowLatency?: boolean;
10460
10956
  /** {zh}
10461
- * @brief 超过 maxReaderInterval 时间还没有新数据返回视为断流,播放器触发 ended 事件, 单位 s。
10462
- * @default 5
10957
+ * @brief 设置无数据返回最大时长,单位为毫秒,默认值为 5000,超过最大时长将被判断为断流,并触发 ended 事件。
10958
+ * @default 5000
10959
+ */
10960
+ /** {en}
10961
+ * @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
10962
  */
10464
10963
  maxReaderInterval?: number;
10465
- }
10466
- /** {zh}
10467
- * @list option
10468
- * @kind property
10469
- */
10470
- /** {en}
10471
- * @list option
10472
- * @kind property
10964
+ /** {zh}
10965
+ * @brief
10966
+ * 直播暂停时的断流等待时间,单位为秒,默认值为 0,表示直播暂停时即断流。
10967
+ * @default 0
10968
+ */
10969
+ /** {en}
10970
+ * @brief The waiting time for disconnection during live streaming suspension, measured in seconds. The default value is 0, indicating immediate disconnection when live streaming is suspended.
10971
+ * @default 0
10972
+ */
10973
+ disconnectTime?: number;
10974
+ /** {zh}
10975
+ * @brief 断流后重新拉流是否无缝,无缝拉流时重新拉流不会出现黑帧。
10976
+ * - `true`:是;
10977
+ * - `false`:否。
10978
+ * @default false
10979
+ */
10980
+ /** {en}
10981
+ * @brief Whether re-pulling the stream after disconnection is seamless. When seamless stream pulling, there will be no black frames during re-pulling. - `true`: Yes; - `false`: No.
10982
+ * @default false
10983
+ */
10984
+ seamlesslyReload?: boolean;
10985
+ }
10986
+ /** {zh}
10987
+ * @list option
10988
+ * @kind property
10989
+ */
10990
+ /** {en}
10991
+ * @list option
10992
+ * @kind property
10473
10993
  */
10474
10994
  interface LowLatency {
10475
10995
  /** {zh}
@@ -10480,15 +11000,15 @@ declare namespace live {
10480
11000
  */
10481
11001
  abrPts?: string | number;
10482
11002
  /** {zh}
10483
- * @brief FLV 低延时模式下,是否允许追帧
10484
- * - true:开启
10485
- * - false:关闭
11003
+ * @brief FLV 低延时模式下,是否开启倍速追帧。
11004
+ * - true:开启;
11005
+ * - false:关闭。
10486
11006
  * @default true
10487
11007
  */
10488
11008
  /** {en}
10489
- * @brief
10490
- * - true: Enable
10491
- * - false: Disable
11009
+ * @brief Whether to enable speed-up frame chasing in FLV low latency mode.
11010
+ * - true: enabled;
11011
+ * - false: disabled.
10492
11012
  * @default true
10493
11013
  */
10494
11014
  enableFrameChasing?: boolean;
@@ -10543,8 +11063,12 @@ declare namespace live {
10543
11063
  */
10544
11064
  enableMSE?: boolean;
10545
11065
  /** {zh}
10546
- * @brief 为播放器设置 HLS Abr 配置。
10547
- * @default -
11066
+ * @brief 为播放器设置 HLS 拉流时的 自适应码率(ABR)配置。
11067
+ * @hidden
11068
+ */
11069
+ /** {en}
11070
+ * @brief Set the Adaptive Bitrate (ABR) configuration for HLS streaming in the player.
11071
+ * @hidden
10548
11072
  */
10549
11073
  abr?: HlsAbr;
10550
11074
  /**
@@ -10552,83 +11076,415 @@ declare namespace live {
10552
11076
  */
10553
11077
  mseLowLatency?: boolean;
10554
11078
  }
11079
+ /** {zh}
11080
+ * @list option
11081
+ * @kind property
11082
+ * @brief 在 RTM 拉流场景下,获取到的网络情况。
11083
+ */
11084
+ /** {en}
11085
+ * @list option
11086
+ * @kind property
11087
+ * @brief Network conditions obtained in the RTM pull stream scenario.
11088
+ */
10555
11089
  interface RTMNetWorkInfo {
10556
11090
  /** {zh}
10557
- * @brief 当前下载速度
11091
+ * @brief 最近一次网络评估周期内的下载速度, 单位为 bps。
11092
+ */
11093
+ /** {en}
11094
+ * @brief The download speed within the latest network evaluation period, in units of bps.
10558
11095
  */
10559
11096
  speed?: number;
10560
11097
  /** {zh}
10561
- * @brief 当前平均下载速度
11098
+ * @brief 最近 5 次网络评估周期内下载速度平均值,单位为 bps。
11099
+ */
11100
+ /** {en}
11101
+ * @brief The average download speed within the recent 5 network evaluation cycles, with the unit of bps.
10562
11102
  */
10563
11103
  avgSpeed?: number;
10564
11104
  /** {zh}
10565
- * @brief 当前丢包率
11105
+ * @brief 最近一次网络评估周期内的网络丢包率。
11106
+ */
11107
+ /** {en}
11108
+ * @brief The packet loss rate of the network within the latest network evaluation cycle.
10566
11109
  */
10567
11110
  lostRate?: number;
10568
11111
  /** {zh}
10569
- * @brief 当前平均丢包率
11112
+ * @brief 最近 5 次网络评估周期内的网络丢包率平均值。
11113
+ */
11114
+ /** {en}
11115
+ * @brief The average network packet loss rate within the recent 5 network evaluation cycles.
10570
11116
  */
10571
11117
  avgLostRate?: number;
10572
11118
  }
10573
11119
  /** {zh}
10574
- * @brief RTM 信息
11120
+ * @list option
11121
+ * @kind property
11122
+ * @brief RTM 直播流播放信息。
11123
+ */
11124
+ /** {en}
11125
+ * @list option
11126
+ * @kind property
11127
+ * @brief RTM live stream information.
10575
11128
  */
10576
11129
  interface StatsSnapShoot {
11130
+ /** {en}
11131
+ * @brief Video information.
11132
+ */
11133
+ /** {zh}
11134
+ * @brief 视频信息。
11135
+ */
10577
11136
  video?: {
11137
+ /** {zh}
11138
+ * @hidden
11139
+ */
11140
+ /** {en}
11141
+ * @hidden
11142
+ */
10578
11143
  codec: string;
11144
+ /** {zh}
11145
+ * @hidden
11146
+ */
11147
+ /** {en}
11148
+ * @hidden
11149
+ */
10579
11150
  payloadType: string;
11151
+ /** {zh}
11152
+ * @hidden
11153
+ */
11154
+ /** {en}
11155
+ * @hidden
11156
+ */
10580
11157
  sdpFmtpLine: string;
11158
+ /** {zh}
11159
+ * @hidden
11160
+ */
11161
+ /** {en}
11162
+ * @hidden
11163
+ */
10581
11164
  bytesReceived: number;
11165
+ /** {zh}
11166
+ * @hidden
11167
+ */
11168
+ /** {en}
11169
+ * @hidden
11170
+ */
10582
11171
  firCount: number;
11172
+ /** {zh}
11173
+ * @hidden
11174
+ */
11175
+ /** {en}
11176
+ * @hidden
11177
+ */
10583
11178
  pliCount: number;
11179
+ /** {zh}
11180
+ * @brief 视频高度
11181
+ */
11182
+ /** {en}
11183
+ * @brief 视频高度
11184
+ */
10584
11185
  frameHeight: number;
11186
+ /** {zh}
11187
+ * @brief 视频宽度
11188
+ */
11189
+ /** {en}
11190
+ * @brief 视频宽度
11191
+ */
10585
11192
  frameWidth: number;
11193
+ /** {zh}
11194
+ * @hidden
11195
+ */
11196
+ /** {en}
11197
+ * @hidden
11198
+ */
10586
11199
  framesDecoded: number;
11200
+ /** {zh}
11201
+ * @hidden
11202
+ */
11203
+ /** {en}
11204
+ * @hidden
11205
+ */
10587
11206
  framesDropped: number;
11207
+ /** {zh}
11208
+ * @brief 视频帧率
11209
+ */
11210
+ /** {en}
11211
+ * @brief 视频帧率
11212
+ */
10588
11213
  framesPerSecond: number;
11214
+ /** {zh}
11215
+ * @hidden
11216
+ */
11217
+ /** {en}
11218
+ * @hidden
11219
+ */
10589
11220
  framesReceived: number;
11221
+ /** {zh}
11222
+ * @hidden
11223
+ */
11224
+ /** {en}
11225
+ * @hidden
11226
+ */
10590
11227
  jitter: number;
11228
+ /** {zh}
11229
+ * @hidden
11230
+ */
11231
+ /** {en}
11232
+ * @hidden
11233
+ */
10591
11234
  jitterBufferDelay: number;
11235
+ /** {zh}
11236
+ * @hidden
11237
+ */
11238
+ /** {en}
11239
+ * @hidden
11240
+ */
10592
11241
  keyFramesDecoded: number;
11242
+ /** {zh}
11243
+ * @hidden
11244
+ */
11245
+ /** {en}
11246
+ * @hidden
11247
+ */
10593
11248
  nackCount: number;
11249
+ /** {zh}
11250
+ * @brief 视频丢包总数
11251
+ */
11252
+ /** {en}
11253
+ * @brief 视频丢包总数
11254
+ */
10594
11255
  packetsLost: number;
11256
+ /** {zh}
11257
+ * @brief 视频收包总数
11258
+ */
11259
+ /** {en}
11260
+ * @brief 视频收包总数
11261
+ */
10595
11262
  packetsReceived: number;
10596
11263
  };
11264
+ /** {en}
11265
+ * @brief Audio information.
11266
+ */
11267
+ /** {zh}
11268
+ * @brief 音频信息。
11269
+ */
10597
11270
  audio?: {
11271
+ /** {zh}
11272
+ * @hidden
11273
+ */
11274
+ /** {en}
11275
+ * @hidden
11276
+ */
10598
11277
  codec: string;
11278
+ /** {zh}
11279
+ * @hidden
11280
+ */
11281
+ /** {en}
11282
+ * @hidden
11283
+ */
10599
11284
  payloadType: string;
11285
+ /** {zh}
11286
+ * @hidden
11287
+ */
11288
+ /** {en}
11289
+ * @hidden
11290
+ */
10600
11291
  sdpFmtpLine: string;
11292
+ /** {zh}
11293
+ * @hidden
11294
+ */
11295
+ /** {en}
11296
+ * @hidden
11297
+ */
10601
11298
  audioLevel: number;
11299
+ /** {zh}
11300
+ * @hidden
11301
+ */
11302
+ /** {en}
11303
+ * @hidden
11304
+ */
10602
11305
  bytesReceived: number;
11306
+ /** {zh}
11307
+ * @hidden
11308
+ */
11309
+ /** {en}
11310
+ * @hidden
11311
+ */
10603
11312
  jitter: number;
11313
+ /** {zh}
11314
+ * @hidden
11315
+ */
11316
+ /** {en}
11317
+ * @hidden
11318
+ */
10604
11319
  jitterBufferDelay: number;
11320
+ /** {zh}
11321
+ * @brief 音频丢包总数
11322
+ */
11323
+ /** {en}
11324
+ * @brief 音频丢包总数
11325
+ */
10605
11326
  packetsLost: number;
11327
+ /** {zh}
11328
+ * @brief 音频收包总数
11329
+ */
11330
+ /** {en}
11331
+ * @brief 音频收包总数
11332
+ */
10606
11333
  packetsReceived: number;
11334
+ /** {zh}
11335
+ * @hidden
11336
+ */
11337
+ /** {en}
11338
+ * @hidden
11339
+ */
10607
11340
  totalSamplesDuration: number;
11341
+ /** {zh}
11342
+ * @hidden
11343
+ */
11344
+ /** {en}
11345
+ * @hidden
11346
+ */
10608
11347
  totalSamplesReceived: number;
10609
11348
  };
10610
11349
  }
10611
11350
  /** {zh}
10612
- * @brief FLV 信息
11351
+ * @list option
11352
+ * @kind property
11353
+ * @brief FLV 直播流播放信息。
11354
+ */
11355
+ /** {en}
11356
+ * @list option
11357
+ * @kind property
11358
+ * @brief FLV live stream information.
10613
11359
  */
10614
11360
  interface FlvStats {
11361
+ /** {zh}
11362
+ * @brief 音频格式。
11363
+ * @hidden
11364
+ */
11365
+ /** {en}
11366
+ * @brief Audio format.
11367
+ * @hidden
11368
+ */
10615
11369
  audioCodec: string;
11370
+ /** {zh}
11371
+ * @brief 平均下载速度。
11372
+ */
11373
+ /** {en}
11374
+ * @brief Average download speed.
11375
+ */
10616
11376
  avgSpeed: number;
11377
+ /** {zh}
11378
+ * @brief 码率。
11379
+ */
11380
+ /** {en}
11381
+ * @brief bitrate.
11382
+ */
10617
11383
  bitrate: number;
11384
+ /** {zh}
11385
+ * @brief 剩余缓冲时间。
11386
+ */
11387
+ /** {en}
11388
+ * @brief Remaining buffer time.
11389
+ */
10618
11390
  bufferEnd: number;
11391
+ /** {zh}
11392
+ * @hidden
11393
+ */
11394
+ /** {en}
11395
+ * @hidden
11396
+ */
10619
11397
  channelCount: number;
11398
+ /** {zh}
11399
+ * @brief 当前播放时间。
11400
+ */
11401
+ /** {en}
11402
+ * @brief The current playing time.
11403
+ */
10620
11404
  currentTime: number;
11405
+ /** {zh}
11406
+ * @hidden
11407
+ */
11408
+ /** {en}
11409
+ * @hidden
11410
+ */
10621
11411
  decodeFps: number;
11412
+ /** {zh}
11413
+ * @hidden
11414
+ */
11415
+ /** {en}
11416
+ * @hidden
11417
+ */
10622
11418
  domain: string;
11419
+ /** {zh}
11420
+ * @brief 当前下载速度。
11421
+ */
11422
+ /** {en}
11423
+ * @brief Current download speed.
11424
+ */
10623
11425
  downloadSpeed: number;
11426
+ /** {zh}
11427
+ * @brief 编码方式。
11428
+ */
11429
+ /** {en}
11430
+ * @brief Encoding method.
11431
+ */
10624
11432
  encodeType: string;
11433
+ /** {zh}
11434
+ * @brief 帧率。
11435
+ */
11436
+ /** {en}
11437
+ * @brief Frame rate.
11438
+ */
10625
11439
  fps: number;
11440
+ /** {zh}
11441
+ * @hidden
11442
+ */
11443
+ /** {en}
11444
+ * @hidden
11445
+ */
10626
11446
  gop: number;
11447
+ /** {zh}
11448
+ * @brief 视频高度。
11449
+ */
11450
+ /** {en}
11451
+ * @brief Video height.
11452
+ */
10627
11453
  height: number;
11454
+ /** {zh}
11455
+ * @hidden
11456
+ */
11457
+ /** {en}
11458
+ * @hidden
11459
+ */
10628
11460
  samplerate: number;
11461
+ /** {zh}
11462
+ * @brief 总共收到的字节数。
11463
+ */
11464
+ /** {en}
11465
+ * @brief The total number of bytes received.
11466
+ */
10629
11467
  totalReceivedByte: number;
11468
+ /** {zh}
11469
+ * @brief 接收所有字节消耗时长。
11470
+ */
11471
+ /** {en}
11472
+ * @brief The time consumed for receiving all bytes.
11473
+ */
10630
11474
  totalReceivedCost: number;
11475
+ /** {zh}
11476
+ * @hidden
11477
+ */
11478
+ /** {en}
11479
+ * @hidden
11480
+ */
10631
11481
  videoCodec: string;
11482
+ /** {zh}
11483
+ * @brief 视频宽度。
11484
+ */
11485
+ /** {en}
11486
+ * @brief Video wight.
11487
+ */
10632
11488
  width: number;
10633
11489
  }
10634
11490
  /** {zh}
@@ -10652,7 +11508,10 @@ declare namespace live {
10652
11508
  */
10653
11509
  constructor(options: LiveVePlayerOptions);
10654
11510
  /** {zh}
10655
- * @brief 获取已经播放的时间
11511
+ * @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
11512
+ */
11513
+ /** {en}
11514
+ * @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
10656
11515
  */
10657
11516
  get playTime(): number;
10658
11517
  /** {zh}
@@ -10686,49 +11545,80 @@ declare namespace live {
10686
11545
  */
10687
11546
  closeInfoPanel(): void;
10688
11547
  /** {zh}
10689
- * @brief 打开 Abr
11548
+ * @brief 打开码率自适应(ABR)切换功能。
11549
+ */
11550
+ /** {en}
11551
+ * @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
10690
11552
  */
10691
11553
  openAbr(): void;
10692
11554
  /** {zh}
10693
- * @brief 关闭 Abr
11555
+ * @brief 关闭码率自适应(ABR)切换功能。
11556
+ */
11557
+ /** {en}
11558
+ * @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
10694
11559
  */
10695
11560
  closeAbr(): void;
10696
11561
  /** {zh}
10697
- * @brief 调用此方法更新 DRM 鉴权配置。
10698
- * @hidden
11562
+ * @brief 调用此方法更新 DRM 配置。
11563
+ */
11564
+ /** {en}
11565
+ * @brief Use this method to update DRM configuration.
11566
+ * @param config
10699
11567
  */
10700
11568
  updateDrmConfig(config: FairplayDrmConfig): void;
10701
11569
  /** {zh}
10702
- * @brief 切换 flv Abr
10703
- * @param options 切换 Abr 的配置。
11570
+ * @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
11571
+ * @param options ABR 的配置。
10704
11572
  * @returns
10705
11573
  */
11574
+ /** {en}
11575
+ * @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
11576
+ * @param options Configuration of ABR.
11577
+ */
10706
11578
  switchAbr(options: {
10707
11579
  /** {zh}
10708
- * @brief 是否开启 Abr
10709
- * - true: 开启
10710
- * - false: 关闭
11580
+ * @brief 是否开启 ABR 功能。
11581
+ * - true:开启
11582
+ * - false:关闭
11583
+ */
11584
+ /** {en}
11585
+ * @brief Whether to enable the ABR function.
11586
+ * - true: Enabled ;
11587
+ * - false: Disabled
11588
+ * @default -
10711
11589
  */
10712
11590
  enable: boolean;
10713
11591
  /** {zh}
10714
- * @brief 切换 Abr 的码率
11592
+ * @brief 切换自适应码率直播流对应的码率。
11593
+ */
11594
+ /** {en}
11595
+ * @brief Switch the bitrate corresponding to the Adaptive Bitrate (ABR) live stream.
10715
11596
  */
10716
11597
  bitrate: number;
10717
11598
  }): void;
10718
11599
  /** {zh}
10719
- * @brief 获取 RTM 的网络相关信息
11600
+ * @brief 获取 RTM 拉流的网络评估信息。
10720
11601
  * @returns
10721
11602
  */
11603
+ /** {en}
11604
+ * @brief Obtain the network assessment information of RTM pull streaming.
11605
+ */
10722
11606
  getRTMNetWorkInfo(): RTMNetWorkInfo;
10723
11607
  /** {zh}
10724
- * @brief 获取 RTM 播放信息
11608
+ * @brief 获取 RTM 拉流的播放信息。
10725
11609
  * @returns
10726
11610
  */
11611
+ /** {en}
11612
+ * @brief Obtain the playback information of RTM pull stream.
11613
+ */
10727
11614
  getRTMStats(): Promise<StatsSnapShoot>;
10728
11615
  /** {zh}
10729
- * @brief 获取 FLV 播放信息
11616
+ * @brief 获取 FLV 拉流的播放信息。
10730
11617
  * @returns
10731
11618
  */
11619
+ /** {en}
11620
+ * @brief Obtain the playback information of FLV pull streaming.
11621
+ */
10732
11622
  getFLVStats(): FlvStats;
10733
11623
  }
10734
11624
  /** {zh}