@statsig/session-replay 3.15.0 → 3.15.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/package.json +2 -2
- package/src/SessionReplay.js +4 -5
- package/src/index.js +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/session-replay",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"homepage": "https://github.com/statsig-io/js-client-monorepo",
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"rrweb": "2.0.0-alpha.14",
|
|
13
|
-
"@statsig/client-core": "3.15.
|
|
13
|
+
"@statsig/client-core": "3.15.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@rrweb/types": "2.0.0-alpha.14"
|
package/src/SessionReplay.js
CHANGED
|
@@ -43,7 +43,6 @@ class SessionReplay {
|
|
|
43
43
|
this._replayer.stop();
|
|
44
44
|
client_core_1.StatsigMetadataProvider.add({ isRecordingSession: 'false' });
|
|
45
45
|
this._logRecording('session_expired');
|
|
46
|
-
this._currentSessionID = this._getSessionIdFromClient();
|
|
47
46
|
});
|
|
48
47
|
this._subscribeToVisibilityChanged();
|
|
49
48
|
this._attemptToStartRecording((_a = this._options) === null || _a === void 0 ? void 0 : _a.forceRecording);
|
|
@@ -52,8 +51,8 @@ class SessionReplay {
|
|
|
52
51
|
// Note: this exists as a separate function to ensure closure scope only contains `sdkKey`
|
|
53
52
|
const { sdkKey } = this._client.getContext();
|
|
54
53
|
(0, client_core_1._subscribeToVisiblityChanged)((vis) => {
|
|
55
|
-
var _a;
|
|
56
|
-
const inst = (_a =
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const inst = (_b = (_a = (0, client_core_1._getStatsigGlobal)()) === null || _a === void 0 ? void 0 : _a.srInstances) === null || _b === void 0 ? void 0 : _b[sdkKey];
|
|
57
56
|
if (inst instanceof SessionReplay) {
|
|
58
57
|
inst._onVisibilityChanged(vis);
|
|
59
58
|
}
|
|
@@ -117,7 +116,7 @@ class SessionReplay {
|
|
|
117
116
|
if (this._events.length === 0 || this._sessionData == null) {
|
|
118
117
|
return;
|
|
119
118
|
}
|
|
120
|
-
this.
|
|
119
|
+
this._logRecording();
|
|
121
120
|
}
|
|
122
121
|
_logRecording(endReason) {
|
|
123
122
|
if (this._events.length === 0 || this._sessionData == null) {
|
|
@@ -153,7 +152,7 @@ class SessionReplay {
|
|
|
153
152
|
this._events = [];
|
|
154
153
|
}
|
|
155
154
|
_bumpSessionIdleTimerAndLogRecording() {
|
|
156
|
-
this.
|
|
155
|
+
this._getSessionIdFromClient();
|
|
157
156
|
this._logRecording();
|
|
158
157
|
}
|
|
159
158
|
_getSessionIdFromClient() {
|
package/src/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StatsigSessionReplayPlugin = exports.runStatsigSessionReplay = exports.SessionReplay = exports.SessionReplayClient = void 0;
|
|
4
|
+
const client_core_1 = require("@statsig/client-core");
|
|
4
5
|
const SessionReplay_1 = require("./SessionReplay");
|
|
5
6
|
Object.defineProperty(exports, "SessionReplay", { enumerable: true, get: function () { return SessionReplay_1.SessionReplay; } });
|
|
6
7
|
Object.defineProperty(exports, "StatsigSessionReplayPlugin", { enumerable: true, get: function () { return SessionReplay_1.StatsigSessionReplayPlugin; } });
|
|
7
8
|
Object.defineProperty(exports, "runStatsigSessionReplay", { enumerable: true, get: function () { return SessionReplay_1.runStatsigSessionReplay; } });
|
|
8
9
|
const SessionReplayClient_1 = require("./SessionReplayClient");
|
|
9
10
|
Object.defineProperty(exports, "SessionReplayClient", { enumerable: true, get: function () { return SessionReplayClient_1.SessionReplayClient; } });
|
|
10
|
-
|
|
11
|
+
Object.assign((0, client_core_1._getStatsigGlobal)(), {
|
|
12
|
+
SessionReplayClient: SessionReplayClient_1.SessionReplayClient,
|
|
11
13
|
SessionReplay: SessionReplay_1.SessionReplay,
|
|
12
14
|
runStatsigSessionReplay: SessionReplay_1.runStatsigSessionReplay,
|
|
13
|
-
StatsigSessionReplayPlugin: SessionReplay_1.StatsigSessionReplayPlugin
|
|
15
|
+
StatsigSessionReplayPlugin: SessionReplay_1.StatsigSessionReplayPlugin,
|
|
16
|
+
});
|