@volcengine/veplayer 2.10.0-rc.0 → 2.10.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.
@@ -25246,7 +25246,7 @@ class Logger2 extends Plugin$2 {
25246
25246
  };
25247
25247
  }
25248
25248
  afterCreate() {
25249
- if (!this.player.config.teaTracker) {
25249
+ if (!this.player.config.teaTracker.tea) {
25250
25250
  return;
25251
25251
  }
25252
25252
  this.open();
@@ -25275,18 +25275,19 @@ class Logger2 extends Plugin$2 {
25275
25275
  }
25276
25276
  }
25277
25277
  _start() {
25278
- var _a, _b, _c, _d, _e2, _f, _g, _h;
25279
- this._liveLogger = (_h = (_a = this.player.config) == null ? void 0 : _a.teaTracker) == null ? void 0 : _h.createPlayerLogger({
25280
- Tea: (_c = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _c.tea,
25278
+ var _a, _b, _c, _d, _e2;
25279
+ const { userId, deviceId, appId } = ((_a = this.player.config) == null ? void 0 : _a.teaTracker) || {};
25280
+ this._liveLogger = (_e2 = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _e2.createPlayerLogger({
25281
+ Tea: (_d = (_c = this.player.config) == null ? void 0 : _c.teaTracker) == null ? void 0 : _d.tea,
25281
25282
  player: this.player,
25282
- aid: this.config.appId || 654925,
25283
- project_key: this.config.appId,
25284
- app_name: this.config.appName || this.config.appId,
25285
- user_id: (_e2 = (_d = this.player.config) == null ? void 0 : _d.teaTracker) == null ? void 0 : _e2.userId,
25286
- device_id: (_g = (_f = this.player.config) == null ? void 0 : _f.teaTracker) == null ? void 0 : _g.deviceId,
25283
+ aid: appId,
25284
+ project_key: appId,
25285
+ app_name: this.config.appName || appId,
25286
+ user_id: userId,
25287
+ device_id: deviceId,
25287
25288
  error_report_stop: true,
25288
25289
  ext: {
25289
- veplayer_version: "2.3.1-rc.1",
25290
+ veplayer_version: "2.3.0",
25290
25291
  flv_version: "3.0.23-rc.6",
25291
25292
  hls_version: "3.0.21-rc.21",
25292
25293
  rts_version: "0.2.1-alpha.47"
@@ -32707,6 +32708,7 @@ class TeaTracker {
32707
32708
  __publicField(this, "liveLogger");
32708
32709
  __publicField(this, "_userId");
32709
32710
  __publicField(this, "_deviceId");
32711
+ __publicField(this, "_appId");
32710
32712
  }
32711
32713
  get userId() {
32712
32714
  return this._userId;
@@ -32717,21 +32719,27 @@ class TeaTracker {
32717
32719
  get channel() {
32718
32720
  return "cn";
32719
32721
  }
32722
+ get appId() {
32723
+ return this._appId;
32724
+ }
32720
32725
  init(logger2) {
32721
- this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId$1();
32722
- this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID$1();
32723
- if ((logger2 == null ? void 0 : logger2.enable) === false) {
32726
+ const { userId, deviceId, enable, appId, ...teaOptions } = logger2 ?? {};
32727
+ this._userId = userId || getUserId$1();
32728
+ this._deviceId = deviceId || getDeviceID$1();
32729
+ this._appId = appId || 654925;
32730
+ if (enable === false) {
32724
32731
  return;
32725
32732
  }
32726
- this.tea = this._createTea();
32733
+ this.tea = this._createTea(teaOptions);
32727
32734
  }
32728
32735
  createPlayerLogger(options) {
32729
32736
  this.liveLogger = new LoggerControl(options);
32730
32737
  return this.liveLogger;
32731
32738
  }
32732
- _createTea() {
32739
+ _createTea(teaOptions) {
32733
32740
  const Tea = new Wi$1("player_track");
32734
32741
  Tea.init({
32742
+ ...teaOptions,
32735
32743
  app_id: 468759,
32736
32744
  channel: "cn"
32737
32745
  });
@@ -37732,7 +37740,7 @@ async function createLivePlayer(options) {
37732
37740
  console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
37733
37741
  }
37734
37742
  await prepare({
37735
- ...options.logger,
37743
+ logger: options.logger,
37736
37744
  appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
37737
37745
  syncWaitSettings: false,
37738
37746
  strategies: {
@@ -37821,7 +37829,9 @@ async function prepare(options) {
37821
37829
  if (!teaTracker.tea) {
37822
37830
  teaTracker.init({
37823
37831
  userId: options.userId,
37824
- deviceId: options.deviceId
37832
+ deviceId: options.deviceId,
37833
+ appId: options.appId,
37834
+ ...options.logger
37825
37835
  });
37826
37836
  }
37827
37837
  if (!liveVeStrategy.veStrategyManager) {
@@ -37829,7 +37839,7 @@ async function prepare(options) {
37829
37839
  }
37830
37840
  await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
37831
37841
  ...options,
37832
- playerVersion: "2.3.1-rc.1",
37842
+ playerVersion: "2.3.0",
37833
37843
  type: "LIVE"
37834
37844
  }));
37835
37845
  return liveVeStrategy.veStrategyManager;