@statsig/session-replay 0.0.1-beta.35 → 0.0.1-beta.37

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,9 +1,9 @@
1
1
  {
2
2
  "name": "@statsig/session-replay",
3
- "version": "0.0.1-beta.35",
3
+ "version": "0.0.1-beta.37",
4
4
  "dependencies": {
5
5
  "rrweb": "2.0.0-alpha.12",
6
- "@statsig/client-core": "0.0.1-beta.35"
6
+ "@statsig/client-core": "0.0.1-beta.37"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@rrweb/types": "2.0.0-alpha.12"
@@ -31,8 +31,8 @@ class SessionReplay {
31
31
  }
32
32
  this._currentSessionID = this._getSessionIdFromClient();
33
33
  this._replayer = new SessionReplayClient_1.SessionReplayClient();
34
- this._client.__on('pre_shutdown', () => this._shutdown());
35
- this._client.__on('values_updated', () => this._attemptToStartRecording());
34
+ this._client.$on('pre_shutdown', () => this._shutdown());
35
+ this._client.$on('values_updated', () => this._attemptToStartRecording());
36
36
  this._client.on('session_expired', () => {
37
37
  this._replayer.stop();
38
38
  client_core_1.StatsigMetadataProvider.add({ isRecordingSession: 'false' });
@@ -129,8 +129,7 @@ class SessionReplay {
129
129
  }
130
130
  _getSessionIdFromClient() {
131
131
  return __awaiter(this, void 0, void 0, function* () {
132
- const ctx = yield this._client.getAsyncContext();
133
- return ctx.sessionID;
132
+ return this._client.getAsyncContext().then((x) => x.session.data.sessionID);
134
133
  });
135
134
  }
136
135
  }