@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volcengine/veplayer",
3
- "version": "2.10.0-rc.0",
3
+ "version": "2.10.0",
4
4
  "main": "./umd/veplayer.production.js",
5
5
  "module": "./esm/veplayer.production.js",
6
6
  "browser": "./umd/veplayer.production.js",
@@ -25250,7 +25250,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
25250
25250
  };
25251
25251
  }
25252
25252
  afterCreate() {
25253
- if (!this.player.config.teaTracker) {
25253
+ if (!this.player.config.teaTracker.tea) {
25254
25254
  return;
25255
25255
  }
25256
25256
  this.open();
@@ -25279,18 +25279,19 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
25279
25279
  }
25280
25280
  }
25281
25281
  _start() {
25282
- var _a, _b, _c, _d, _e2, _f, _g, _h;
25283
- this._liveLogger = (_h = (_a = this.player.config) == null ? void 0 : _a.teaTracker) == null ? void 0 : _h.createPlayerLogger({
25284
- Tea: (_c = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _c.tea,
25282
+ var _a, _b, _c, _d, _e2;
25283
+ const { userId, deviceId, appId } = ((_a = this.player.config) == null ? void 0 : _a.teaTracker) || {};
25284
+ this._liveLogger = (_e2 = (_b = this.player.config) == null ? void 0 : _b.teaTracker) == null ? void 0 : _e2.createPlayerLogger({
25285
+ Tea: (_d = (_c = this.player.config) == null ? void 0 : _c.teaTracker) == null ? void 0 : _d.tea,
25285
25286
  player: this.player,
25286
- aid: this.config.appId || 654925,
25287
- project_key: this.config.appId,
25288
- app_name: this.config.appName || this.config.appId,
25289
- user_id: (_e2 = (_d = this.player.config) == null ? void 0 : _d.teaTracker) == null ? void 0 : _e2.userId,
25290
- device_id: (_g = (_f = this.player.config) == null ? void 0 : _f.teaTracker) == null ? void 0 : _g.deviceId,
25287
+ aid: appId,
25288
+ project_key: appId,
25289
+ app_name: this.config.appName || appId,
25290
+ user_id: userId,
25291
+ device_id: deviceId,
25291
25292
  error_report_stop: true,
25292
25293
  ext: {
25293
- veplayer_version: "2.3.1-rc.1",
25294
+ veplayer_version: "2.3.0",
25294
25295
  flv_version: "3.0.23-rc.6",
25295
25296
  hls_version: "3.0.21-rc.21",
25296
25297
  rts_version: "0.2.1-alpha.47"
@@ -32705,6 +32706,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
32705
32706
  __publicField(this, "liveLogger");
32706
32707
  __publicField(this, "_userId");
32707
32708
  __publicField(this, "_deviceId");
32709
+ __publicField(this, "_appId");
32708
32710
  }
32709
32711
  get userId() {
32710
32712
  return this._userId;
@@ -32715,21 +32717,27 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
32715
32717
  get channel() {
32716
32718
  return "cn";
32717
32719
  }
32720
+ get appId() {
32721
+ return this._appId;
32722
+ }
32718
32723
  init(logger2) {
32719
- this._userId = (logger2 == null ? void 0 : logger2.userId) || getUserId$1();
32720
- this._deviceId = (logger2 == null ? void 0 : logger2.deviceId) || getDeviceID$1();
32721
- if ((logger2 == null ? void 0 : logger2.enable) === false) {
32724
+ const { userId, deviceId, enable, appId, ...teaOptions } = logger2 ?? {};
32725
+ this._userId = userId || getUserId$1();
32726
+ this._deviceId = deviceId || getDeviceID$1();
32727
+ this._appId = appId || 654925;
32728
+ if (enable === false) {
32722
32729
  return;
32723
32730
  }
32724
- this.tea = this._createTea();
32731
+ this.tea = this._createTea(teaOptions);
32725
32732
  }
32726
32733
  createPlayerLogger(options) {
32727
32734
  this.liveLogger = new LoggerControl(options);
32728
32735
  return this.liveLogger;
32729
32736
  }
32730
- _createTea() {
32737
+ _createTea(teaOptions) {
32731
32738
  const Tea = new Wi$1("player_track");
32732
32739
  Tea.init({
32740
+ ...teaOptions,
32733
32741
  app_id: 468759,
32734
32742
  channel: "cn"
32735
32743
  });
@@ -37730,7 +37738,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
37730
37738
  console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
37731
37739
  }
37732
37740
  await prepare({
37733
- ...options.logger,
37741
+ logger: options.logger,
37734
37742
  appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
37735
37743
  syncWaitSettings: false,
37736
37744
  strategies: {
@@ -37819,7 +37827,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
37819
37827
  if (!teaTracker.tea) {
37820
37828
  teaTracker.init({
37821
37829
  userId: options.userId,
37822
- deviceId: options.deviceId
37830
+ deviceId: options.deviceId,
37831
+ appId: options.appId,
37832
+ ...options.logger
37823
37833
  });
37824
37834
  }
37825
37835
  if (!liveVeStrategy.veStrategyManager) {
@@ -37827,7 +37837,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
37827
37837
  }
37828
37838
  await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
37829
37839
  ...options,
37830
- playerVersion: "2.3.1-rc.1",
37840
+ playerVersion: "2.3.0",
37831
37841
  type: "LIVE"
37832
37842
  }));
37833
37843
  return liveVeStrategy.veStrategyManager;