@volcengine/veplayer 2.9.3-rc.0 → 2.9.3-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.
package/umd/veplayer.d.ts CHANGED
@@ -21,9 +21,6 @@ import FullScreen from "xgplayer/es/plugins/fullscreen";
21
21
  import Volume from "xgplayer/es/plugins/volume";
22
22
  import MiniScreen from "xgplayer/es/plugins/miniScreen";
23
23
  import PIPIcon from "xgplayer/es/plugins/pip";
24
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
- // @ts-ignore
26
- import { IInitParam } from "byted-tea-sdk/es/index-base.min.js";
27
24
  import VeStrategy from "@byted/volcengine-vestrategy";
28
25
  import { StrategyRecommendation, BaseStrategy, VeStrategyConfig } from "@byted/volcengine-vestrategy";
29
26
  import { HLS } from "@byted/xgplayer-hls.js";
@@ -5631,7 +5628,7 @@ type Stats = {
5631
5628
  * @list option
5632
5629
  * @kind property
5633
5630
  */
5634
- interface LoggerConfig extends Partial<IInitParam> {
5631
+ interface LoggerConfig {
5635
5632
  /** {zh}
5636
5633
  * @brief 是否开启日志上报。
5637
5634
  * @default true
@@ -5964,7 +5961,6 @@ interface PrepareOptions {
5964
5961
  */
5965
5962
  rtmAdaptiveBuffer?: boolean;
5966
5963
  };
5967
- logger?: LoggerConfig;
5968
5964
  }
5969
5965
  /** {zh}
5970
5966
  * @list option
@@ -10495,7 +10491,7 @@ declare namespace live {
10495
10491
  * @list option
10496
10492
  * @kind property
10497
10493
  */
10498
- interface LoggerConfig extends Partial<IInitParam> {
10494
+ interface LoggerConfig {
10499
10495
  /** {zh}
10500
10496
  * @brief 是否开启日志上报。
10501
10497
  * @default true
@@ -10871,7 +10867,6 @@ declare namespace live {
10871
10867
  */
10872
10868
  rtmAdaptiveBuffer?: boolean;
10873
10869
  };
10874
- logger?: LoggerConfig;
10875
10870
  }
10876
10871
  /** {zh}
10877
10872
  * @list option
@@ -14564,7 +14564,7 @@ var __publicField = (obj, key, value) => {
14564
14564
  * @brief Retrieve the player SDK version number.
14565
14565
  */
14566
14566
  get playerVersion() {
14567
- return "2.9.3-rc.0";
14567
+ return "2.9.3-rc.2";
14568
14568
  }
14569
14569
  /** {zh}
14570
14570
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -45427,6 +45427,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
45427
45427
  // rts state change
45428
45428
  rtcstatechange: {
45429
45429
  event_key: "rtcstatechange"
45430
+ },
45431
+ // rtc 2s 间隔卡顿数据
45432
+ rtc_network: {
45433
+ event_key: "rtc_network"
45430
45434
  }
45431
45435
  };
45432
45436
  }
@@ -45438,7 +45442,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
45438
45442
  live_sdk_version: getPlayerCore(player) || player.hlsOps ? "2" : "-1",
45439
45443
  player_sdk_version: player.version,
45440
45444
  // eslint-disable-next-line no-undef
45441
- logger_version: "1.1.0-alpha.21",
45445
+ logger_version: "1.1.0-alpha.24",
45442
45446
  // 由rollup 在编译时注入
45443
45447
  product_line: options.product_line,
45444
45448
  user_id: options.user_id,
@@ -45928,6 +45932,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
45928
45932
  state
45929
45933
  }, this.log.rtcstatechange));
45930
45934
  break;
45935
+ case "core.rtcnetwork":
45936
+ this.logmanager.push(Object.assign(info, this.log.rtc_network));
45937
+ break;
45931
45938
  }
45932
45939
  };
45933
45940
  _proto2.handleDegrade = function handleDegrade(payload) {
@@ -46817,7 +46824,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
46817
46824
  };
46818
46825
  }
46819
46826
  afterCreate() {
46820
- if (!this.player.config.teaTracker.tea) {
46827
+ if (!this.player.config.teaTracker) {
46821
46828
  return;
46822
46829
  }
46823
46830
  this.open();
@@ -46857,10 +46864,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
46857
46864
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
46858
46865
  error_report_stop: true,
46859
46866
  ext: {
46860
- veplayer_version: "2.9.3-rc.0",
46867
+ veplayer_version: "2.9.3-rc.2",
46861
46868
  flv_version: "3.0.23-rc.6",
46862
46869
  hls_version: "3.0.21-rc.21",
46863
- rts_version: "0.2.1-alpha.45"
46870
+ rts_version: "0.2.1-alpha.47"
46864
46871
  }
46865
46872
  });
46866
46873
  }
@@ -52010,18 +52017,16 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
52010
52017
  return "cn";
52011
52018
  }
52012
52019
  init(logger2) {
52013
- const { userId, deviceId, enable: enable2, ...teaOptions } = logger2 ?? {};
52014
- this._userId = userId || getUserId();
52015
- this._deviceId = deviceId || getDeviceID();
52016
- if (enable2 === false) {
52020
+ this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId();
52021
+ this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID();
52022
+ if ((logger2 == null ? void 0 : logger2.enable) === false) {
52017
52023
  return;
52018
52024
  }
52019
- this.tea = this._createTea(teaOptions);
52025
+ this.tea = this._createTea();
52020
52026
  }
52021
- _createTea(teaOptions) {
52027
+ _createTea() {
52022
52028
  const Tea = new Wi$1("player_track");
52023
52029
  Tea.init({
52024
- ...teaOptions,
52025
52030
  app_id: 468759,
52026
52031
  channel: "cn"
52027
52032
  });
@@ -66835,7 +66840,6 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
66835
66840
  return;
66836
66841
  }
66837
66842
  teaTracker.init({
66838
- ...options.logger,
66839
66843
  userId: options.userId,
66840
66844
  deviceId: options.deviceId
66841
66845
  });
@@ -21,9 +21,6 @@ import FullScreen from "xgplayer/es/plugins/fullscreen";
21
21
  import Volume from "xgplayer/es/plugins/volume";
22
22
  import MiniScreen from "xgplayer/es/plugins/miniScreen";
23
23
  import PIPIcon from "xgplayer/es/plugins/pip";
24
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
- // @ts-ignore
26
- import { IInitParam } from "byted-tea-sdk/es/index-base.min.js";
27
24
  import VeStrategy from "@byted/volcengine-vestrategy";
28
25
  import { StrategyRecommendation, BaseStrategy, VeStrategyConfig } from "@byted/volcengine-vestrategy";
29
26
  import { HLS } from "@byted/xgplayer-hls.js";
@@ -5631,7 +5628,7 @@ type Stats = {
5631
5628
  * @list option
5632
5629
  * @kind property
5633
5630
  */
5634
- interface LoggerConfig extends Partial<IInitParam> {
5631
+ interface LoggerConfig {
5635
5632
  /** {zh}
5636
5633
  * @brief 是否开启日志上报。
5637
5634
  * @default true
@@ -5964,7 +5961,6 @@ interface PrepareOptions {
5964
5961
  */
5965
5962
  rtmAdaptiveBuffer?: boolean;
5966
5963
  };
5967
- logger?: LoggerConfig;
5968
5964
  }
5969
5965
  /** {zh}
5970
5966
  * @list option
@@ -10495,7 +10491,7 @@ declare namespace live {
10495
10491
  * @list option
10496
10492
  * @kind property
10497
10493
  */
10498
- interface LoggerConfig extends Partial<IInitParam> {
10494
+ interface LoggerConfig {
10499
10495
  /** {zh}
10500
10496
  * @brief 是否开启日志上报。
10501
10497
  * @default true
@@ -10871,7 +10867,6 @@ declare namespace live {
10871
10867
  */
10872
10868
  rtmAdaptiveBuffer?: boolean;
10873
10869
  };
10874
- logger?: LoggerConfig;
10875
10870
  }
10876
10871
  /** {zh}
10877
10872
  * @list option
@@ -14564,7 +14564,7 @@ var __publicField = (obj, key, value) => {
14564
14564
  * @brief Retrieve the player SDK version number.
14565
14565
  */
14566
14566
  get playerVersion() {
14567
- return "2.9.3-rc.0";
14567
+ return "2.9.3-rc.2";
14568
14568
  }
14569
14569
  /** {zh}
14570
14570
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -45427,6 +45427,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
45427
45427
  // rts state change
45428
45428
  rtcstatechange: {
45429
45429
  event_key: "rtcstatechange"
45430
+ },
45431
+ // rtc 2s 间隔卡顿数据
45432
+ rtc_network: {
45433
+ event_key: "rtc_network"
45430
45434
  }
45431
45435
  };
45432
45436
  }
@@ -45438,7 +45442,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
45438
45442
  live_sdk_version: getPlayerCore(player) || player.hlsOps ? "2" : "-1",
45439
45443
  player_sdk_version: player.version,
45440
45444
  // eslint-disable-next-line no-undef
45441
- logger_version: "1.1.0-alpha.21",
45445
+ logger_version: "1.1.0-alpha.24",
45442
45446
  // 由rollup 在编译时注入
45443
45447
  product_line: options.product_line,
45444
45448
  user_id: options.user_id,
@@ -45928,6 +45932,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
45928
45932
  state
45929
45933
  }, this.log.rtcstatechange));
45930
45934
  break;
45935
+ case "core.rtcnetwork":
45936
+ this.logmanager.push(Object.assign(info, this.log.rtc_network));
45937
+ break;
45931
45938
  }
45932
45939
  };
45933
45940
  _proto2.handleDegrade = function handleDegrade(payload) {
@@ -46817,7 +46824,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
46817
46824
  };
46818
46825
  }
46819
46826
  afterCreate() {
46820
- if (!this.player.config.teaTracker.tea) {
46827
+ if (!this.player.config.teaTracker) {
46821
46828
  return;
46822
46829
  }
46823
46830
  this.open();
@@ -46857,10 +46864,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
46857
46864
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
46858
46865
  error_report_stop: true,
46859
46866
  ext: {
46860
- veplayer_version: "2.9.3-rc.0",
46867
+ veplayer_version: "2.9.3-rc.2",
46861
46868
  flv_version: "3.0.23-rc.6",
46862
46869
  hls_version: "3.0.21-rc.21",
46863
- rts_version: "0.2.1-alpha.45"
46870
+ rts_version: "0.2.1-alpha.47"
46864
46871
  }
46865
46872
  });
46866
46873
  }
@@ -52010,18 +52017,16 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
52010
52017
  return "cn";
52011
52018
  }
52012
52019
  init(logger2) {
52013
- const { userId, deviceId, enable: enable2, ...teaOptions } = logger2 ?? {};
52014
- this._userId = userId || getUserId();
52015
- this._deviceId = deviceId || getDeviceID();
52016
- if (enable2 === false) {
52020
+ this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId();
52021
+ this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID();
52022
+ if ((logger2 == null ? void 0 : logger2.enable) === false) {
52017
52023
  return;
52018
52024
  }
52019
- this.tea = this._createTea(teaOptions);
52025
+ this.tea = this._createTea();
52020
52026
  }
52021
- _createTea(teaOptions) {
52027
+ _createTea() {
52022
52028
  const Tea = new Wi$1("player_track");
52023
52029
  Tea.init({
52024
- ...teaOptions,
52025
52030
  app_id: 468759,
52026
52031
  channel: "cn"
52027
52032
  });
@@ -66835,7 +66840,6 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
66835
66840
  return;
66836
66841
  }
66837
66842
  teaTracker.init({
66838
- ...options.logger,
66839
66843
  userId: options.userId,
66840
66844
  deviceId: options.deviceId
66841
66845
  });