@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.
@@ -1461,7 +1461,7 @@ var __publicField = (obj, key, value) => {
1461
1461
  }
1462
1462
  }
1463
1463
  };
1464
- var version = "3.0.20-alpha.4";
1464
+ var version = "3.0.21-rc.3";
1465
1465
  var ERROR_TYPE_MAP = {
1466
1466
  1: "media",
1467
1467
  2: "media",
@@ -2812,6 +2812,18 @@ var __publicField = (obj, key, value) => {
2812
2812
  }
2813
2813
  }
2814
2814
  }
2815
+ }, {
2816
+ key: "defineMethod",
2817
+ value: function defineMethod(Obj, map) {
2818
+ for (var key in map) {
2819
+ if (Object.prototype.hasOwnProperty.call(map, key) && typeof map[key] === "function") {
2820
+ Object.defineProperty(Obj, key, {
2821
+ configurable: true,
2822
+ value: map[key]
2823
+ });
2824
+ }
2825
+ }
2826
+ }
2815
2827
  }, {
2816
2828
  key: "defaultConfig",
2817
2829
  get: function get() {
@@ -3457,7 +3469,7 @@ var __publicField = (obj, key, value) => {
3457
3469
  if (!this.observer) {
3458
3470
  return;
3459
3471
  }
3460
- this.observer && this.observer.observe(target);
3472
+ this.observer.observe(target);
3461
3473
  var _pid = target.getAttribute(PLATER_ID);
3462
3474
  var __handlers = this.__handlers;
3463
3475
  var index = -1;
@@ -3486,16 +3498,17 @@ var __publicField = (obj, key, value) => {
3486
3498
  }
3487
3499
  });
3488
3500
  try {
3489
- this.observer && this.observer.unobserve(target);
3501
+ var _this$observer;
3502
+ (_this$observer = this.observer) === null || _this$observer === void 0 ? void 0 : _this$observer.unobserve(target);
3490
3503
  } catch (e2) {
3491
3504
  }
3492
- this.observer && this.observer.unobserve(target);
3493
3505
  i2 > -1 && this.__handlers.splice(i2, 1);
3494
3506
  }
3495
3507
  }, {
3496
3508
  key: "destroyObserver",
3497
3509
  value: function destroyObserver() {
3498
- this.observer && this.observer.disconnect();
3510
+ var _this$observer2;
3511
+ (_this$observer2 = this.observer) === null || _this$observer2 === void 0 ? void 0 : _this$observer2.disconnect();
3499
3512
  this.observer = null;
3500
3513
  this.__handlers = null;
3501
3514
  }
@@ -3527,7 +3540,8 @@ var __publicField = (obj, key, value) => {
3527
3540
  return resizeObserver;
3528
3541
  }
3529
3542
  function unObserver(target, handler) {
3530
- resizeObserver.unObserver(target, handler);
3543
+ var _resizeObserver;
3544
+ (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 ? void 0 : _resizeObserver.unObserver(target, handler);
3531
3545
  }
3532
3546
  var pluginsManager = {
3533
3547
  pluginGroup: {},
@@ -5119,7 +5133,7 @@ var __publicField = (obj, key, value) => {
5119
5133
  if (!url) {
5120
5134
  url = _this8.url || _this8.config.url;
5121
5135
  }
5122
- var _furl = _this8._preProcessUrl(url);
5136
+ var _furl = _this8.preProcessUrl(url);
5123
5137
  var ret = _this8._startInit(_furl.url);
5124
5138
  return ret;
5125
5139
  }).catch(function(e2) {
@@ -5137,7 +5151,7 @@ var __publicField = (obj, key, value) => {
5137
5151
  if (util$1.typeOf(url) === "Object") {
5138
5152
  _src = url.url;
5139
5153
  }
5140
- _src = this._preProcessUrl(_src).url;
5154
+ _src = this.preProcessUrl(_src).url;
5141
5155
  var curTime = this.currentTime;
5142
5156
  this.__startTime = curTime;
5143
5157
  var isPaused = this.paused && !this.isError;
@@ -5478,7 +5492,7 @@ var __publicField = (obj, key, value) => {
5478
5492
  runHooks(this, "retry", function() {
5479
5493
  var cur = _this20.currentTime;
5480
5494
  var url = _this20.config.url;
5481
- var _srcRet = !util$1.isMSE(_this20.media) ? _this20._preProcessUrl(url) : {
5495
+ var _srcRet = !util$1.isMSE(_this20.media) ? _this20.preProcessUrl(url) : {
5482
5496
  url
5483
5497
  };
5484
5498
  _this20.src = _srcRet.url;
@@ -6134,11 +6148,11 @@ var __publicField = (obj, key, value) => {
6134
6148
  this._state = newState;
6135
6149
  }
6136
6150
  }, {
6137
- key: "_preProcessUrl",
6138
- value: function _preProcessUrl(url, ext) {
6139
- var _this$config7 = this.config, preProcessUrl = _this$config7.preProcessUrl, preProcessUrlOptions = _this$config7.preProcessUrlOptions;
6151
+ key: "preProcessUrl",
6152
+ value: function preProcessUrl(url, ext) {
6153
+ var _this$config7 = this.config, preProcessUrl2 = _this$config7.preProcessUrl, preProcessUrlOptions = _this$config7.preProcessUrlOptions;
6140
6154
  var processUrlOptions = Object.assign({}, preProcessUrlOptions, ext);
6141
- return !util$1.isBlob(url) && typeof preProcessUrl === "function" ? preProcessUrl(url, processUrlOptions) : {
6155
+ return !util$1.isBlob(url) && typeof preProcessUrl2 === "function" ? preProcessUrl2(url, processUrlOptions) : {
6142
6156
  url
6143
6157
  };
6144
6158
  }
@@ -6720,11 +6734,11 @@ var __publicField = (obj, key, value) => {
6720
6734
  } : error2;
6721
6735
  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"));
6722
6736
  super(message);
6723
- /**
6737
+ /** {zh}
6724
6738
  * @brief 错误码。
6725
6739
  */
6726
6740
  /** {en}
6727
- * @brief The error code.
6741
+ * @brief Error code.
6728
6742
  */
6729
6743
  __publicField(this, "errorCode");
6730
6744
  /** {zh}
@@ -8510,7 +8524,7 @@ var __publicField = (obj, key, value) => {
8510
8524
  }
8511
8525
  this.on(DURATION_CHANGE, function() {
8512
8526
  var player2 = _this2.player, config2 = _this2.config;
8513
- if (player2.duration * 1e3 < config2.moveDuration) {
8527
+ if (player2.duration > 0 && player2.duration * 1e3 < config2.moveDuration) {
8514
8528
  config2.moveDuration = player2.duration * 1e3;
8515
8529
  }
8516
8530
  });
@@ -8824,10 +8838,13 @@ var __publicField = (obj, key, value) => {
8824
8838
  }, {
8825
8839
  key: "updateBrightness",
8826
8840
  value: function updateBrightness(percent) {
8841
+ var pos = this.pos, config = this.config, xgMask = this.xgMask;
8842
+ if (!config.darkness) {
8843
+ return;
8844
+ }
8827
8845
  if (this.player.rotateDeg) {
8828
8846
  percent = -percent;
8829
8847
  }
8830
- var pos = this.pos, config = this.config, xgMask = this.xgMask;
8831
8848
  var light = pos.light + 0.8 * percent;
8832
8849
  light = light > config.maxDarkness ? config.maxDarkness : light < 0 ? 0 : light;
8833
8850
  if (xgMask) {
@@ -8888,12 +8905,12 @@ var __publicField = (obj, key, value) => {
8888
8905
  }, {
8889
8906
  key: "disableGesture",
8890
8907
  value: function disableGesture() {
8891
- this.config.disableGesture = false;
8908
+ this.config.disableGesture = true;
8892
8909
  }
8893
8910
  }, {
8894
8911
  key: "enableGesture",
8895
8912
  value: function enableGesture() {
8896
- this.config.disableGesture = true;
8913
+ this.config.disableGesture = false;
8897
8914
  }
8898
8915
  }, {
8899
8916
  key: "destroy",
@@ -9762,7 +9779,7 @@ var __publicField = (obj, key, value) => {
9762
9779
  }, {
9763
9780
  key: "toggleFullScreen",
9764
9781
  value: function toggleFullScreen(e2) {
9765
- if (e2) {
9782
+ if (e2 instanceof Event) {
9766
9783
  e2.preventDefault();
9767
9784
  e2.stopPropagation();
9768
9785
  }
@@ -10445,7 +10462,7 @@ var __publicField = (obj, key, value) => {
10445
10462
  key: "isPIPAvailable",
10446
10463
  value: function isPIPAvailable() {
10447
10464
  var video = this.player.media;
10448
- var _isEnabled = util$1.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : true;
10465
+ var _isEnabled = util$1.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : false;
10449
10466
  return _isEnabled && (util$1.typeOf(video.disablePictureInPicture) === "Boolean" && !video.disablePictureInPicture || video.webkitSupportsPresentationMode && util$1.typeOf(video.webkitSetPresentationMode) === "Function") || this.isDocPIPAvailable();
10450
10467
  }
10451
10468
  }, {
@@ -13577,28 +13594,33 @@ var __publicField = (obj, key, value) => {
13577
13594
  useCssFullscreen: false
13578
13595
  }
13579
13596
  };
13580
- const transformOption = (options) => {
13581
- const { autoplay: autoplay2, ...rest } = options;
13582
- const xgOptions = rest;
13583
- if (xgOptions.poster) {
13584
- xgOptions.poster = escapeHtml(xgOptions.poster);
13585
- }
13586
- xgOptions.icons = {
13587
- ...DEFAULT_ICONS,
13588
- ...xgOptions.icons ? escapeIcons(xgOptions.icons) : {}
13589
- };
13590
- xgOptions.autoplay = Boolean(autoplay2);
13591
- if (autoplay2 && typeof autoplay2 !== "boolean") {
13592
- xgOptions.autoplayMuted = autoplay2 == null ? void 0 : autoplay2.muted;
13593
- xgOptions.videoAttributes = {
13594
- ...xgOptions.videoAttributes ?? {},
13595
- muted: autoplay2 == null ? void 0 : autoplay2.muted
13597
+ const transformOption = (
13598
+ /** {zh}
13599
+ * @param options 更多配置信息。
13600
+ */
13601
+ (options) => {
13602
+ const { autoplay: autoplay2, ...rest } = options;
13603
+ const xgOptions = rest;
13604
+ if (xgOptions.poster) {
13605
+ xgOptions.poster = escapeHtml(xgOptions.poster);
13606
+ }
13607
+ xgOptions.icons = {
13608
+ ...DEFAULT_ICONS,
13609
+ ...xgOptions.icons ? escapeIcons(xgOptions.icons) : {}
13596
13610
  };
13597
- xgOptions.autoplayPlugin = autoplay2;
13611
+ xgOptions.autoplay = Boolean(autoplay2);
13612
+ if (autoplay2 && typeof autoplay2 !== "boolean") {
13613
+ xgOptions.autoplayMuted = autoplay2 == null ? void 0 : autoplay2.muted;
13614
+ xgOptions.videoAttributes = {
13615
+ ...xgOptions.videoAttributes ?? {},
13616
+ muted: autoplay2 == null ? void 0 : autoplay2.muted
13617
+ };
13618
+ xgOptions.autoplayPlugin = autoplay2;
13619
+ }
13620
+ delete xgOptions.i18n;
13621
+ return xgOptions;
13598
13622
  }
13599
- delete xgOptions.i18n;
13600
- return xgOptions;
13601
- };
13623
+ );
13602
13624
  class VePlayerBase {
13603
13625
  /** {zh}
13604
13626
  * @hidden
@@ -13618,7 +13640,9 @@ var __publicField = (obj, key, value) => {
13618
13640
  this._sourceManager = options.sourceManager;
13619
13641
  this._preparePlugins = options.preparePlugins;
13620
13642
  this._previousPrepareResult = options.prepareResult;
13621
- this._i18nManager = options.i18nManager ?? new VeI18n({ i18n: options.i18n });
13643
+ this._i18nManager = options.i18nManager ?? new VeI18n({
13644
+ i18n: options.i18n
13645
+ });
13622
13646
  const xgOptions = transformOption({
13623
13647
  ...options,
13624
13648
  ...(_a = this._previousPrepareResult) == null ? void 0 : _a.options
@@ -13813,9 +13837,14 @@ var __publicField = (obj, key, value) => {
13813
13837
  /** {zh}
13814
13838
  * 获取播放器版本号
13815
13839
  * @returns
13840
+ * @brief
13841
+ * 获取播放器 SDK 版本号。
13842
+ */
13843
+ /** {en}
13844
+ * @brief Retrieve the player SDK version number.
13816
13845
  */
13817
13846
  get playerVersion() {
13818
- return "2.5.0-rc.1";
13847
+ return "2.6.0-rc.0";
13819
13848
  }
13820
13849
  /** {zh}
13821
13850
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -13963,8 +13992,8 @@ var __publicField = (obj, key, value) => {
13963
13992
  }
13964
13993
  /** {zh}
13965
13994
  * @brief 调用此方法切换拉流地址、线路、清晰度。
13966
- * @param target 目标地址,可以是播放地址,也可以是线路和清晰度
13967
- * @param options 更多配置信息
13995
+ * @param target 目标地址,可以是播放地址,也可以是线路和清晰度。
13996
+ * @param options 更多配置信息。
13968
13997
  */
13969
13998
  /** {en}
13970
13999
  * @brief Switches the pull stream address, playback source, or resolution.
@@ -13975,7 +14004,9 @@ var __publicField = (obj, key, value) => {
13975
14004
  var _a, _b;
13976
14005
  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) {
13977
14006
  this._sourceManager.updateSources(target);
13978
- await this._switchUrl(target, { seamless: options == null ? void 0 : options.seamless });
14007
+ await this._switchUrl(target, {
14008
+ seamless: options == null ? void 0 : options.seamless
14009
+ });
13979
14010
  return this._sourceManager.definition;
13980
14011
  }
13981
14012
  const targetDefinition = this._sourceManager.find(target, options);
@@ -14002,16 +14033,15 @@ var __publicField = (obj, key, value) => {
14002
14033
  return this._switch(sourceManager.definition);
14003
14034
  }
14004
14035
  // TODO: 等西瓜播放器完善错误码后增加函数重载以提供更好的类型
14005
- /**
14006
14036
  /** {zh}
14007
14037
  * @brief 调用此方法监听指定事件,事件处理函数只执行一次。
14008
14038
  * @param event 表示事件的名称。
14009
14039
  * @param callback 表示事件的回调函数。
14010
14040
  */
14011
14041
  /** {en}
14012
- * @brief Add a one-time listener function for the specified event.
14013
- * @param event The event name.
14014
- * @param callback The callback function for the event.
14042
+ * @brief Call this method to listen for the specified event. The event handler is executed only once.
14043
+ * @param event The name representing the event.
14044
+ * @param callback Callback functions representing events.
14015
14045
  */
14016
14046
  once(event, callback) {
14017
14047
  var _a;
@@ -14162,10 +14192,14 @@ var __publicField = (obj, key, value) => {
14162
14192
  return this._player.blur(data);
14163
14193
  }
14164
14194
  /** {zh}
14165
- * @brief 判断浏览器是否支持播放格式
14166
- * @param type 播放格式
14195
+ * @brief 判断浏览器是否支持播放格式。
14196
+ * @param type 播放格式。
14167
14197
  * @returns
14168
14198
  */
14199
+ /** {en}
14200
+ * @brief Determine whether the browser supports the playback format.
14201
+ * @param type The playback format.
14202
+ */
14169
14203
  canPlayType(type) {
14170
14204
  return this._player.canPlayType(type);
14171
14205
  }
@@ -14237,7 +14271,7 @@ var __publicField = (obj, key, value) => {
14237
14271
  }
14238
14272
  /** {zh}
14239
14273
  * @brief 调用此接口显示指定插件图标。
14240
- * @param pluginNames 插件名称
14274
+ * @param pluginNames 插件名称。
14241
14275
  */
14242
14276
  /** {en}
14243
14277
  * @brief Displays the icon of a specified plugin.
@@ -14258,7 +14292,7 @@ var __publicField = (obj, key, value) => {
14258
14292
  }
14259
14293
  /** {zh}
14260
14294
  * @brief 调用此接口隐藏指定插件图标。
14261
- * @param pluginNames 插件名称
14295
+ * @param pluginNames 插件名称。
14262
14296
  */
14263
14297
  /** {en}
14264
14298
  * @brief Hides the icon of a specified plugin.
@@ -14330,7 +14364,14 @@ var __publicField = (obj, key, value) => {
14330
14364
  this._player.once("canplay", () => {
14331
14365
  this._sourceManager.resetFallback();
14332
14366
  });
14333
- this.emit(Events$1.FALLBACK, { from: { url: preUrl }, to: { url } });
14367
+ this.emit(Events$1.FALLBACK, {
14368
+ from: {
14369
+ url: preUrl
14370
+ },
14371
+ to: {
14372
+ url
14373
+ }
14374
+ });
14334
14375
  this._switchUrl(url);
14335
14376
  }
14336
14377
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -22067,9 +22108,9 @@ var __publicField = (obj, key, value) => {
22067
22108
  user_id: this._userId,
22068
22109
  device_id: this._deviceId,
22069
22110
  ext: {
22070
- veplayer_version: "2.5.0-rc.1",
22071
- flv_version: "3.0.19-rc.0",
22072
- hls_version: "3.0.20-alpha.2",
22111
+ veplayer_version: "2.6.0-rc.0",
22112
+ flv_version: "3.0.21-rc.3",
22113
+ hls_version: "3.0.21-rc.3",
22073
22114
  rts_version: "0.2.1-alpha.0"
22074
22115
  }
22075
22116
  });
@@ -22398,7 +22439,9 @@ var __publicField = (obj, key, value) => {
22398
22439
  }
22399
22440
  ]);
22400
22441
  const LIVE_DEFAULT_OPTIONS = {
22401
- autoplay: { muted: true }
22442
+ autoplay: {
22443
+ muted: true
22444
+ }
22402
22445
  };
22403
22446
  const LIVE_DEFAULT_PLUGINS = [...DEFAULT_PLUGINS, Refresh, Logger, InfoPanel];
22404
22447
  var RTMCodec = /* @__PURE__ */ ((RTMCodec2) => {
@@ -22418,7 +22461,10 @@ var __publicField = (obj, key, value) => {
22418
22461
  super(options);
22419
22462
  }
22420
22463
  /** {zh}
22421
- * @brief 获取已经播放的时间
22464
+ * @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
22465
+ */
22466
+ /** {en}
22467
+ * @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
22422
22468
  */
22423
22469
  get playTime() {
22424
22470
  var _a, _b, _c, _d;
@@ -22477,7 +22523,10 @@ var __publicField = (obj, key, value) => {
22477
22523
  (_a = this._player.plugins) == null ? void 0 : _a.infopanel.close();
22478
22524
  }
22479
22525
  /** {zh}
22480
- * @brief 打开 Abr
22526
+ * @brief 打开码率自适应(ABR)切换功能。
22527
+ */
22528
+ /** {en}
22529
+ * @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
22481
22530
  */
22482
22531
  openAbr() {
22483
22532
  var _a, _b, _c, _d;
@@ -22491,7 +22540,10 @@ var __publicField = (obj, key, value) => {
22491
22540
  }
22492
22541
  }
22493
22542
  /** {zh}
22494
- * @brief 关闭 Abr
22543
+ * @brief 关闭码率自适应(ABR)切换功能。
22544
+ */
22545
+ /** {en}
22546
+ * @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
22495
22547
  */
22496
22548
  closeAbr() {
22497
22549
  var _a, _b, _c, _d;
@@ -22505,18 +22557,25 @@ var __publicField = (obj, key, value) => {
22505
22557
  }
22506
22558
  }
22507
22559
  /** {zh}
22508
- * @brief 调用此方法更新 DRM 鉴权配置。
22509
- * @hidden
22560
+ * @brief 调用此方法更新 DRM 配置。
22561
+ */
22562
+ /** {en}
22563
+ * @brief Use this method to update DRM configuration.
22564
+ * @param config
22510
22565
  */
22511
22566
  updateDrmConfig(config) {
22512
22567
  var _a, _b, _c;
22513
22568
  (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.drm) == null ? void 0 : _c.updateDrmConfig(config);
22514
22569
  }
22515
22570
  /** {zh}
22516
- * @brief 切换 flv Abr
22517
- * @param options 切换 Abr 的配置。
22571
+ * @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
22572
+ * @param options ABR 的配置。
22518
22573
  * @returns
22519
22574
  */
22575
+ /** {en}
22576
+ * @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
22577
+ * @param options Configuration of ABR.
22578
+ */
22520
22579
  switchAbr(options) {
22521
22580
  var _a, _b;
22522
22581
  if (!((_a = this._player.plugins) == null ? void 0 : _a.abr)) {
@@ -22527,7 +22586,9 @@ var __publicField = (obj, key, value) => {
22527
22586
  if (!url) {
22528
22587
  return;
22529
22588
  }
22530
- this.switch(url, { seamless: true });
22589
+ this.switch(url, {
22590
+ seamless: true
22591
+ });
22531
22592
  this._player.plugins.abr.bitrate = options.bitrate;
22532
22593
  }
22533
22594
  if (typeof (options == null ? void 0 : options.enable) !== "undefined") {
@@ -22535,25 +22596,34 @@ var __publicField = (obj, key, value) => {
22535
22596
  }
22536
22597
  }
22537
22598
  /** {zh}
22538
- * @brief 获取 RTM 的网络相关信息
22599
+ * @brief 获取 RTM 拉流的网络评估信息。
22539
22600
  * @returns
22540
22601
  */
22602
+ /** {en}
22603
+ * @brief Obtain the network assessment information of RTM pull streaming.
22604
+ */
22541
22605
  getRTMNetWorkInfo() {
22542
22606
  var _a, _b, _c;
22543
22607
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.rts) == null ? void 0 : _c.getNetWorkInfo();
22544
22608
  }
22545
22609
  /** {zh}
22546
- * @brief 获取 RTM 播放信息
22610
+ * @brief 获取 RTM 拉流的播放信息。
22547
22611
  * @returns
22548
22612
  */
22613
+ /** {en}
22614
+ * @brief Obtain the playback information of RTM pull stream.
22615
+ */
22549
22616
  async getRTMStats() {
22550
22617
  var _a, _b, _c;
22551
22618
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.rts) == null ? void 0 : _c.getStatsSnapshoot();
22552
22619
  }
22553
22620
  /** {zh}
22554
- * @brief 获取 FLV 播放信息
22621
+ * @brief 获取 FLV 拉流的播放信息。
22555
22622
  * @returns
22556
22623
  */
22624
+ /** {en}
22625
+ * @brief Obtain the playback information of FLV pull streaming.
22626
+ */
22557
22627
  getFLVStats() {
22558
22628
  var _a, _b, _c;
22559
22629
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.flv) == null ? void 0 : _c.getStats();
@@ -22565,7 +22635,10 @@ var __publicField = (obj, key, value) => {
22565
22635
  if (!options || !options.url && !options.playlist) {
22566
22636
  throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
22567
22637
  }
22568
- const i18n = new VeI18n({ lang: options == null ? void 0 : options.lang, i18n: options == null ? void 0 : options.i18n });
22638
+ const i18n = new VeI18n({
22639
+ lang: options == null ? void 0 : options.lang,
22640
+ i18n: options == null ? void 0 : options.i18n
22641
+ });
22569
22642
  const finalOptions = {
22570
22643
  ...options,
22571
22644
  plugins: [...LIVE_DEFAULT_PLUGINS, ...options.plugins ?? []]
@@ -22583,9 +22656,24 @@ var __publicField = (obj, key, value) => {
22583
22656
  },
22584
22657
  async preparePlugins(url) {
22585
22658
  const [typeStrategy, drmStrategy, abrStrategy] = await Promise.all([
22586
- getTypeStrategy({ ...finalOptions, url }, player),
22587
- getDrmStrategy({ ...finalOptions, url }, player),
22588
- getAbrStrategy({ ...finalOptions, url })
22659
+ getTypeStrategy(
22660
+ {
22661
+ ...finalOptions,
22662
+ url
22663
+ },
22664
+ player
22665
+ ),
22666
+ getDrmStrategy(
22667
+ {
22668
+ ...finalOptions,
22669
+ url
22670
+ },
22671
+ player
22672
+ ),
22673
+ getAbrStrategy({
22674
+ ...finalOptions,
22675
+ url
22676
+ })
22589
22677
  ]);
22590
22678
  const { options: options2, plugins } = typeStrategy ?? {};
22591
22679
  const { options: drmOptions, plugins: drmPlugins } = drmStrategy ?? {};