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

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.
@@ -6598,7 +6598,12 @@ var __publicField = (obj, key, value) => {
6598
6598
  }
6599
6599
  };
6600
6600
  class VeError extends Error {
6601
- /**
6601
+ /** {zh}
6602
+ * @hidden
6603
+ * @param error
6604
+ * @param i18n
6605
+ */
6606
+ /** {en}
6602
6607
  * @hidden
6603
6608
  * @param error
6604
6609
  * @param i18n
@@ -6611,16 +6616,25 @@ var __publicField = (obj, key, value) => {
6611
6616
  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"));
6612
6617
  super(message);
6613
6618
  /**
6614
- * @brief 错误码,对应[错误码字典](#ErrorCode)。
6619
+ * @brief 错误码。
6620
+ */
6621
+ /** {en}
6622
+ * @brief The error code.
6615
6623
  */
6616
6624
  __publicField(this, "errorCode");
6617
- /**
6625
+ /** {zh}
6618
6626
  * @brief 错误等级。
6619
6627
  */
6628
+ /** {en}
6629
+ * @brief The error level.
6630
+ */
6620
6631
  __publicField(this, "level");
6621
- /**
6632
+ /** {zh}
6622
6633
  * @brief 其他错误信息。
6623
6634
  */
6635
+ /** {en}
6636
+ * @brief Other error messages.
6637
+ */
6624
6638
  __publicField(this, "ext");
6625
6639
  this.errorCode = (errorInfo == null ? void 0 : errorInfo.errorCode) ?? "UNKNOWN";
6626
6640
  this.level = (errorInfo == null ? void 0 : errorInfo.level) ?? "Error";
@@ -13228,7 +13242,10 @@ var __publicField = (obj, key, value) => {
13228
13242
  return xgOptions;
13229
13243
  };
13230
13244
  class VePlayerBase {
13231
- /**
13245
+ /** {zh}
13246
+ * @hidden
13247
+ */
13248
+ /** {en}
13232
13249
  * @hidden
13233
13250
  */
13234
13251
  constructor(options = {}) {
@@ -13281,7 +13298,7 @@ var __publicField = (obj, key, value) => {
13281
13298
  this._errorCallback = (err) => this._handleFallback(err);
13282
13299
  this._player.on(ERROR, this._errorCallback);
13283
13300
  }
13284
- /**
13301
+ /** {zh}
13285
13302
  * @brief 获取视频的就绪状态,其状态枚举值、枚举名称和说明如下:
13286
13303
  * - `0`:HAVE_NOTHING,没有关于媒体资源的可用信息
13287
13304
  * - `1`:HAVE_METADATA,已检索到足够多的媒体资源来初始化元数据, 快进/快退不会引发异常
@@ -13289,68 +13306,107 @@ var __publicField = (obj, key, value) => {
13289
13306
  * - `3`:HAVE_FUTURE_DATA,当前播放位置以及未来至少一小段时间的数据是可用的(至少有两帧以上的数据)
13290
13307
  * - `4`:HAVE_ENOUGH_DATA,有足够的数据可用,并且下载速率足够,媒体可以不间断地播放到最后
13291
13308
  */
13309
+ /** {en}
13310
+ * @brief Gets the readiness of the video.
13311
+ * - `0`: HAVE_NOTHING, which means there is no information about the media resources.
13312
+ * - `1`: HAVE_METADATA, which means enough media resources have been retrieved to initialize the metadata and fast-forward/rewind will not raise an exception.
13313
+ * - `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.
13314
+ * - `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).
13315
+ * - `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.
13316
+ */
13292
13317
  get readyState() {
13293
13318
  return this._player.readyState;
13294
13319
  }
13295
- /**
13320
+ /** {zh}
13296
13321
  * @brief 获取当前已缓冲的时间范围。
13297
13322
  */
13323
+ /** {en}
13324
+ * @brief Gets the currently buffered time range.
13325
+ */
13298
13326
  get buffered() {
13299
13327
  return this._player.buffered;
13300
13328
  }
13301
- /**
13329
+ /** {zh}
13302
13330
  * @brief 获取已经播放的音频/视频的时间范围。
13303
13331
  */
13332
+ /** {en}
13333
+ * @brief Gets the time range of the audio/video that has been played.
13334
+ */
13304
13335
  get played() {
13305
13336
  return this._player.played;
13306
13337
  }
13307
- /**
13338
+ /** {zh}
13308
13339
  * @brief 设置/获取视频当前的播放时间, 单位为 s。
13309
13340
  */
13341
+ /** {en}
13342
+ * @brief Sets or gets the current playback position of the video, in seconds.
13343
+ */
13310
13344
  get cumulateTime() {
13311
13345
  return this._player.cumulateTime;
13312
13346
  }
13313
- /**
13347
+ /** {zh}
13314
13348
  * @brief 获取是否处于焦点状态,处于焦点状态会显示控制栏。
13315
13349
  */
13350
+ /** {en}
13351
+ * @brief Gets whether the player has focus. The control bar is displayed when the player has focus.
13352
+ */
13316
13353
  get isFocused() {
13317
13354
  return this._player.isActive;
13318
13355
  }
13319
- /**
13356
+ /** {zh}
13320
13357
  * @brief 获取播放器是否处于全屏状态。
13321
13358
  */
13359
+ /** {en}
13360
+ * @brief Gets whether the player is in full-screen mode, in which the player covers the entire desktop.
13361
+ */
13322
13362
  get isFullscreen() {
13323
13363
  return this._player.isFullscreen;
13324
13364
  }
13325
- /**
13365
+ /** {zh}
13326
13366
  * @brief 获取播放器是否处于网页全屏状态。
13327
13367
  */
13368
+ /** {en}
13369
+ * @brief Gets whether the player is in full-window mode, in which the player covers the entire browser window.
13370
+ */
13328
13371
  get isCssFullscreen() {
13329
13372
  return this._player.isCssfullScreen;
13330
13373
  }
13331
- /**
13374
+ /** {zh}
13332
13375
  * @brief 获取视频的网络状态,其状态枚举值、枚举名称和说明如下:
13333
13376
  * - `0`:NETWORK_EMPTY,目前还没有数据,readyState 的值是 HAVE_NOTHING
13334
13377
  * - `1`:NETWORK_IDLE,HTMLMediaElement 处于活动状态并已选择资源,但未使用网络
13335
13378
  * - `2`:NETWORK_LOADING,浏览器正在下载 HTMLMediaElement 数据
13336
13379
  * - `3`:NETWORK_NO_SOURCE,未找到 HTMLMediaElement src。
13337
13380
  */
13381
+ /** {en}
13382
+ * @brief Gets the network condition of the video.
13383
+ * - `0`: NETWORK_EMPTY, which means there is no data yet, and `readyState` is `HAVE_NOTHING`.
13384
+ * - `1`: NETWORK_IDLE, which means the `HTMLMediaElement` element is active and the resources have been selected, but the network is not in use.
13385
+ * - `2`: NETWORK_LOADING, which means the browser is downloading the data of the `HTMLMediaElement` element.
13386
+ * - `3`: NETWORK_NO_SOURCE, the media source is not found according to the `src` property of the `HTMLMediaElement` element.
13387
+ */
13338
13388
  get networkState() {
13339
13389
  return this._player.networkState;
13340
13390
  }
13341
- /**
13391
+ /** {zh}
13342
13392
  * @brief 获取当前视频是否处于暂停状态。
13343
13393
  */
13394
+ /** {en}
13395
+ * @brief Gets whether the current video is suspended.
13396
+ */
13344
13397
  get paused() {
13345
13398
  return this._player.paused;
13346
13399
  }
13347
- /**
13400
+ /** {zh}
13348
13401
  * @brief 获取当前视频是否播放结束。
13349
13402
  */
13403
+ /** {en}
13404
+ * @brief Gets whether the current video has finished playing.
13405
+ */
13350
13406
  get ended() {
13351
13407
  return this._player.ended;
13352
13408
  }
13353
- /**
13409
+ /** {zh}
13354
13410
  * @brief 获取播放器当前所处的状态,其状态枚举值、枚举名称和说明如下:
13355
13411
  * - `0`:ERROR,播放出现错误
13356
13412
  * - `1`:INITIAL,初始化
@@ -13362,81 +13418,130 @@ var __publicField = (obj, key, value) => {
13362
13418
  * - `7`:ENDED,播放结束
13363
13419
  * - `8`:DESTROYED,播放器实例处于已被销毁
13364
13420
  */
13421
+ /** {en}
13422
+ * @brief Gets the current state of the player.
13423
+ * - `0`: ERROR, which means a playback error occurred
13424
+ * - `1`: INITIAL, which means initialization
13425
+ * - `2`: READY, which means the configuration/event/plug-in has been initialized/bound/instantiated
13426
+ * - `3`: ATTACHING, which means the media object is being mounted.
13427
+ * - `4`: ATTACHED, which means the media object has been mounted in the DOM
13428
+ * - `5`: NOTALLOW, which means the playback is blocked
13429
+ * - `6`: RUNNING, which means the playback has started successfully
13430
+ * - `7`: ENDED, which means the playback has ended
13431
+ * - `8`: DESTROYED, which means the player instance is destroyed
13432
+ */
13365
13433
  get state() {
13366
13434
  return this._player.state;
13367
13435
  }
13368
- /**
13436
+ /** {zh}
13369
13437
  * 获取当前播放视频的拉流地址。
13370
13438
  */
13439
+ /** {en}
13440
+ * Gets the current pull stream address.
13441
+ */
13371
13442
  get url() {
13372
13443
  return this._player.config.url;
13373
13444
  }
13374
- /**
13375
- * @brief 获取当播放视频的线路名称唯一标识(name)。
13445
+ /** {zh}
13446
+ * @brief 获取当前播放视频的线路名称唯一标识(name)。
13447
+ */
13448
+ /** {en}
13449
+ * @brief Gets the current playback source ID.
13376
13450
  */
13377
13451
  get source() {
13378
13452
  var _a;
13379
13453
  return (_a = this._sourceManager.source) == null ? void 0 : _a.name;
13380
13454
  }
13381
- /**
13455
+ /** {zh}
13382
13456
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
13383
13457
  */
13458
+ /** {en}
13459
+ * @brief Gets the current resolution ID.
13460
+ */
13384
13461
  get definition() {
13385
13462
  var _a;
13386
13463
  return (_a = this._sourceManager.definition) == null ? void 0 : _a.definition;
13387
13464
  }
13388
- /**
13465
+ /** {zh}
13389
13466
  * @brief 获取和设置播放器的跨域配置信息,更多信息参考 [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) 属性介绍。
13390
13467
  */
13468
+ /** {en}
13469
+ * @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).
13470
+ */
13391
13471
  get crossOrigin() {
13392
13472
  return this._player.crossOrigin;
13393
13473
  }
13394
- /**
13474
+ /** {zh}
13395
13475
  * @brief 获取和设置播放器的跨域配置信息,更多信息参考 [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) 属性介绍。
13396
13476
  */
13477
+ /** {en}
13478
+ * @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).
13479
+ */
13397
13480
  set crossOrigin(crossOrigin) {
13398
13481
  this._player.crossOrigin = crossOrigin;
13399
13482
  }
13400
- /**
13483
+ /** {zh}
13401
13484
  * @brief 获取和设置视频的音量,取值范围为 [0,1]。
13402
13485
  */
13486
+ /** {en}
13487
+ * @brief Gets the volume of the video. The value range is [0,1].
13488
+ */
13403
13489
  // eslint-disable-next-line @typescript-eslint/member-ordering
13404
13490
  get volume() {
13405
13491
  return this._player.volume;
13406
13492
  }
13407
- /**
13493
+ /** {zh}
13408
13494
  * @brief 获取和设置视频的音量,取值范围为 [0,1]。
13409
13495
  */
13496
+ /** {en}
13497
+ * @brief Sets the volume of the video. Valid range: [0,1].
13498
+ */
13410
13499
  set volume(volume) {
13411
13500
  this._player.volume = volume;
13412
13501
  }
13413
- /**
13502
+ /** {zh}
13414
13503
  * @brief 获取和设置视频静音状态。
13415
13504
  * - `true`:静音
13416
13505
  * - `false`:非静音
13417
13506
  */
13507
+ /** {en}
13508
+ * @brief Gets whether the video is muted.
13509
+ * - `true`: Muted.
13510
+ * - `false`: Not muted.
13511
+ */
13418
13512
  // eslint-disable-next-line @typescript-eslint/member-ordering
13419
13513
  get muted() {
13420
13514
  return this._player.muted;
13421
13515
  }
13422
- /**
13516
+ /** {zh}
13423
13517
  * @brief 获取和设置视频静音状态。
13424
13518
  * - `true`:静音
13425
13519
  * - `false`:非静音
13426
13520
  */
13521
+ /** {en}
13522
+ * @brief Mute or unmute the video.
13523
+ * - `true`: Mute the video.
13524
+ * - `false`: Unmute the video.
13525
+ */
13427
13526
  set muted(isMuted) {
13428
13527
  this._player.muted = isMuted;
13429
13528
  }
13430
- /**
13529
+ /** {zh}
13431
13530
  * @brief 获取和设置当前语言。
13432
13531
  */
13532
+ /** {en}
13533
+ * @brief Gets the current language.
13534
+ */
13433
13535
  // eslint-disable-next-line @typescript-eslint/member-ordering
13434
13536
  get lang() {
13435
13537
  return this._i18nManager.getLang();
13436
13538
  }
13437
- /**
13539
+ /** {zh}
13438
13540
  * @brief 获取和设置当前语言。
13439
13541
  */
13542
+ /** {en}
13543
+ * @brief Sets the current language.
13544
+ */
13440
13545
  set lang(lang) {
13441
13546
  var _a, _b;
13442
13547
  if (this._player.lang === lang) {
@@ -13458,7 +13563,10 @@ var __publicField = (obj, key, value) => {
13458
13563
  get _src() {
13459
13564
  return this._player.currentSrc;
13460
13565
  }
13461
- /**
13566
+ /** {zh}
13567
+ * @hidden
13568
+ */
13569
+ /** {en}
13462
13570
  * @hidden
13463
13571
  */
13464
13572
  static async create(options = {}, Constructor) {
@@ -13488,11 +13596,16 @@ var __publicField = (obj, key, value) => {
13488
13596
  sourceManager
13489
13597
  });
13490
13598
  }
13491
- /**
13599
+ /** {zh}
13492
13600
  * @brief 调用此方法切换拉流地址、线路、清晰度。
13493
13601
  * @param target 目标地址,可以是播放地址,也可以是线路和清晰度
13494
13602
  * @param options 更多配置信息
13495
13603
  */
13604
+ /** {en}
13605
+ * @brief Switches the pull stream address, playback source, or resolution.
13606
+ * @param target The target pull stream address, playback source, or resolution.
13607
+ * @param options More configurations.
13608
+ */
13496
13609
  async switch(target, options) {
13497
13610
  var _a, _b;
13498
13611
  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) {
@@ -13509,21 +13622,32 @@ var __publicField = (obj, key, value) => {
13509
13622
  await this._switch(targetDefinition);
13510
13623
  return targetDefinition;
13511
13624
  }
13512
- /**
13625
+ /** {zh}
13513
13626
  * @brief 调用此方法更新拉流地址列表。
13514
13627
  * @param playlist 要更新的播放列表。
13515
13628
  * @param target 更新后默认播放的资源。
13516
13629
  */
13630
+ /** {en}
13631
+ * @brief Updates the list of pull stream addresses.
13632
+ * @param Playlist The updated list.
13633
+ * @param Target The default playback resource after the update.
13634
+ */
13517
13635
  updatePlaylist(playlist, target) {
13518
13636
  const sourceManager = this._sourceManager.updateSources(playlist, target);
13519
13637
  return this._switch(sourceManager.definition);
13520
13638
  }
13521
13639
  // TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
13522
13640
  /**
13641
+ /** {zh}
13523
13642
  * @brief 调用此方法监听指定事件,事件处理函数只执行一次。
13524
13643
  * @param event 表示事件的名称。
13525
13644
  * @param callback 表示事件的回调函数。
13526
13645
  */
13646
+ /** {en}
13647
+ * @brief Listens for a specified event. The event handler is executed only once.
13648
+ * @param event The event name.
13649
+ * @param callback The callback function for the event.
13650
+ */
13527
13651
  once(event, callback) {
13528
13652
  var _a;
13529
13653
  const { xgCallback, xgEventName } = this._transformEvent(event, callback);
@@ -13535,11 +13659,16 @@ var __publicField = (obj, key, value) => {
13535
13659
  this._player.once(xgEventName, xgCallback);
13536
13660
  }
13537
13661
  }
13538
- /**
13662
+ /** {zh}
13539
13663
  * @brief 调用此方法解绑或移除指定事件的事件监听。
13540
13664
  * @param event 表示事件的名称。
13541
13665
  * @param callback 表示事件的回调函数。
13542
13666
  */
13667
+ /** {en}
13668
+ * @brief Stops listening for a specified event.
13669
+ * @param event The event name.
13670
+ * @param callback The callback function for the event.
13671
+ */
13543
13672
  off(event, callback) {
13544
13673
  var _a;
13545
13674
  const xgCallback = (_a = this._events[event]) == null ? void 0 : _a.get(callback);
@@ -13549,27 +13678,40 @@ var __publicField = (obj, key, value) => {
13549
13678
  this._events[event].delete(callback);
13550
13679
  }
13551
13680
  }
13552
- /**
13681
+ /** {zh}
13553
13682
  * @brief 调用此方法触发指定事件。
13554
13683
  * @param event 表示事件的名称。
13555
13684
  * @param data 事件信息。
13556
13685
  */
13686
+ /** {en}
13687
+ * @brief Triggers a specified event.
13688
+ * @param event The event name.
13689
+ * @param data The event information.
13690
+ */
13557
13691
  emit(event, data) {
13558
13692
  const { xgEventName } = this._transformEvent(event);
13559
13693
  this._player.emit(xgEventName, data);
13560
13694
  }
13561
- /**
13695
+ /** {zh}
13562
13696
  * @brief 调用此方法解绑或移除指定事件的所有事件监听。
13563
13697
  */
13698
+ /** {en}
13699
+ * @brief Stops listening to any player event.
13700
+ */
13564
13701
  offAll() {
13565
13702
  this._events = {};
13566
13703
  this._player.offAll();
13567
13704
  }
13568
- /**
13705
+ /** {zh}
13569
13706
  * @brief 调用此方法监听指定事件。
13570
13707
  * @param event 表示事件名称。
13571
13708
  * @param callback 表示事件的回调函数。
13572
13709
  */
13710
+ /** {en}
13711
+ * @brief Listens for a specified event.
13712
+ * @param event The event name.
13713
+ * @param callback The callback function for the event.
13714
+ */
13573
13715
  on(event, callback) {
13574
13716
  var _a;
13575
13717
  const { xgCallback, xgEventName } = this._transformEvent(event, callback);
@@ -13581,102 +13723,153 @@ var __publicField = (obj, key, value) => {
13581
13723
  this._player.on(xgEventName, xgCallback);
13582
13724
  }
13583
13725
  }
13584
- /**
13726
+ /** {zh}
13585
13727
  * @brief 调用此方法开始播放 。
13586
13728
  */
13729
+ /** {en}
13730
+ * @brief Starts playback.
13731
+ */
13587
13732
  play() {
13588
13733
  /* istanbul ignore next -- @preserve */
13589
13734
  return this._player.play();
13590
13735
  }
13591
- /**
13736
+ /** {zh}
13592
13737
  * @brief 调用此方法暂停播放。
13593
13738
  */
13739
+ /** {en}
13740
+ * @brief Pauses playback.
13741
+ */
13594
13742
  pause() {
13595
13743
  /* istanbul ignore next -- @preserve */
13596
13744
  return this._player.pause();
13597
13745
  }
13598
- /**
13746
+ /** {zh}
13599
13747
  * @brief 调用此方法打开画中画。
13600
13748
  */
13749
+ /** {en}
13750
+ * @brief Turns on Picture-in-Picture (PIP).
13751
+ */
13601
13752
  requestPIP() {
13602
13753
  var _a;
13603
13754
  /* istanbul ignore next -- @preserve */
13604
13755
  (_a = this._player.plugins.pip) == null ? void 0 : _a.requestPIP();
13605
13756
  }
13606
- /**
13757
+ /** {zh}
13607
13758
  * @brief 调用此方法关闭画中画。
13608
13759
  */
13760
+ /** {en}
13761
+ * @brief Turns off Picture-in-Picture (PIP).
13762
+ */
13609
13763
  exitPIP() {
13610
13764
  var _a;
13611
13765
  /* istanbul ignore next -- @preserve */
13612
13766
  (_a = this._player.plugins.pip) == null ? void 0 : _a.exitPIP();
13613
13767
  }
13614
- /**
13768
+ /** {zh}
13615
13769
  * @brief 调用此方法重新拉流。
13616
13770
  */
13771
+ /** {en}
13772
+ * @brief Retries stream-pulling.
13773
+ */
13617
13774
  retry() {
13618
13775
  return this._player.retry();
13619
13776
  }
13620
- /**
13777
+ /** {zh}
13621
13778
  * @brief 播放器获取焦点,调用该方法 `veplayer.isFocused` 将会变为 `true`,并触发 `PLAYER_FOCUS` 事件。
13622
13779
  * @param data 播放器获取焦点配置信息。
13623
13780
  */
13781
+ /** {en}
13782
+ * @brief The player gets focus. When the method is called, `veplayer.isFocused` will become `true` and the `PLAYER_FOCUS` event will be triggered.
13783
+ * @param data Related configurations.
13784
+ */
13624
13785
  focus(data) {
13625
13786
  return this._player.focus(data);
13626
13787
  }
13627
- /**
13788
+ /** {zh}
13628
13789
  * @brief 播放器失去焦点,调用该方法 `veplayer.isFocused` 将会变为 `false`,并触发 `PLAYER_BLUR` 事件。
13629
13790
  * @param data 播放器失去焦点配置信息。
13630
13791
  */
13792
+ /** {en}
13793
+ * @brief The player loses focus. When the method is called, `veplayer.isFocused` will become `false` and the `PLAYER_BLUR` event will be triggered.
13794
+ * @param data The related configurations.
13795
+ */
13631
13796
  blur(data) {
13632
13797
  return this._player.blur(data);
13633
13798
  }
13634
- /**
13799
+ /** {zh}
13635
13800
  * @brief 调用此方法进入系统全屏状态。如果该方法调用的时候处于网页全屏状态会自动退出网页全屏,下发事件 `Events.FULLSCREEN_CHANGE`。
13636
13801
  * @param el 全屏作用的 DOM 节点。
13637
13802
  */
13803
+ /** {en}
13804
+ * @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.
13805
+ * @param el The DOM node in which the player is displayed in full-screen mode.
13806
+ */
13638
13807
  requestFullscreen(el) {
13639
13808
  return this._player.getFullscreen(el);
13640
13809
  }
13641
- /**
13810
+ /** {zh}
13642
13811
  * @brief 调用此方法退出系统全屏状态,调用该方法 `veplayer.isFullscreen` 将会变为 `false`,并触发 `Events.FULLSCREEN_CHANGE` 事件。
13643
13812
  * @param el 全屏作用的 DOM 节点。
13644
13813
  */
13814
+ /** {en}
13815
+ * @brief Exits full-screen mode. After the method is called, `veplayer.isFullscreen` will become `false` and the `Events.FULLSCREEN_CHANGE` event will be triggered.
13816
+ * @param el The DOM node of the full screen effect.
13817
+ */
13645
13818
  exitFullscreen(el) {
13646
13819
  return this._player.exitFullscreen(el);
13647
13820
  }
13648
- /**
13821
+ /** {zh}
13649
13822
  * @brief 调用此方法进入网页样式全屏状态,播放器进入网页全屏,利用 CSS 模拟实现全屏效果。如果该接口调用的时候处于全屏状态,会自动退出全屏,下发事件 `Events.CSS_FULLSCREEN_CHANGE`。
13650
13823
  * @param el 全屏作用的 DOM 节点。
13651
13824
  */
13825
+ /** {en}
13826
+ * @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.
13827
+ * @param el The DOM node in which the player is displayed in full-window mode.
13828
+ */
13652
13829
  requestCssFullscreen(el) {
13653
13830
  return this._player.getCssFullscreen(el);
13654
13831
  }
13655
- /**
13832
+ /** {zh}
13656
13833
  * @brief 调用此方法退出网页样式全屏状态。 调用该方法 `veplayer.isFullscreen` 将会变为 `false`,并触发 `Events.CSS_FULLSCREEN_CHANGE` 事件。
13657
13834
  */
13835
+ /** {en}
13836
+ * @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.
13837
+ */
13658
13838
  exitCssFullscreen() {
13659
13839
  return this._player.exitCssFullscreen();
13660
13840
  }
13661
- /**
13841
+ /** {zh}
13662
13842
  * @brief 调用此方法在当前播放器上注册指定插件。
13663
13843
  * @param plugin 插件构造函数。
13664
13844
  * @param config 插件的配置列表。
13665
13845
  */
13846
+ /** {en}
13847
+ * @brief Registers a specified plug-in to the current player.
13848
+ * @param Plugin The plugin constructor.
13849
+ * @param config The plugin configurations.
13850
+ */
13666
13851
  registerPlugin(plugin, config) {
13667
13852
  return this._player.registerPlugin(plugin, config);
13668
13853
  }
13669
- /**
13854
+ /** {zh}
13670
13855
  * @brief 调用此方法在当前播放器上销毁/注销指定插件。
13671
13856
  * @param plugin 插件实例或者插件名称。
13672
13857
  */
13858
+ /** {en}
13859
+ * @brief Destroys or unregisters a specified plugin from the player.
13860
+ * @param Plugin The plugin instance or name.
13861
+ */
13673
13862
  unRegisterPlugin(plugin) {
13674
13863
  return this._player.unRegisterPlugin(plugin);
13675
13864
  }
13676
- /**
13865
+ /** {zh}
13677
13866
  * @brief 调用此接口显示指定插件图标。
13678
13867
  * @param pluginNames 插件名称
13679
13868
  */
13869
+ /** {en}
13870
+ * @brief Displays the icon of a specified plugin.
13871
+ * @param PluginNames The plugin name.
13872
+ */
13680
13873
  showIcon(pluginNames) {
13681
13874
  const morePlugin = this._player.getPlugin("more");
13682
13875
  pluginNames.forEach((pluginName) => {
@@ -13690,10 +13883,14 @@ var __publicField = (obj, key, value) => {
13690
13883
  }
13691
13884
  });
13692
13885
  }
13693
- /**
13886
+ /** {zh}
13694
13887
  * @brief 调用此接口隐藏指定插件图标。
13695
13888
  * @param pluginNames 插件名称
13696
13889
  */
13890
+ /** {en}
13891
+ * @brief Hides the icon of a specified plugin.
13892
+ * @param PluginNames The plugin name.
13893
+ */
13697
13894
  hideIcon(pluginNames) {
13698
13895
  const morePlugin = this._player.getPlugin("more");
13699
13896
  pluginNames.forEach((pluginName) => {
@@ -13707,14 +13904,20 @@ var __publicField = (obj, key, value) => {
13707
13904
  }
13708
13905
  });
13709
13906
  }
13710
- /**
13907
+ /** {zh}
13711
13908
  * @brief 调用此方法销毁播放器实例。
13712
13909
  */
13910
+ /** {en}
13911
+ * @brief Destroys the player instance.
13912
+ */
13713
13913
  destroy() {
13714
13914
  this._player.off(ERROR, this._errorCallback);
13715
13915
  this._player.destroy();
13716
13916
  }
13717
- /**
13917
+ /** {zh}
13918
+ * @hidden
13919
+ */
13920
+ /** {en}
13718
13921
  * @hidden
13719
13922
  */
13720
13923
  async prepare(url) {