@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/esm/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
@@ -14560,7 +14560,7 @@ class VePlayerBase {
14560
14560
  * @brief Retrieve the player SDK version number.
14561
14561
  */
14562
14562
  get playerVersion() {
14563
- return "2.9.3-rc.0";
14563
+ return "2.9.3-rc.2";
14564
14564
  }
14565
14565
  /** {zh}
14566
14566
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -45423,6 +45423,10 @@ function getDefaultLog() {
45423
45423
  // rts state change
45424
45424
  rtcstatechange: {
45425
45425
  event_key: "rtcstatechange"
45426
+ },
45427
+ // rtc 2s 间隔卡顿数据
45428
+ rtc_network: {
45429
+ event_key: "rtc_network"
45426
45430
  }
45427
45431
  };
45428
45432
  }
@@ -45434,7 +45438,7 @@ function getCommonLog(options) {
45434
45438
  live_sdk_version: getPlayerCore(player) || player.hlsOps ? "2" : "-1",
45435
45439
  player_sdk_version: player.version,
45436
45440
  // eslint-disable-next-line no-undef
45437
- logger_version: "1.1.0-alpha.21",
45441
+ logger_version: "1.1.0-alpha.24",
45438
45442
  // 由rollup 在编译时注入
45439
45443
  product_line: options.product_line,
45440
45444
  user_id: options.user_id,
@@ -45924,6 +45928,9 @@ var XgLiveLogger = /* @__PURE__ */ function() {
45924
45928
  state
45925
45929
  }, this.log.rtcstatechange));
45926
45930
  break;
45931
+ case "core.rtcnetwork":
45932
+ this.logmanager.push(Object.assign(info, this.log.rtc_network));
45933
+ break;
45927
45934
  }
45928
45935
  };
45929
45936
  _proto2.handleDegrade = function handleDegrade(payload) {
@@ -46813,7 +46820,7 @@ let Logger$1 = class Logger2 extends Plugin {
46813
46820
  };
46814
46821
  }
46815
46822
  afterCreate() {
46816
- if (!this.player.config.teaTracker.tea) {
46823
+ if (!this.player.config.teaTracker) {
46817
46824
  return;
46818
46825
  }
46819
46826
  this.open();
@@ -46853,10 +46860,10 @@ let Logger$1 = class Logger2 extends Plugin {
46853
46860
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
46854
46861
  error_report_stop: true,
46855
46862
  ext: {
46856
- veplayer_version: "2.9.3-rc.0",
46863
+ veplayer_version: "2.9.3-rc.2",
46857
46864
  flv_version: "3.0.23-rc.6",
46858
46865
  hls_version: "3.0.21-rc.21",
46859
- rts_version: "0.2.1-alpha.45"
46866
+ rts_version: "0.2.1-alpha.47"
46860
46867
  }
46861
46868
  });
46862
46869
  }
@@ -52006,18 +52013,16 @@ class TeaTracker {
52006
52013
  return "cn";
52007
52014
  }
52008
52015
  init(logger2) {
52009
- const { userId, deviceId, enable: enable2, ...teaOptions } = logger2 ?? {};
52010
- this._userId = userId || getUserId2();
52011
- this._deviceId = deviceId || getDeviceID2();
52012
- if (enable2 === false) {
52016
+ this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId2();
52017
+ this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID2();
52018
+ if ((logger2 == null ? void 0 : logger2.enable) === false) {
52013
52019
  return;
52014
52020
  }
52015
- this.tea = this._createTea(teaOptions);
52021
+ this.tea = this._createTea();
52016
52022
  }
52017
- _createTea(teaOptions) {
52023
+ _createTea() {
52018
52024
  const Tea = new Wi$1("player_track");
52019
52025
  Tea.init({
52020
- ...teaOptions,
52021
52026
  app_id: 468759,
52022
52027
  channel: "cn"
52023
52028
  });
@@ -66831,7 +66836,6 @@ async function prepare(options) {
66831
66836
  return;
66832
66837
  }
66833
66838
  teaTracker.init({
66834
- ...options.logger,
66835
66839
  userId: options.userId,
66836
66840
  deviceId: options.deviceId
66837
66841
  });
@@ -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
@@ -14560,7 +14560,7 @@ class VePlayerBase {
14560
14560
  * @brief Retrieve the player SDK version number.
14561
14561
  */
14562
14562
  get playerVersion() {
14563
- return "2.9.3-rc.0";
14563
+ return "2.9.3-rc.2";
14564
14564
  }
14565
14565
  /** {zh}
14566
14566
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -45423,6 +45423,10 @@ function getDefaultLog() {
45423
45423
  // rts state change
45424
45424
  rtcstatechange: {
45425
45425
  event_key: "rtcstatechange"
45426
+ },
45427
+ // rtc 2s 间隔卡顿数据
45428
+ rtc_network: {
45429
+ event_key: "rtc_network"
45426
45430
  }
45427
45431
  };
45428
45432
  }
@@ -45434,7 +45438,7 @@ function getCommonLog(options) {
45434
45438
  live_sdk_version: getPlayerCore(player) || player.hlsOps ? "2" : "-1",
45435
45439
  player_sdk_version: player.version,
45436
45440
  // eslint-disable-next-line no-undef
45437
- logger_version: "1.1.0-alpha.21",
45441
+ logger_version: "1.1.0-alpha.24",
45438
45442
  // 由rollup 在编译时注入
45439
45443
  product_line: options.product_line,
45440
45444
  user_id: options.user_id,
@@ -45924,6 +45928,9 @@ var XgLiveLogger = /* @__PURE__ */ function() {
45924
45928
  state
45925
45929
  }, this.log.rtcstatechange));
45926
45930
  break;
45931
+ case "core.rtcnetwork":
45932
+ this.logmanager.push(Object.assign(info, this.log.rtc_network));
45933
+ break;
45927
45934
  }
45928
45935
  };
45929
45936
  _proto2.handleDegrade = function handleDegrade(payload) {
@@ -46813,7 +46820,7 @@ let Logger$1 = class Logger2 extends Plugin {
46813
46820
  };
46814
46821
  }
46815
46822
  afterCreate() {
46816
- if (!this.player.config.teaTracker.tea) {
46823
+ if (!this.player.config.teaTracker) {
46817
46824
  return;
46818
46825
  }
46819
46826
  this.open();
@@ -46853,10 +46860,10 @@ let Logger$1 = class Logger2 extends Plugin {
46853
46860
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
46854
46861
  error_report_stop: true,
46855
46862
  ext: {
46856
- veplayer_version: "2.9.3-rc.0",
46863
+ veplayer_version: "2.9.3-rc.2",
46857
46864
  flv_version: "3.0.23-rc.6",
46858
46865
  hls_version: "3.0.21-rc.21",
46859
- rts_version: "0.2.1-alpha.45"
46866
+ rts_version: "0.2.1-alpha.47"
46860
46867
  }
46861
46868
  });
46862
46869
  }
@@ -52012,18 +52019,16 @@ class TeaTracker {
52012
52019
  return "cn";
52013
52020
  }
52014
52021
  init(logger2) {
52015
- const { userId, deviceId, enable: enable2, ...teaOptions } = logger2 ?? {};
52016
- this._userId = userId || getUserId2();
52017
- this._deviceId = deviceId || getDeviceID2();
52018
- if (enable2 === false) {
52022
+ this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId2();
52023
+ this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID2();
52024
+ if ((logger2 == null ? void 0 : logger2.enable) === false) {
52019
52025
  return;
52020
52026
  }
52021
- this.tea = this._createTea(teaOptions);
52027
+ this.tea = this._createTea();
52022
52028
  }
52023
- _createTea(teaOptions) {
52029
+ _createTea() {
52024
52030
  const Tea = new Wi$1("player_track");
52025
52031
  Tea.init({
52026
- ...teaOptions,
52027
52032
  app_id: 468759,
52028
52033
  channel: "cn"
52029
52034
  });
@@ -66837,7 +66842,6 @@ async function prepare(options) {
66837
66842
  return;
66838
66843
  }
66839
66844
  teaTracker.init({
66840
- ...options.logger,
66841
66845
  userId: options.userId,
66842
66846
  deviceId: options.deviceId
66843
66847
  });