@volcengine/veplayer 2.5.0-rc.1 → 2.6.0-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.
@@ -1457,7 +1457,7 @@ var sniffer$1 = {
1457
1457
  }
1458
1458
  }
1459
1459
  };
1460
- var version = "3.0.20-alpha.4";
1460
+ var version = "3.0.21-rc.3";
1461
1461
  var ERROR_TYPE_MAP = {
1462
1462
  1: "media",
1463
1463
  2: "media",
@@ -2808,6 +2808,18 @@ var BasePlugin = /* @__PURE__ */ function() {
2808
2808
  }
2809
2809
  }
2810
2810
  }
2811
+ }, {
2812
+ key: "defineMethod",
2813
+ value: function defineMethod(Obj, map) {
2814
+ for (var key in map) {
2815
+ if (Object.prototype.hasOwnProperty.call(map, key) && typeof map[key] === "function") {
2816
+ Object.defineProperty(Obj, key, {
2817
+ configurable: true,
2818
+ value: map[key]
2819
+ });
2820
+ }
2821
+ }
2822
+ }
2811
2823
  }, {
2812
2824
  key: "defaultConfig",
2813
2825
  get: function get() {
@@ -3453,7 +3465,7 @@ var ResizeObserver = /* @__PURE__ */ function() {
3453
3465
  if (!this.observer) {
3454
3466
  return;
3455
3467
  }
3456
- this.observer && this.observer.observe(target);
3468
+ this.observer.observe(target);
3457
3469
  var _pid = target.getAttribute(PLATER_ID);
3458
3470
  var __handlers = this.__handlers;
3459
3471
  var index = -1;
@@ -3482,16 +3494,17 @@ var ResizeObserver = /* @__PURE__ */ function() {
3482
3494
  }
3483
3495
  });
3484
3496
  try {
3485
- this.observer && this.observer.unobserve(target);
3497
+ var _this$observer;
3498
+ (_this$observer = this.observer) === null || _this$observer === void 0 ? void 0 : _this$observer.unobserve(target);
3486
3499
  } catch (e3) {
3487
3500
  }
3488
- this.observer && this.observer.unobserve(target);
3489
3501
  i2 > -1 && this.__handlers.splice(i2, 1);
3490
3502
  }
3491
3503
  }, {
3492
3504
  key: "destroyObserver",
3493
3505
  value: function destroyObserver() {
3494
- this.observer && this.observer.disconnect();
3506
+ var _this$observer2;
3507
+ (_this$observer2 = this.observer) === null || _this$observer2 === void 0 ? void 0 : _this$observer2.disconnect();
3495
3508
  this.observer = null;
3496
3509
  this.__handlers = null;
3497
3510
  }
@@ -3523,7 +3536,8 @@ function addObserver(target, handler) {
3523
3536
  return resizeObserver;
3524
3537
  }
3525
3538
  function unObserver(target, handler) {
3526
- resizeObserver.unObserver(target, handler);
3539
+ var _resizeObserver;
3540
+ (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 ? void 0 : _resizeObserver.unObserver(target, handler);
3527
3541
  }
3528
3542
  var pluginsManager = {
3529
3543
  pluginGroup: {},
@@ -5115,7 +5129,7 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
5115
5129
  if (!url) {
5116
5130
  url = _this8.url || _this8.config.url;
5117
5131
  }
5118
- var _furl = _this8._preProcessUrl(url);
5132
+ var _furl = _this8.preProcessUrl(url);
5119
5133
  var ret = _this8._startInit(_furl.url);
5120
5134
  return ret;
5121
5135
  }).catch(function(e3) {
@@ -5133,7 +5147,7 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
5133
5147
  if (util$1.typeOf(url) === "Object") {
5134
5148
  _src = url.url;
5135
5149
  }
5136
- _src = this._preProcessUrl(_src).url;
5150
+ _src = this.preProcessUrl(_src).url;
5137
5151
  var curTime = this.currentTime;
5138
5152
  this.__startTime = curTime;
5139
5153
  var isPaused = this.paused && !this.isError;
@@ -5474,7 +5488,7 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
5474
5488
  runHooks(this, "retry", function() {
5475
5489
  var cur = _this20.currentTime;
5476
5490
  var url = _this20.config.url;
5477
- var _srcRet = !util$1.isMSE(_this20.media) ? _this20._preProcessUrl(url) : {
5491
+ var _srcRet = !util$1.isMSE(_this20.media) ? _this20.preProcessUrl(url) : {
5478
5492
  url
5479
5493
  };
5480
5494
  _this20.src = _srcRet.url;
@@ -6130,11 +6144,11 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
6130
6144
  this._state = newState;
6131
6145
  }
6132
6146
  }, {
6133
- key: "_preProcessUrl",
6134
- value: function _preProcessUrl(url, ext) {
6135
- var _this$config7 = this.config, preProcessUrl = _this$config7.preProcessUrl, preProcessUrlOptions = _this$config7.preProcessUrlOptions;
6147
+ key: "preProcessUrl",
6148
+ value: function preProcessUrl(url, ext) {
6149
+ var _this$config7 = this.config, preProcessUrl2 = _this$config7.preProcessUrl, preProcessUrlOptions = _this$config7.preProcessUrlOptions;
6136
6150
  var processUrlOptions = Object.assign({}, preProcessUrlOptions, ext);
6137
- return !util$1.isBlob(url) && typeof preProcessUrl === "function" ? preProcessUrl(url, processUrlOptions) : {
6151
+ return !util$1.isBlob(url) && typeof preProcessUrl2 === "function" ? preProcessUrl2(url, processUrlOptions) : {
6138
6152
  url
6139
6153
  };
6140
6154
  }
@@ -6716,11 +6730,11 @@ let VeError$1 = class VeError extends Error {
6716
6730
  } : error2;
6717
6731
  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"));
6718
6732
  super(message);
6719
- /**
6733
+ /** {zh}
6720
6734
  * @brief 错误码。
6721
6735
  */
6722
6736
  /** {en}
6723
- * @brief The error code.
6737
+ * @brief Error code.
6724
6738
  */
6725
6739
  __publicField(this, "errorCode");
6726
6740
  /** {zh}
@@ -8506,7 +8520,7 @@ var MobilePlugin = /* @__PURE__ */ function(_Plugin) {
8506
8520
  }
8507
8521
  this.on(DURATION_CHANGE, function() {
8508
8522
  var player2 = _this2.player, config2 = _this2.config;
8509
- if (player2.duration * 1e3 < config2.moveDuration) {
8523
+ if (player2.duration > 0 && player2.duration * 1e3 < config2.moveDuration) {
8510
8524
  config2.moveDuration = player2.duration * 1e3;
8511
8525
  }
8512
8526
  });
@@ -8820,10 +8834,13 @@ var MobilePlugin = /* @__PURE__ */ function(_Plugin) {
8820
8834
  }, {
8821
8835
  key: "updateBrightness",
8822
8836
  value: function updateBrightness(percent) {
8837
+ var pos = this.pos, config = this.config, xgMask = this.xgMask;
8838
+ if (!config.darkness) {
8839
+ return;
8840
+ }
8823
8841
  if (this.player.rotateDeg) {
8824
8842
  percent = -percent;
8825
8843
  }
8826
- var pos = this.pos, config = this.config, xgMask = this.xgMask;
8827
8844
  var light = pos.light + 0.8 * percent;
8828
8845
  light = light > config.maxDarkness ? config.maxDarkness : light < 0 ? 0 : light;
8829
8846
  if (xgMask) {
@@ -8884,12 +8901,12 @@ var MobilePlugin = /* @__PURE__ */ function(_Plugin) {
8884
8901
  }, {
8885
8902
  key: "disableGesture",
8886
8903
  value: function disableGesture() {
8887
- this.config.disableGesture = false;
8904
+ this.config.disableGesture = true;
8888
8905
  }
8889
8906
  }, {
8890
8907
  key: "enableGesture",
8891
8908
  value: function enableGesture() {
8892
- this.config.disableGesture = true;
8909
+ this.config.disableGesture = false;
8893
8910
  }
8894
8911
  }, {
8895
8912
  key: "destroy",
@@ -9758,7 +9775,7 @@ var Fullscreen = /* @__PURE__ */ function(_IconPlugin) {
9758
9775
  }, {
9759
9776
  key: "toggleFullScreen",
9760
9777
  value: function toggleFullScreen(e3) {
9761
- if (e3) {
9778
+ if (e3 instanceof Event) {
9762
9779
  e3.preventDefault();
9763
9780
  e3.stopPropagation();
9764
9781
  }
@@ -10441,7 +10458,7 @@ var PIP = /* @__PURE__ */ function(_IconPlugin) {
10441
10458
  key: "isPIPAvailable",
10442
10459
  value: function isPIPAvailable() {
10443
10460
  var video = this.player.media;
10444
- var _isEnabled = util$1.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : true;
10461
+ var _isEnabled = util$1.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : false;
10445
10462
  return _isEnabled && (util$1.typeOf(video.disablePictureInPicture) === "Boolean" && !video.disablePictureInPicture || video.webkitSupportsPresentationMode && util$1.typeOf(video.webkitSetPresentationMode) === "Function") || this.isDocPIPAvailable();
10446
10463
  }
10447
10464
  }, {
@@ -13573,28 +13590,33 @@ const DEFAULT_OPTIONS = {
13573
13590
  useCssFullscreen: false
13574
13591
  }
13575
13592
  };
13576
- const transformOption = (options) => {
13577
- const { autoplay: autoplay2, ...rest } = options;
13578
- const xgOptions = rest;
13579
- if (xgOptions.poster) {
13580
- xgOptions.poster = escapeHtml(xgOptions.poster);
13581
- }
13582
- xgOptions.icons = {
13583
- ...DEFAULT_ICONS,
13584
- ...xgOptions.icons ? escapeIcons(xgOptions.icons) : {}
13585
- };
13586
- xgOptions.autoplay = Boolean(autoplay2);
13587
- if (autoplay2 && typeof autoplay2 !== "boolean") {
13588
- xgOptions.autoplayMuted = autoplay2 == null ? void 0 : autoplay2.muted;
13589
- xgOptions.videoAttributes = {
13590
- ...xgOptions.videoAttributes ?? {},
13591
- muted: autoplay2 == null ? void 0 : autoplay2.muted
13593
+ const transformOption = (
13594
+ /** {zh}
13595
+ * @param options 更多配置信息。
13596
+ */
13597
+ (options) => {
13598
+ const { autoplay: autoplay2, ...rest } = options;
13599
+ const xgOptions = rest;
13600
+ if (xgOptions.poster) {
13601
+ xgOptions.poster = escapeHtml(xgOptions.poster);
13602
+ }
13603
+ xgOptions.icons = {
13604
+ ...DEFAULT_ICONS,
13605
+ ...xgOptions.icons ? escapeIcons(xgOptions.icons) : {}
13592
13606
  };
13593
- xgOptions.autoplayPlugin = autoplay2;
13607
+ xgOptions.autoplay = Boolean(autoplay2);
13608
+ if (autoplay2 && typeof autoplay2 !== "boolean") {
13609
+ xgOptions.autoplayMuted = autoplay2 == null ? void 0 : autoplay2.muted;
13610
+ xgOptions.videoAttributes = {
13611
+ ...xgOptions.videoAttributes ?? {},
13612
+ muted: autoplay2 == null ? void 0 : autoplay2.muted
13613
+ };
13614
+ xgOptions.autoplayPlugin = autoplay2;
13615
+ }
13616
+ delete xgOptions.i18n;
13617
+ return xgOptions;
13594
13618
  }
13595
- delete xgOptions.i18n;
13596
- return xgOptions;
13597
- };
13619
+ );
13598
13620
  class VePlayerBase {
13599
13621
  /** {zh}
13600
13622
  * @hidden
@@ -13614,7 +13636,9 @@ class VePlayerBase {
13614
13636
  this._sourceManager = options.sourceManager;
13615
13637
  this._preparePlugins = options.preparePlugins;
13616
13638
  this._previousPrepareResult = options.prepareResult;
13617
- this._i18nManager = options.i18nManager ?? new VeI18n({ i18n: options.i18n });
13639
+ this._i18nManager = options.i18nManager ?? new VeI18n({
13640
+ i18n: options.i18n
13641
+ });
13618
13642
  const xgOptions = transformOption({
13619
13643
  ...options,
13620
13644
  ...(_a = this._previousPrepareResult) == null ? void 0 : _a.options
@@ -13809,9 +13833,14 @@ class VePlayerBase {
13809
13833
  /** {zh}
13810
13834
  * 获取播放器版本号
13811
13835
  * @returns
13836
+ * @brief
13837
+ * 获取播放器 SDK 版本号。
13838
+ */
13839
+ /** {en}
13840
+ * @brief Retrieve the player SDK version number.
13812
13841
  */
13813
13842
  get playerVersion() {
13814
- return "2.5.0-rc.1";
13843
+ return "2.6.0-rc.0";
13815
13844
  }
13816
13845
  /** {zh}
13817
13846
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -13959,8 +13988,8 @@ class VePlayerBase {
13959
13988
  }
13960
13989
  /** {zh}
13961
13990
  * @brief 调用此方法切换拉流地址、线路、清晰度。
13962
- * @param target 目标地址,可以是播放地址,也可以是线路和清晰度
13963
- * @param options 更多配置信息
13991
+ * @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
13992
+ * @param options 更多配置信息。
13964
13993
  */
13965
13994
  /** {en}
13966
13995
  * @brief Switches the pull stream address, playback source, or resolution.
@@ -13971,7 +14000,9 @@ class VePlayerBase {
13971
14000
  var _a, _b;
13972
14001
  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) {
13973
14002
  this._sourceManager.updateSources(target);
13974
- await this._switchUrl(target, { seamless: options == null ? void 0 : options.seamless });
14003
+ await this._switchUrl(target, {
14004
+ seamless: options == null ? void 0 : options.seamless
14005
+ });
13975
14006
  return this._sourceManager.definition;
13976
14007
  }
13977
14008
  const targetDefinition = this._sourceManager.find(target, options);
@@ -13998,16 +14029,15 @@ class VePlayerBase {
13998
14029
  return this._switch(sourceManager.definition);
13999
14030
  }
14000
14031
  // TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
14001
- /**
14002
14032
  /** {zh}
14003
14033
  * @brief 调用此方法监听指定事件,事件处理函数只执行一次。
14004
14034
  * @param event 表示事件的名称。
14005
14035
  * @param callback 表示事件的回调函数。
14006
14036
  */
14007
14037
  /** {en}
14008
- * @brief Add a one-time listener function for the specified event.
14009
- * @param event The event name.
14010
- * @param callback The callback function for the event.
14038
+ * @brief Call this method to listen for the specified event. The event handler is executed only once.
14039
+ * @param event The name representing the event.
14040
+ * @param callback Callback functions representing events.
14011
14041
  */
14012
14042
  once(event, callback) {
14013
14043
  var _a;
@@ -14158,10 +14188,14 @@ class VePlayerBase {
14158
14188
  return this._player.blur(data);
14159
14189
  }
14160
14190
  /** {zh}
14161
- * @brief 判断浏览器是否支持播放格式
14162
- * @param type 播放格式
14191
+ * @brief 判断浏览器是否支持播放格式。
14192
+ * @param type 播放格式。
14163
14193
  * @returns
14164
14194
  */
14195
+ /** {en}
14196
+ * @brief Determine whether the browser supports the playback format.
14197
+ * @param type The playback format.
14198
+ */
14165
14199
  canPlayType(type) {
14166
14200
  return this._player.canPlayType(type);
14167
14201
  }
@@ -14233,7 +14267,7 @@ class VePlayerBase {
14233
14267
  }
14234
14268
  /** {zh}
14235
14269
  * @brief 调用此接口显示指定插件图标。
14236
- * @param pluginNames 插件名称
14270
+ * @param pluginNames 插件名称。
14237
14271
  */
14238
14272
  /** {en}
14239
14273
  * @brief Displays the icon of a specified plugin.
@@ -14254,7 +14288,7 @@ class VePlayerBase {
14254
14288
  }
14255
14289
  /** {zh}
14256
14290
  * @brief 调用此接口隐藏指定插件图标。
14257
- * @param pluginNames 插件名称
14291
+ * @param pluginNames 插件名称。
14258
14292
  */
14259
14293
  /** {en}
14260
14294
  * @brief Hides the icon of a specified plugin.
@@ -14326,7 +14360,14 @@ class VePlayerBase {
14326
14360
  this._player.once("canplay", () => {
14327
14361
  this._sourceManager.resetFallback();
14328
14362
  });
14329
- this.emit(Events$1.FALLBACK, { from: { url: preUrl }, to: { url } });
14363
+ this.emit(Events$1.FALLBACK, {
14364
+ from: {
14365
+ url: preUrl
14366
+ },
14367
+ to: {
14368
+ url
14369
+ }
14370
+ });
14330
14371
  this._switchUrl(url);
14331
14372
  }
14332
14373
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -22063,9 +22104,9 @@ class Logger extends Plugin {
22063
22104
  user_id: this._userId,
22064
22105
  device_id: this._deviceId,
22065
22106
  ext: {
22066
- veplayer_version: "2.5.0-rc.1",
22067
- flv_version: "3.0.19-rc.0",
22068
- hls_version: "3.0.20-alpha.2",
22107
+ veplayer_version: "2.6.0-rc.0",
22108
+ flv_version: "3.0.21-rc.3",
22109
+ hls_version: "3.0.21-rc.3",
22069
22110
  rts_version: "0.2.1-alpha.0"
22070
22111
  }
22071
22112
  });
@@ -22394,7 +22435,9 @@ VeI18n.extend([
22394
22435
  }
22395
22436
  ]);
22396
22437
  const LIVE_DEFAULT_OPTIONS = {
22397
- autoplay: { muted: true }
22438
+ autoplay: {
22439
+ muted: true
22440
+ }
22398
22441
  };
22399
22442
  const LIVE_DEFAULT_PLUGINS = [...DEFAULT_PLUGINS, Refresh, Logger, InfoPanel];
22400
22443
  var RTMCodec = /* @__PURE__ */ ((RTMCodec2) => {
@@ -22414,7 +22457,10 @@ class VePlayerLive extends VePlayerBase {
22414
22457
  super(options);
22415
22458
  }
22416
22459
  /** {zh}
22417
- * @brief 获取已经播放的时间
22460
+ * @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
22461
+ */
22462
+ /** {en}
22463
+ * @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
22418
22464
  */
22419
22465
  get playTime() {
22420
22466
  var _a, _b, _c, _d;
@@ -22473,7 +22519,10 @@ class VePlayerLive extends VePlayerBase {
22473
22519
  (_a = this._player.plugins) == null ? void 0 : _a.infopanel.close();
22474
22520
  }
22475
22521
  /** {zh}
22476
- * @brief 打开 Abr
22522
+ * @brief 打开码率自适应(ABR)切换功能。
22523
+ */
22524
+ /** {en}
22525
+ * @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
22477
22526
  */
22478
22527
  openAbr() {
22479
22528
  var _a, _b, _c, _d;
@@ -22487,7 +22536,10 @@ class VePlayerLive extends VePlayerBase {
22487
22536
  }
22488
22537
  }
22489
22538
  /** {zh}
22490
- * @brief 关闭 Abr
22539
+ * @brief 关闭码率自适应(ABR)切换功能。
22540
+ */
22541
+ /** {en}
22542
+ * @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
22491
22543
  */
22492
22544
  closeAbr() {
22493
22545
  var _a, _b, _c, _d;
@@ -22501,18 +22553,25 @@ class VePlayerLive extends VePlayerBase {
22501
22553
  }
22502
22554
  }
22503
22555
  /** {zh}
22504
- * @brief 调用此方法更新 DRM 鉴权配置。
22505
- * @hidden
22556
+ * @brief 调用此方法更新 DRM 配置。
22557
+ */
22558
+ /** {en}
22559
+ * @brief Use this method to update DRM configuration.
22560
+ * @param config
22506
22561
  */
22507
22562
  updateDrmConfig(config) {
22508
22563
  var _a, _b, _c;
22509
22564
  (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.drm) == null ? void 0 : _c.updateDrmConfig(config);
22510
22565
  }
22511
22566
  /** {zh}
22512
- * @brief 切换 flv Abr
22513
- * @param options 切换 Abr 的配置。
22567
+ * @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
22568
+ * @param options ABR 的配置。
22514
22569
  * @returns
22515
22570
  */
22571
+ /** {en}
22572
+ * @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
22573
+ * @param options Configuration of ABR.
22574
+ */
22516
22575
  switchAbr(options) {
22517
22576
  var _a, _b;
22518
22577
  if (!((_a = this._player.plugins) == null ? void 0 : _a.abr)) {
@@ -22523,7 +22582,9 @@ class VePlayerLive extends VePlayerBase {
22523
22582
  if (!url) {
22524
22583
  return;
22525
22584
  }
22526
- this.switch(url, { seamless: true });
22585
+ this.switch(url, {
22586
+ seamless: true
22587
+ });
22527
22588
  this._player.plugins.abr.bitrate = options.bitrate;
22528
22589
  }
22529
22590
  if (typeof (options == null ? void 0 : options.enable) !== "undefined") {
@@ -22531,25 +22592,34 @@ class VePlayerLive extends VePlayerBase {
22531
22592
  }
22532
22593
  }
22533
22594
  /** {zh}
22534
- * @brief 获取 RTM 的网络相关信息
22595
+ * @brief 获取 RTM 拉流的网络评估信息。
22535
22596
  * @returns
22536
22597
  */
22598
+ /** {en}
22599
+ * @brief Obtain the network assessment information of RTM pull streaming.
22600
+ */
22537
22601
  getRTMNetWorkInfo() {
22538
22602
  var _a, _b, _c;
22539
22603
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.rts) == null ? void 0 : _c.getNetWorkInfo();
22540
22604
  }
22541
22605
  /** {zh}
22542
- * @brief 获取 RTM 播放信息
22606
+ * @brief 获取 RTM 拉流的播放信息。
22543
22607
  * @returns
22544
22608
  */
22609
+ /** {en}
22610
+ * @brief Obtain the playback information of RTM pull stream.
22611
+ */
22545
22612
  async getRTMStats() {
22546
22613
  var _a, _b, _c;
22547
22614
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.rts) == null ? void 0 : _c.getStatsSnapshoot();
22548
22615
  }
22549
22616
  /** {zh}
22550
- * @brief 获取 FLV 播放信息
22617
+ * @brief 获取 FLV 拉流的播放信息。
22551
22618
  * @returns
22552
22619
  */
22620
+ /** {en}
22621
+ * @brief Obtain the playback information of FLV pull streaming.
22622
+ */
22553
22623
  getFLVStats() {
22554
22624
  var _a, _b, _c;
22555
22625
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.flv) == null ? void 0 : _c.getStats();
@@ -22561,7 +22631,10 @@ async function createLivePlayer(options) {
22561
22631
  if (!options || !options.url && !options.playlist) {
22562
22632
  throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
22563
22633
  }
22564
- const i18n = new VeI18n({ lang: options == null ? void 0 : options.lang, i18n: options == null ? void 0 : options.i18n });
22634
+ const i18n = new VeI18n({
22635
+ lang: options == null ? void 0 : options.lang,
22636
+ i18n: options == null ? void 0 : options.i18n
22637
+ });
22565
22638
  const finalOptions = {
22566
22639
  ...options,
22567
22640
  plugins: [...LIVE_DEFAULT_PLUGINS, ...options.plugins ?? []]
@@ -22579,9 +22652,24 @@ async function createLivePlayer(options) {
22579
22652
  },
22580
22653
  async preparePlugins(url) {
22581
22654
  const [typeStrategy, drmStrategy, abrStrategy] = await Promise.all([
22582
- getTypeStrategy({ ...finalOptions, url }, player),
22583
- getDrmStrategy({ ...finalOptions, url }, player),
22584
- getAbrStrategy({ ...finalOptions, url })
22655
+ getTypeStrategy(
22656
+ {
22657
+ ...finalOptions,
22658
+ url
22659
+ },
22660
+ player
22661
+ ),
22662
+ getDrmStrategy(
22663
+ {
22664
+ ...finalOptions,
22665
+ url
22666
+ },
22667
+ player
22668
+ ),
22669
+ getAbrStrategy({
22670
+ ...finalOptions,
22671
+ url
22672
+ })
22585
22673
  ]);
22586
22674
  const { options: options2, plugins } = typeStrategy ?? {};
22587
22675
  const { options: drmOptions, plugins: drmPlugins } = drmStrategy ?? {};