@volcengine/veplayer 2.3.0-rc.0 → 2.3.0-rc.1

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.
@@ -6615,7 +6615,12 @@ const ERROR_TYPE_INFO = {
6615
6615
  }
6616
6616
  };
6617
6617
  let VeError$1 = class VeError extends Error {
6618
- /**
6618
+ /** {zh}
6619
+ * @hidden
6620
+ * @param error
6621
+ * @param i18n
6622
+ */
6623
+ /** {en}
6619
6624
  * @hidden
6620
6625
  * @param error
6621
6626
  * @param i18n
@@ -6628,16 +6633,25 @@ let VeError$1 = class VeError extends Error {
6628
6633
  const message = (i18n == null ? void 0 : i18n.getText(errorInfo == null ? void 0 : errorInfo.messageTextKey)) ?? (errorInfo == null ? void 0 : errorInfo.message) ?? ((_a = errorInfo == null ? void 0 : errorInfo.error) == null ? void 0 : _a.message) ?? (i18n == null ? void 0 : i18n.getText("UNKNOWN"));
6629
6634
  super(message);
6630
6635
  /**
6631
- * @brief 错误码,对应[错误码字典](#ErrorCode)。
6636
+ * @brief 错误码。
6637
+ */
6638
+ /** {en}
6639
+ * @brief The error code.
6632
6640
  */
6633
6641
  __publicField(this, "errorCode");
6634
- /**
6642
+ /** {zh}
6635
6643
  * @brief 错误等级。
6636
6644
  */
6645
+ /** {en}
6646
+ * @brief The error level.
6647
+ */
6637
6648
  __publicField(this, "level");
6638
- /**
6649
+ /** {zh}
6639
6650
  * @brief 其他错误信息。
6640
6651
  */
6652
+ /** {en}
6653
+ * @brief Other error messages.
6654
+ */
6641
6655
  __publicField(this, "ext");
6642
6656
  this.errorCode = (errorInfo == null ? void 0 : errorInfo.errorCode) ?? "UNKNOWN";
6643
6657
  this.level = (errorInfo == null ? void 0 : errorInfo.level) ?? "Error";
@@ -13386,7 +13400,10 @@ const transformOption = (options) => {
13386
13400
  return xgOptions;
13387
13401
  };
13388
13402
  class VePlayerBase {
13389
- /**
13403
+ /** {zh}
13404
+ * @hidden
13405
+ */
13406
+ /** {en}
13390
13407
  * @hidden
13391
13408
  */
13392
13409
  constructor(options = {}) {
@@ -13439,7 +13456,7 @@ class VePlayerBase {
13439
13456
  this._errorCallback = (err) => this._handleFallback(err);
13440
13457
  this._player.on(ERROR, this._errorCallback);
13441
13458
  }
13442
- /**
13459
+ /** {zh}
13443
13460
  * @brief 获取视频的就绪状态,其状态枚举值、枚举名称和说明如下:
13444
13461
  * - `0`:HAVE_NOTHING,没有关于媒体资源的可用信息
13445
13462
  * - `1`:HAVE_METADATA,已检索到足够多的媒体资源来初始化元数据, 快进/快退不会引发异常
@@ -13447,68 +13464,107 @@ class VePlayerBase {
13447
13464
  * - `3`:HAVE_FUTURE_DATA,当前播放位置以及未来至少一小段时间的数据是可用的(至少有两帧以上的数据)
13448
13465
  * - `4`:HAVE_ENOUGH_DATA,有足够的数据可用,并且下载速率足够,媒体可以不间断地播放到最后
13449
13466
  */
13467
+ /** {en}
13468
+ * @brief Gets the readiness of the video.
13469
+ * - `0`: HAVE_NOTHING, which means there is no information about the media resources.
13470
+ * - `1`: HAVE_METADATA, which means enough media resources have been retrieved to initialize the metadata and fast-forward/rewind will not raise an exception.
13471
+ * - `2`: HAVE_CURRENT_DATA, which means the data for the current playback position is available, but there is not enough data to play the next frame.
13472
+ * - `3`: HAVE_FUTURE_DATA, which means there is enough data for the current playback position and at least a short period in the future (at least two following frames).
13473
+ * - `4`: HAVE_ENOUGH_DATA, which means there is enough data and the download rate is sufficient for the video to be played without interruption until the end.
13474
+ */
13450
13475
  get readyState() {
13451
13476
  return this._player.readyState;
13452
13477
  }
13453
- /**
13478
+ /** {zh}
13454
13479
  * @brief 获取当前已缓冲的时间范围。
13455
13480
  */
13481
+ /** {en}
13482
+ * @brief Gets the currently buffered time range.
13483
+ */
13456
13484
  get buffered() {
13457
13485
  return this._player.buffered;
13458
13486
  }
13459
- /**
13487
+ /** {zh}
13460
13488
  * @brief 获取已经播放的音频/视频的时间范围。
13461
13489
  */
13490
+ /** {en}
13491
+ * @brief Gets the time range of the audio/video that has been played.
13492
+ */
13462
13493
  get played() {
13463
13494
  return this._player.played;
13464
13495
  }
13465
- /**
13496
+ /** {zh}
13466
13497
  * @brief 设置/获取视频当前的播放时间, 单位为 s。
13467
13498
  */
13499
+ /** {en}
13500
+ * @brief Sets or gets the current playback position of the video, in seconds.
13501
+ */
13468
13502
  get cumulateTime() {
13469
13503
  return this._player.cumulateTime;
13470
13504
  }
13471
- /**
13505
+ /** {zh}
13472
13506
  * @brief 获取是否处于焦点状态,处于焦点状态会显示控制栏。
13473
13507
  */
13508
+ /** {en}
13509
+ * @brief Gets whether the player has focus. The control bar is displayed when the player has focus.
13510
+ */
13474
13511
  get isFocused() {
13475
13512
  return this._player.isActive;
13476
13513
  }
13477
- /**
13514
+ /** {zh}
13478
13515
  * @brief 获取播放器是否处于全屏状态。
13479
13516
  */
13517
+ /** {en}
13518
+ * @brief Gets whether the player is in full-screen mode, in which the player covers the entire desktop.
13519
+ */
13480
13520
  get isFullscreen() {
13481
13521
  return this._player.isFullscreen;
13482
13522
  }
13483
- /**
13523
+ /** {zh}
13484
13524
  * @brief 获取播放器是否处于网页全屏状态。
13485
13525
  */
13526
+ /** {en}
13527
+ * @brief Gets whether the player is in full-window mode, in which the player covers the entire browser window.
13528
+ */
13486
13529
  get isCssFullscreen() {
13487
13530
  return this._player.isCssfullScreen;
13488
13531
  }
13489
- /**
13532
+ /** {zh}
13490
13533
  * @brief 获取视频的网络状态,其状态枚举值、枚举名称和说明如下:
13491
13534
  * - `0`:NETWORK_EMPTY,目前还没有数据,readyState 的值是 HAVE_NOTHING
13492
13535
  * - `1`:NETWORK_IDLE,HTMLMediaElement 处于活动状态并已选择资源,但未使用网络
13493
13536
  * - `2`:NETWORK_LOADING,浏览器正在下载 HTMLMediaElement 数据
13494
13537
  * - `3`:NETWORK_NO_SOURCE,未找到 HTMLMediaElement src。
13495
13538
  */
13539
+ /** {en}
13540
+ * @brief Gets the network condition of the video.
13541
+ * - `0`: NETWORK_EMPTY, which means there is no data yet, and `readyState` is `HAVE_NOTHING`.
13542
+ * - `1`: NETWORK_IDLE, which means the `HTMLMediaElement` element is active and the resources have been selected, but the network is not in use.
13543
+ * - `2`: NETWORK_LOADING, which means the browser is downloading the data of the `HTMLMediaElement` element.
13544
+ * - `3`: NETWORK_NO_SOURCE, the media source is not found according to the `src` property of the `HTMLMediaElement` element.
13545
+ */
13496
13546
  get networkState() {
13497
13547
  return this._player.networkState;
13498
13548
  }
13499
- /**
13549
+ /** {zh}
13500
13550
  * @brief 获取当前视频是否处于暂停状态。
13501
13551
  */
13552
+ /** {en}
13553
+ * @brief Gets whether the current video is suspended.
13554
+ */
13502
13555
  get paused() {
13503
13556
  return this._player.paused;
13504
13557
  }
13505
- /**
13558
+ /** {zh}
13506
13559
  * @brief 获取当前视频是否播放结束。
13507
13560
  */
13561
+ /** {en}
13562
+ * @brief Gets whether the current video has finished playing.
13563
+ */
13508
13564
  get ended() {
13509
13565
  return this._player.ended;
13510
13566
  }
13511
- /**
13567
+ /** {zh}
13512
13568
  * @brief 获取播放器当前所处的状态,其状态枚举值、枚举名称和说明如下:
13513
13569
  * - `0`:ERROR,播放出现错误
13514
13570
  * - `1`:INITIAL,初始化
@@ -13520,81 +13576,130 @@ class VePlayerBase {
13520
13576
  * - `7`:ENDED,播放结束
13521
13577
  * - `8`:DESTROYED,播放器实例处于已被销毁
13522
13578
  */
13579
+ /** {en}
13580
+ * @brief Gets the current state of the player.
13581
+ * - `0`: ERROR, which means a playback error occurred
13582
+ * - `1`: INITIAL, which means initialization
13583
+ * - `2`: READY, which means the configuration/event/plug-in has been initialized/bound/instantiated
13584
+ * - `3`: ATTACHING, which means the media object is being mounted.
13585
+ * - `4`: ATTACHED, which means the media object has been mounted in the DOM
13586
+ * - `5`: NOTALLOW, which means the playback is blocked
13587
+ * - `6`: RUNNING, which means the playback has started successfully
13588
+ * - `7`: ENDED, which means the playback has ended
13589
+ * - `8`: DESTROYED, which means the player instance is destroyed
13590
+ */
13523
13591
  get state() {
13524
13592
  return this._player.state;
13525
13593
  }
13526
- /**
13594
+ /** {zh}
13527
13595
  * 获取当前播放视频的拉流地址。
13528
13596
  */
13597
+ /** {en}
13598
+ * Gets the current pull stream address.
13599
+ */
13529
13600
  get url() {
13530
13601
  return this._player.config.url;
13531
13602
  }
13532
- /**
13533
- * @brief 获取当播放视频的线路名称唯一标识(name)。
13603
+ /** {zh}
13604
+ * @brief 获取当前播放视频的线路名称唯一标识(name)。
13605
+ */
13606
+ /** {en}
13607
+ * @brief Gets the current playback source ID.
13534
13608
  */
13535
13609
  get source() {
13536
13610
  var _a;
13537
13611
  return (_a = this._sourceManager.source) == null ? void 0 : _a.name;
13538
13612
  }
13539
- /**
13613
+ /** {zh}
13540
13614
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
13541
13615
  */
13616
+ /** {en}
13617
+ * @brief Gets the current resolution ID.
13618
+ */
13542
13619
  get definition() {
13543
13620
  var _a;
13544
13621
  return (_a = this._sourceManager.definition) == null ? void 0 : _a.definition;
13545
13622
  }
13546
- /**
13623
+ /** {zh}
13547
13624
  * @brief 获取和设置播放器的跨域配置信息,更多信息参考 [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) 属性介绍。
13548
13625
  */
13626
+ /** {en}
13627
+ * @brief Gets the player's cross-domain configurations. For more information, refer to [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).
13628
+ */
13549
13629
  get crossOrigin() {
13550
13630
  return this._player.crossOrigin;
13551
13631
  }
13552
- /**
13632
+ /** {zh}
13553
13633
  * @brief 获取和设置播放器的跨域配置信息,更多信息参考 [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) 属性介绍。
13554
13634
  */
13635
+ /** {en}
13636
+ * @brief Sets the player's cross-domain configurations. For more information, refer to the [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).
13637
+ */
13555
13638
  set crossOrigin(crossOrigin) {
13556
13639
  this._player.crossOrigin = crossOrigin;
13557
13640
  }
13558
- /**
13641
+ /** {zh}
13559
13642
  * @brief 获取和设置视频的音量,取值范围为 [0,1]。
13560
13643
  */
13644
+ /** {en}
13645
+ * @brief Gets the volume of the video. The value range is [0,1].
13646
+ */
13561
13647
  // eslint-disable-next-line @typescript-eslint/member-ordering
13562
13648
  get volume() {
13563
13649
  return this._player.volume;
13564
13650
  }
13565
- /**
13651
+ /** {zh}
13566
13652
  * @brief 获取和设置视频的音量,取值范围为 [0,1]。
13567
13653
  */
13654
+ /** {en}
13655
+ * @brief Sets the volume of the video. Valid range: [0,1].
13656
+ */
13568
13657
  set volume(volume) {
13569
13658
  this._player.volume = volume;
13570
13659
  }
13571
- /**
13660
+ /** {zh}
13572
13661
  * @brief 获取和设置视频静音状态。
13573
13662
  * - `true`:静音
13574
13663
  * - `false`:非静音
13575
13664
  */
13665
+ /** {en}
13666
+ * @brief Gets whether the video is muted.
13667
+ * - `true`: Muted.
13668
+ * - `false`: Not muted.
13669
+ */
13576
13670
  // eslint-disable-next-line @typescript-eslint/member-ordering
13577
13671
  get muted() {
13578
13672
  return this._player.muted;
13579
13673
  }
13580
- /**
13674
+ /** {zh}
13581
13675
  * @brief 获取和设置视频静音状态。
13582
13676
  * - `true`:静音
13583
13677
  * - `false`:非静音
13584
13678
  */
13679
+ /** {en}
13680
+ * @brief Mute or unmute the video.
13681
+ * - `true`: Mute the video.
13682
+ * - `false`: Unmute the video.
13683
+ */
13585
13684
  set muted(isMuted) {
13586
13685
  this._player.muted = isMuted;
13587
13686
  }
13588
- /**
13687
+ /** {zh}
13589
13688
  * @brief 获取和设置当前语言。
13590
13689
  */
13690
+ /** {en}
13691
+ * @brief Gets the current language.
13692
+ */
13591
13693
  // eslint-disable-next-line @typescript-eslint/member-ordering
13592
13694
  get lang() {
13593
13695
  return this._i18nManager.getLang();
13594
13696
  }
13595
- /**
13697
+ /** {zh}
13596
13698
  * @brief 获取和设置当前语言。
13597
13699
  */
13700
+ /** {en}
13701
+ * @brief Sets the current language.
13702
+ */
13598
13703
  set lang(lang) {
13599
13704
  var _a, _b;
13600
13705
  if (this._player.lang === lang) {
@@ -13616,7 +13721,10 @@ class VePlayerBase {
13616
13721
  get _src() {
13617
13722
  return this._player.currentSrc;
13618
13723
  }
13619
- /**
13724
+ /** {zh}
13725
+ * @hidden
13726
+ */
13727
+ /** {en}
13620
13728
  * @hidden
13621
13729
  */
13622
13730
  static async create(options = {}, Constructor) {
@@ -13646,11 +13754,16 @@ class VePlayerBase {
13646
13754
  sourceManager
13647
13755
  });
13648
13756
  }
13649
- /**
13757
+ /** {zh}
13650
13758
  * @brief 调用此方法切换拉流地址、线路、清晰度。
13651
13759
  * @param target 目标地址,可以是播放地址,也可以是线路和清晰度
13652
13760
  * @param options 更多配置信息
13653
13761
  */
13762
+ /** {en}
13763
+ * @brief Switches the pull stream address, playback source, or resolution.
13764
+ * @param target The target pull stream address, playback source, or resolution.
13765
+ * @param options More configurations.
13766
+ */
13654
13767
  async switch(target, options) {
13655
13768
  var _a, _b;
13656
13769
  if (typeof target === "string" && this._sourceManager.sources.length === 1 && ((_b = (_a = this._sourceManager.sources) == null ? void 0 : _a[0].definitions) == null ? void 0 : _b.length) === 1) {
@@ -13667,21 +13780,32 @@ class VePlayerBase {
13667
13780
  await this._switch(targetDefinition);
13668
13781
  return targetDefinition;
13669
13782
  }
13670
- /**
13783
+ /** {zh}
13671
13784
  * @brief 调用此方法更新拉流地址列表。
13672
13785
  * @param playlist 要更新的播放列表。
13673
13786
  * @param target 更新后默认播放的资源。
13674
13787
  */
13788
+ /** {en}
13789
+ * @brief Updates the list of pull stream addresses.
13790
+ * @param Playlist The updated list.
13791
+ * @param Target The default playback resource after the update.
13792
+ */
13675
13793
  updatePlaylist(playlist, target) {
13676
13794
  const sourceManager = this._sourceManager.updateSources(playlist, target);
13677
13795
  return this._switch(sourceManager.definition);
13678
13796
  }
13679
13797
  // TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
13680
13798
  /**
13799
+ /** {zh}
13681
13800
  * @brief 调用此方法监听指定事件,事件处理函数只执行一次。
13682
13801
  * @param event 表示事件的名称。
13683
13802
  * @param callback 表示事件的回调函数。
13684
13803
  */
13804
+ /** {en}
13805
+ * @brief Listens for a specified event. The event handler is executed only once.
13806
+ * @param event The event name.
13807
+ * @param callback The callback function for the event.
13808
+ */
13685
13809
  once(event, callback) {
13686
13810
  var _a;
13687
13811
  const { xgCallback, xgEventName } = this._transformEvent(event, callback);
@@ -13693,11 +13817,16 @@ class VePlayerBase {
13693
13817
  this._player.once(xgEventName, xgCallback);
13694
13818
  }
13695
13819
  }
13696
- /**
13820
+ /** {zh}
13697
13821
  * @brief 调用此方法解绑或移除指定事件的事件监听。
13698
13822
  * @param event 表示事件的名称。
13699
13823
  * @param callback 表示事件的回调函数。
13700
13824
  */
13825
+ /** {en}
13826
+ * @brief Stops listening for a specified event.
13827
+ * @param event The event name.
13828
+ * @param callback The callback function for the event.
13829
+ */
13701
13830
  off(event, callback) {
13702
13831
  var _a;
13703
13832
  const xgCallback = (_a = this._events[event]) == null ? void 0 : _a.get(callback);
@@ -13707,27 +13836,40 @@ class VePlayerBase {
13707
13836
  this._events[event].delete(callback);
13708
13837
  }
13709
13838
  }
13710
- /**
13839
+ /** {zh}
13711
13840
  * @brief 调用此方法触发指定事件。
13712
13841
  * @param event 表示事件的名称。
13713
13842
  * @param data 事件信息。
13714
13843
  */
13844
+ /** {en}
13845
+ * @brief Triggers a specified event.
13846
+ * @param event The event name.
13847
+ * @param data The event information.
13848
+ */
13715
13849
  emit(event, data) {
13716
13850
  const { xgEventName } = this._transformEvent(event);
13717
13851
  this._player.emit(xgEventName, data);
13718
13852
  }
13719
- /**
13853
+ /** {zh}
13720
13854
  * @brief 调用此方法解绑或移除指定事件的所有事件监听。
13721
13855
  */
13856
+ /** {en}
13857
+ * @brief Stops listening to any player event.
13858
+ */
13722
13859
  offAll() {
13723
13860
  this._events = {};
13724
13861
  this._player.offAll();
13725
13862
  }
13726
- /**
13863
+ /** {zh}
13727
13864
  * @brief 调用此方法监听指定事件。
13728
13865
  * @param event 表示事件名称。
13729
13866
  * @param callback 表示事件的回调函数。
13730
13867
  */
13868
+ /** {en}
13869
+ * @brief Listens for a specified event.
13870
+ * @param event The event name.
13871
+ * @param callback The callback function for the event.
13872
+ */
13731
13873
  on(event, callback) {
13732
13874
  var _a;
13733
13875
  const { xgCallback, xgEventName } = this._transformEvent(event, callback);
@@ -13739,102 +13881,153 @@ class VePlayerBase {
13739
13881
  this._player.on(xgEventName, xgCallback);
13740
13882
  }
13741
13883
  }
13742
- /**
13884
+ /** {zh}
13743
13885
  * @brief 调用此方法开始播放 。
13744
13886
  */
13887
+ /** {en}
13888
+ * @brief Starts playback.
13889
+ */
13745
13890
  play() {
13746
13891
  /* istanbul ignore next -- @preserve */
13747
13892
  return this._player.play();
13748
13893
  }
13749
- /**
13894
+ /** {zh}
13750
13895
  * @brief 调用此方法暂停播放。
13751
13896
  */
13897
+ /** {en}
13898
+ * @brief Pauses playback.
13899
+ */
13752
13900
  pause() {
13753
13901
  /* istanbul ignore next -- @preserve */
13754
13902
  return this._player.pause();
13755
13903
  }
13756
- /**
13904
+ /** {zh}
13757
13905
  * @brief 调用此方法打开画中画。
13758
13906
  */
13907
+ /** {en}
13908
+ * @brief Turns on Picture-in-Picture (PIP).
13909
+ */
13759
13910
  requestPIP() {
13760
13911
  var _a;
13761
13912
  /* istanbul ignore next -- @preserve */
13762
13913
  (_a = this._player.plugins.pip) == null ? void 0 : _a.requestPIP();
13763
13914
  }
13764
- /**
13915
+ /** {zh}
13765
13916
  * @brief 调用此方法关闭画中画。
13766
13917
  */
13918
+ /** {en}
13919
+ * @brief Turns off Picture-in-Picture (PIP).
13920
+ */
13767
13921
  exitPIP() {
13768
13922
  var _a;
13769
13923
  /* istanbul ignore next -- @preserve */
13770
13924
  (_a = this._player.plugins.pip) == null ? void 0 : _a.exitPIP();
13771
13925
  }
13772
- /**
13926
+ /** {zh}
13773
13927
  * @brief 调用此方法重新拉流。
13774
13928
  */
13929
+ /** {en}
13930
+ * @brief Retries stream-pulling.
13931
+ */
13775
13932
  retry() {
13776
13933
  return this._player.retry();
13777
13934
  }
13778
- /**
13935
+ /** {zh}
13779
13936
  * @brief 播放器获取焦点,调用该方法 `veplayer.isFocused` 将会变为 `true`,并触发 `PLAYER_FOCUS` 事件。
13780
13937
  * @param data 播放器获取焦点配置信息。
13781
13938
  */
13939
+ /** {en}
13940
+ * @brief The player gets focus. When the method is called, `veplayer.isFocused` will become `true` and the `PLAYER_FOCUS` event will be triggered.
13941
+ * @param data Related configurations.
13942
+ */
13782
13943
  focus(data) {
13783
13944
  return this._player.focus(data);
13784
13945
  }
13785
- /**
13946
+ /** {zh}
13786
13947
  * @brief 播放器失去焦点,调用该方法 `veplayer.isFocused` 将会变为 `false`,并触发 `PLAYER_BLUR` 事件。
13787
13948
  * @param data 播放器失去焦点配置信息。
13788
13949
  */
13950
+ /** {en}
13951
+ * @brief The player loses focus. When the method is called, `veplayer.isFocused` will become `false` and the `PLAYER_BLUR` event will be triggered.
13952
+ * @param data The related configurations.
13953
+ */
13789
13954
  blur(data) {
13790
13955
  return this._player.blur(data);
13791
13956
  }
13792
- /**
13957
+ /** {zh}
13793
13958
  * @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
13794
13959
  * @param el 全屏作用的 DOM 节点。
13795
13960
  */
13961
+ /** {en}
13962
+ * @brief Turns the player into full-screen mode, in which the player covers the entire desktop. If the player is in full-window mode when the method is called, it will automatically exit full-window mode, and the `Events.FULLSCREEN_CHANGE` event will be triggered.
13963
+ * @param el The DOM node in which the player is displayed in full-screen mode.
13964
+ */
13796
13965
  requestFullscreen(el) {
13797
13966
  return this._player.getFullscreen(el);
13798
13967
  }
13799
- /**
13968
+ /** {zh}
13800
13969
  * @brief 调用此方法退出系统全屏状态,调用该方法 `veplayer.isFullscreen` 将会变为 `false`,并触发 `Events.FULLSCREEN_CHANGE` 事件。
13801
13970
  * @param el 全屏作用的 DOM 节点。
13802
13971
  */
13972
+ /** {en}
13973
+ * @brief Exits full-screen mode. After the method is called, `veplayer.isFullscreen` will become `false` and the `Events.FULLSCREEN_CHANGE` event will be triggered.
13974
+ * @param el The DOM node of the full screen effect.
13975
+ */
13803
13976
  exitFullscreen(el) {
13804
13977
  return this._player.exitFullscreen(el);
13805
13978
  }
13806
- /**
13979
+ /** {zh}
13807
13980
  * @brief 调用此方法进入网页样式全屏状态,播放器进入网页全屏,利用 CSS 模拟实现全屏效果。如果该接口调用的时候处于全屏状态,会自动退出全屏,下发事件 `Events.CSS_FULLSCREEN_CHANGE`。
13808
13981
  * @param el 全屏作用的 DOM 节点。
13809
13982
  */
13983
+ /** {en}
13984
+ * @brief Turns the player into full-window mode, in which the player covers the entire browser window. If the player is in full-screen mode when the method is called, it will automatically exit full-screen mode, and the `Events.CSS_FULLSCREEN_CHANGE` event will be triggered.
13985
+ * @param el The DOM node in which the player is displayed in full-window mode.
13986
+ */
13810
13987
  requestCssFullscreen(el) {
13811
13988
  return this._player.getCssFullscreen(el);
13812
13989
  }
13813
- /**
13990
+ /** {zh}
13814
13991
  * @brief 调用此方法退出网页样式全屏状态。 调用该方法 `veplayer.isFullscreen` 将会变为 `false`,并触发 `Events.CSS_FULLSCREEN_CHANGE` 事件。
13815
13992
  */
13993
+ /** {en}
13994
+ * @brief Exits the full-window mode. When the method is called, `veplayer.isFullscreen` will become `false` and the `Events.CSS_FULLSCREEN_CHANGE` event will be triggered.
13995
+ */
13816
13996
  exitCssFullscreen() {
13817
13997
  return this._player.exitCssFullscreen();
13818
13998
  }
13819
- /**
13999
+ /** {zh}
13820
14000
  * @brief 调用此方法在当前播放器上注册指定插件。
13821
14001
  * @param plugin 插件构造函数。
13822
14002
  * @param config 插件的配置列表。
13823
14003
  */
14004
+ /** {en}
14005
+ * @brief Registers a specified plug-in to the current player.
14006
+ * @param Plugin The plugin constructor.
14007
+ * @param config The plugin configurations.
14008
+ */
13824
14009
  registerPlugin(plugin, config) {
13825
14010
  return this._player.registerPlugin(plugin, config);
13826
14011
  }
13827
- /**
14012
+ /** {zh}
13828
14013
  * @brief 调用此方法在当前播放器上销毁/注销指定插件。
13829
14014
  * @param plugin 插件实例或者插件名称。
13830
14015
  */
14016
+ /** {en}
14017
+ * @brief Destroys or unregisters a specified plugin from the player.
14018
+ * @param Plugin The plugin instance or name.
14019
+ */
13831
14020
  unRegisterPlugin(plugin) {
13832
14021
  return this._player.unRegisterPlugin(plugin);
13833
14022
  }
13834
- /**
14023
+ /** {zh}
13835
14024
  * @brief 调用此接口显示指定插件图标。
13836
14025
  * @param pluginNames 插件名称
13837
14026
  */
14027
+ /** {en}
14028
+ * @brief Displays the icon of a specified plugin.
14029
+ * @param PluginNames The plugin name.
14030
+ */
13838
14031
  showIcon(pluginNames) {
13839
14032
  const morePlugin = this._player.getPlugin("more");
13840
14033
  pluginNames.forEach((pluginName) => {
@@ -13848,10 +14041,14 @@ class VePlayerBase {
13848
14041
  }
13849
14042
  });
13850
14043
  }
13851
- /**
14044
+ /** {zh}
13852
14045
  * @brief 调用此接口隐藏指定插件图标。
13853
14046
  * @param pluginNames 插件名称
13854
14047
  */
14048
+ /** {en}
14049
+ * @brief Hides the icon of a specified plugin.
14050
+ * @param PluginNames The plugin name.
14051
+ */
13855
14052
  hideIcon(pluginNames) {
13856
14053
  const morePlugin = this._player.getPlugin("more");
13857
14054
  pluginNames.forEach((pluginName) => {
@@ -13865,14 +14062,20 @@ class VePlayerBase {
13865
14062
  }
13866
14063
  });
13867
14064
  }
13868
- /**
14065
+ /** {zh}
13869
14066
  * @brief 调用此方法销毁播放器实例。
13870
14067
  */
14068
+ /** {en}
14069
+ * @brief Destroys the player instance.
14070
+ */
13871
14071
  destroy() {
13872
14072
  this._player.off(ERROR, this._errorCallback);
13873
14073
  this._player.destroy();
13874
14074
  }
13875
- /**
14075
+ /** {zh}
14076
+ * @hidden
14077
+ */
14078
+ /** {en}
13876
14079
  * @hidden
13877
14080
  */
13878
14081
  async prepare(url) {
@@ -21586,7 +21789,7 @@ class Logger extends Plugin {
21586
21789
  user_id: this._userId,
21587
21790
  device_id: this._deviceId,
21588
21791
  ext: {
21589
- veplayer_version: "2.3.0-rc.0",
21792
+ veplayer_version: "2.3.0-rc.1",
21590
21793
  flv_version: "3.0.12",
21591
21794
  hls_version: "3.0.12",
21592
21795
  rts_version: "0.2.0-alpha.5"
@@ -21902,7 +22105,11 @@ var RTMCodec = /* @__PURE__ */ ((RTMCodec2) => {
21902
22105
  return RTMCodec2;
21903
22106
  })(RTMCodec || {});
21904
22107
  class VePlayerLive extends VePlayerBase {
21905
- /**
22108
+ /** {zh}
22109
+ * @hidden
22110
+ * @param options
22111
+ */
22112
+ /** {en}
21906
22113
  * @hidden
21907
22114
  * @param options
21908
22115
  */
@@ -21912,6 +22119,9 @@ class VePlayerLive extends VePlayerBase {
21912
22119
  /** {zh}
21913
22120
  * @brief 调用此方法开启直播日志上报。
21914
22121
  */
22122
+ /** {en}
22123
+ * @brief Enables log upload.
22124
+ */
21915
22125
  openLog() {
21916
22126
  var _a;
21917
22127
  (_a = this._player.plugins) == null ? void 0 : _a.logger.open();
@@ -21919,6 +22129,9 @@ class VePlayerLive extends VePlayerBase {
21919
22129
  /** {zh}
21920
22130
  * @brief 调用此方法关闭直播日志上报。
21921
22131
  */
22132
+ /** {en}
22133
+ * @brief Disables log upload.
22134
+ */
21922
22135
  closeLog() {
21923
22136
  var _a;
21924
22137
  (_a = this._player.plugins) == null ? void 0 : _a.logger.close();
@@ -21926,6 +22139,9 @@ class VePlayerLive extends VePlayerBase {
21926
22139
  /** {zh}
21927
22140
  * @brief 调用此方法将打开直播信息面板,面板将展示拉流格式、帧率、码率、GOP、视频分辨率、编码方式、Buffer 水位、播放进度等基础信息。如果当前是软解,还会显示软解解码效率和解码消耗。
21928
22141
  */
22142
+ /** {en}
22143
+ * @brief Turns on the information panel, which displays basic information including stream format, frame rate, bitrate, GOP, video resolution, codec, buffer time, and playback progress. If software decoding is used, the software decoding efficiency and CPU consumption will also be displayed.
22144
+ */
21929
22145
  openInfoPanel() {
21930
22146
  var _a;
21931
22147
  (_a = this._player.plugins) == null ? void 0 : _a.infopanel.open();
@@ -21934,6 +22150,10 @@ class VePlayerLive extends VePlayerBase {
21934
22150
  * @brief 调用此方法关闭直播信息面板。
21935
22151
  *
21936
22152
  */
22153
+ /** {en}
22154
+ * @brief Turns off the information panel.
22155
+ *
22156
+ */
21937
22157
  closeInfoPanel() {
21938
22158
  var _a;
21939
22159
  (_a = this._player.plugins) == null ? void 0 : _a.infopanel.close();