@volcengine/veplayer 2.9.1 → 2.9.3-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.
package/esm/veplayer.d.ts CHANGED
@@ -21,6 +21,9 @@ 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";
24
27
  import VeStrategy from "@byted/volcengine-vestrategy";
25
28
  import { StrategyRecommendation, BaseStrategy, VeStrategyConfig } from "@byted/volcengine-vestrategy";
26
29
  import { HLS } from "@byted/xgplayer-hls.js";
@@ -5628,7 +5631,7 @@ type Stats = {
5628
5631
  * @list option
5629
5632
  * @kind property
5630
5633
  */
5631
- interface LoggerConfig {
5634
+ interface LoggerConfig extends Partial<IInitParam> {
5632
5635
  /** {zh}
5633
5636
  * @brief 是否开启日志上报。
5634
5637
  * @default true
@@ -5961,6 +5964,7 @@ interface PrepareOptions {
5961
5964
  */
5962
5965
  rtmAdaptiveBuffer?: boolean;
5963
5966
  };
5967
+ logger?: LoggerConfig;
5964
5968
  }
5965
5969
  /** {zh}
5966
5970
  * @list option
@@ -10491,7 +10495,7 @@ declare namespace live {
10491
10495
  * @list option
10492
10496
  * @kind property
10493
10497
  */
10494
- interface LoggerConfig {
10498
+ interface LoggerConfig extends Partial<IInitParam> {
10495
10499
  /** {zh}
10496
10500
  * @brief 是否开启日志上报。
10497
10501
  * @default true
@@ -10867,6 +10871,7 @@ declare namespace live {
10867
10871
  */
10868
10872
  rtmAdaptiveBuffer?: boolean;
10869
10873
  };
10874
+ logger?: LoggerConfig;
10870
10875
  }
10871
10876
  /** {zh}
10872
10877
  * @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.1";
14563
+ return "2.9.3-rc.0";
14564
14564
  }
14565
14565
  /** {zh}
14566
14566
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -46813,7 +46813,7 @@ let Logger$1 = class Logger2 extends Plugin {
46813
46813
  };
46814
46814
  }
46815
46815
  afterCreate() {
46816
- if (!this.player.config.teaTracker) {
46816
+ if (!this.player.config.teaTracker.tea) {
46817
46817
  return;
46818
46818
  }
46819
46819
  this.open();
@@ -46853,10 +46853,10 @@ let Logger$1 = class Logger2 extends Plugin {
46853
46853
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
46854
46854
  error_report_stop: true,
46855
46855
  ext: {
46856
- veplayer_version: "2.9.1",
46856
+ veplayer_version: "2.9.3-rc.0",
46857
46857
  flv_version: "3.0.23-rc.6",
46858
46858
  hls_version: "3.0.21-rc.21",
46859
- rts_version: "0.2.1-alpha.43"
46859
+ rts_version: "0.2.1-alpha.45"
46860
46860
  }
46861
46861
  });
46862
46862
  }
@@ -52006,16 +52006,18 @@ class TeaTracker {
52006
52006
  return "cn";
52007
52007
  }
52008
52008
  init(logger2) {
52009
- this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId2();
52010
- this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID2();
52011
- if ((logger2 == null ? void 0 : logger2.enable) === false) {
52009
+ const { userId, deviceId, enable: enable2, ...teaOptions } = logger2 ?? {};
52010
+ this._userId = userId || getUserId2();
52011
+ this._deviceId = deviceId || getDeviceID2();
52012
+ if (enable2 === false) {
52012
52013
  return;
52013
52014
  }
52014
- this.tea = this._createTea();
52015
+ this.tea = this._createTea(teaOptions);
52015
52016
  }
52016
- _createTea() {
52017
+ _createTea(teaOptions) {
52017
52018
  const Tea = new Wi$1("player_track");
52018
52019
  Tea.init({
52020
+ ...teaOptions,
52019
52021
  app_id: 468759,
52020
52022
  channel: "cn"
52021
52023
  });
@@ -66829,6 +66831,7 @@ async function prepare(options) {
66829
66831
  return;
66830
66832
  }
66831
66833
  teaTracker.init({
66834
+ ...options.logger,
66832
66835
  userId: options.userId,
66833
66836
  deviceId: options.deviceId
66834
66837
  });
@@ -21,6 +21,9 @@ 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";
24
27
  import VeStrategy from "@byted/volcengine-vestrategy";
25
28
  import { StrategyRecommendation, BaseStrategy, VeStrategyConfig } from "@byted/volcengine-vestrategy";
26
29
  import { HLS } from "@byted/xgplayer-hls.js";
@@ -5628,7 +5631,7 @@ type Stats = {
5628
5631
  * @list option
5629
5632
  * @kind property
5630
5633
  */
5631
- interface LoggerConfig {
5634
+ interface LoggerConfig extends Partial<IInitParam> {
5632
5635
  /** {zh}
5633
5636
  * @brief 是否开启日志上报。
5634
5637
  * @default true
@@ -5961,6 +5964,7 @@ interface PrepareOptions {
5961
5964
  */
5962
5965
  rtmAdaptiveBuffer?: boolean;
5963
5966
  };
5967
+ logger?: LoggerConfig;
5964
5968
  }
5965
5969
  /** {zh}
5966
5970
  * @list option
@@ -10491,7 +10495,7 @@ declare namespace live {
10491
10495
  * @list option
10492
10496
  * @kind property
10493
10497
  */
10494
- interface LoggerConfig {
10498
+ interface LoggerConfig extends Partial<IInitParam> {
10495
10499
  /** {zh}
10496
10500
  * @brief 是否开启日志上报。
10497
10501
  * @default true
@@ -10867,6 +10871,7 @@ declare namespace live {
10867
10871
  */
10868
10872
  rtmAdaptiveBuffer?: boolean;
10869
10873
  };
10874
+ logger?: LoggerConfig;
10870
10875
  }
10871
10876
  /** {zh}
10872
10877
  * @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.1";
14563
+ return "2.9.3-rc.0";
14564
14564
  }
14565
14565
  /** {zh}
14566
14566
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -46813,7 +46813,7 @@ let Logger$1 = class Logger2 extends Plugin {
46813
46813
  };
46814
46814
  }
46815
46815
  afterCreate() {
46816
- if (!this.player.config.teaTracker) {
46816
+ if (!this.player.config.teaTracker.tea) {
46817
46817
  return;
46818
46818
  }
46819
46819
  this.open();
@@ -46853,10 +46853,10 @@ let Logger$1 = class Logger2 extends Plugin {
46853
46853
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
46854
46854
  error_report_stop: true,
46855
46855
  ext: {
46856
- veplayer_version: "2.9.1",
46856
+ veplayer_version: "2.9.3-rc.0",
46857
46857
  flv_version: "3.0.23-rc.6",
46858
46858
  hls_version: "3.0.21-rc.21",
46859
- rts_version: "0.2.1-alpha.43"
46859
+ rts_version: "0.2.1-alpha.45"
46860
46860
  }
46861
46861
  });
46862
46862
  }
@@ -52012,16 +52012,18 @@ class TeaTracker {
52012
52012
  return "cn";
52013
52013
  }
52014
52014
  init(logger2) {
52015
- this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId2();
52016
- this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID2();
52017
- if ((logger2 == null ? void 0 : logger2.enable) === false) {
52015
+ const { userId, deviceId, enable: enable2, ...teaOptions } = logger2 ?? {};
52016
+ this._userId = userId || getUserId2();
52017
+ this._deviceId = deviceId || getDeviceID2();
52018
+ if (enable2 === false) {
52018
52019
  return;
52019
52020
  }
52020
- this.tea = this._createTea();
52021
+ this.tea = this._createTea(teaOptions);
52021
52022
  }
52022
- _createTea() {
52023
+ _createTea(teaOptions) {
52023
52024
  const Tea = new Wi$1("player_track");
52024
52025
  Tea.init({
52026
+ ...teaOptions,
52025
52027
  app_id: 468759,
52026
52028
  channel: "cn"
52027
52029
  });
@@ -66835,6 +66837,7 @@ async function prepare(options) {
66835
66837
  return;
66836
66838
  }
66837
66839
  teaTracker.init({
66840
+ ...options.logger,
66838
66841
  userId: options.userId,
66839
66842
  deviceId: options.deviceId
66840
66843
  });