@amplitude/session-replay-browser
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -10,3 +10,3 @@ import { Logger as ILogger } from '@amplitude/analytics-types'; | ||
loggerProvider: ILogger; | ||
stopRecordingEvents: ReturnType<typeof record> | null; | ||
recordCancelCallback: ReturnType<typeof record> | null; | ||
constructor(); | ||
@@ -28,2 +28,3 @@ init(apiKey: string, options: SessionReplayOptions): import("@amplitude/analytics-types").AmplitudeReturn<void>; | ||
recordEvents(): void; | ||
stopRecordingEvents: () => void; | ||
getDeviceId(): string | undefined; | ||
@@ -30,0 +31,0 @@ getSessionId(): number | undefined; |
@@ -16,3 +16,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
this.name = '@amplitude/session-replay-browser'; | ||
this.stopRecordingEvents = null; | ||
this.recordCancelCallback = null; | ||
this.blurListener = function () { | ||
@@ -24,2 +24,12 @@ _this.stopRecordingAndSendEvents(); | ||
}; | ||
this.stopRecordingEvents = function () { | ||
try { | ||
_this.recordCancelCallback && _this.recordCancelCallback(); | ||
_this.recordCancelCallback = null; | ||
} | ||
catch (error) { | ||
var typedError = error; | ||
_this.loggerProvider.warn("Error occurred while stopping recording: ".concat(typedError.toString())); | ||
} | ||
}; | ||
this.loggerProvider = new analytics_core_1.Logger(); | ||
@@ -112,10 +122,3 @@ } | ||
var _a; | ||
try { | ||
this.stopRecordingEvents && this.stopRecordingEvents(); | ||
this.stopRecordingEvents = null; | ||
} | ||
catch (error) { | ||
var typedError = error; | ||
this.loggerProvider.warn("Error occurred while stopping recording: ".concat(typedError.toString())); | ||
} | ||
this.stopRecordingEvents(); | ||
var sessionIdToSend = sessionId || ((_a = this.identifiers) === null || _a === void 0 ? void 0 : _a.sessionId); | ||
@@ -210,3 +213,4 @@ var deviceId = this.getDeviceId(); | ||
} | ||
this.stopRecordingEvents = (0, rrweb_1.record)({ | ||
this.stopRecordingEvents(); | ||
this.recordCancelCallback = (0, rrweb_1.record)({ | ||
emit: function (event) { | ||
@@ -213,0 +217,0 @@ var globalScope = (0, analytics_client_common_1.getGlobalScope)(); |
@@ -10,3 +10,3 @@ import { Logger as ILogger } from '@amplitude/analytics-types'; | ||
loggerProvider: ILogger; | ||
stopRecordingEvents: ReturnType<typeof record> | null; | ||
recordCancelCallback: ReturnType<typeof record> | null; | ||
constructor(); | ||
@@ -28,2 +28,3 @@ init(apiKey: string, options: SessionReplayOptions): import("@amplitude/analytics-types").AmplitudeReturn<void>; | ||
recordEvents(): void; | ||
stopRecordingEvents: () => void; | ||
getDeviceId(): string | undefined; | ||
@@ -30,0 +31,0 @@ getSessionId(): number | undefined; |
@@ -14,3 +14,3 @@ import { __awaiter, __generator } from "tslib"; | ||
this.name = '@amplitude/session-replay-browser'; | ||
this.stopRecordingEvents = null; | ||
this.recordCancelCallback = null; | ||
this.blurListener = function () { | ||
@@ -22,2 +22,12 @@ _this.stopRecordingAndSendEvents(); | ||
}; | ||
this.stopRecordingEvents = function () { | ||
try { | ||
_this.recordCancelCallback && _this.recordCancelCallback(); | ||
_this.recordCancelCallback = null; | ||
} | ||
catch (error) { | ||
var typedError = error; | ||
_this.loggerProvider.warn("Error occurred while stopping recording: ".concat(typedError.toString())); | ||
} | ||
}; | ||
this.loggerProvider = new Logger(); | ||
@@ -110,10 +120,3 @@ } | ||
var _a; | ||
try { | ||
this.stopRecordingEvents && this.stopRecordingEvents(); | ||
this.stopRecordingEvents = null; | ||
} | ||
catch (error) { | ||
var typedError = error; | ||
this.loggerProvider.warn("Error occurred while stopping recording: ".concat(typedError.toString())); | ||
} | ||
this.stopRecordingEvents(); | ||
var sessionIdToSend = sessionId || ((_a = this.identifiers) === null || _a === void 0 ? void 0 : _a.sessionId); | ||
@@ -208,3 +211,4 @@ var deviceId = this.getDeviceId(); | ||
} | ||
this.stopRecordingEvents = record({ | ||
this.stopRecordingEvents(); | ||
this.recordCancelCallback = record({ | ||
emit: function (event) { | ||
@@ -211,0 +215,0 @@ var globalScope = getGlobalScope(); |
@@ -10,3 +10,3 @@ import { Logger as ILogger } from '@amplitude/analytics-types'; | ||
loggerProvider: ILogger; | ||
stopRecordingEvents: ReturnType<typeof record> | null; | ||
recordCancelCallback: ReturnType<typeof record> | null; | ||
constructor(); | ||
@@ -28,2 +28,3 @@ init(apiKey: string, options: SessionReplayOptions): import("@amplitude/analytics-types").AmplitudeReturn<void>; | ||
recordEvents(): void; | ||
stopRecordingEvents: () => void; | ||
getDeviceId(): string | undefined; | ||
@@ -30,0 +31,0 @@ getSessionId(): number | undefined; |
{ | ||
"name": "@amplitude/session-replay-browser", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "", | ||
@@ -60,3 +60,3 @@ "author": "Amplitude Inc", | ||
], | ||
"gitHead": "223e05b7591afe6ae2876f4b0b6dbcb1147d231d" | ||
"gitHead": "280ce6a4d2679dff3c79dc2a7ef3db961412bcc2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
572259
3428