@amplitude/plugin-session-replay-browser
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -14,4 +14,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
var STORAGE_PREFIX = "".concat(analytics_core_1.AMPLITUDE_PREFIX, "_replay_unsent"); | ||
var PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS = 200; // derived by JSON stringifying an example payload without events | ||
var MAX_EVENT_LIST_SIZE_IN_BYTES = 20 * 1000000 - PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS; | ||
var PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS = 500; // derived by JSON stringifying an example payload without events | ||
var MAX_EVENT_LIST_SIZE_IN_BYTES = 10 * 1000000 - PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS; | ||
var MIN_INTERVAL = 500; // 500 ms | ||
@@ -170,2 +170,7 @@ var MAX_INTERVAL = 10 * 1000; // 10 seconds | ||
emit: function (event) { | ||
var GlobalScope = (0, analytics_client_common_1.getGlobalScope)(); | ||
if (GlobalScope && GlobalScope.document && !GlobalScope.document.hasFocus()) { | ||
_this.stopRecordingEvents && _this.stopRecordingEvents(); | ||
return; | ||
} | ||
var eventString = JSON.stringify(event); | ||
@@ -172,0 +177,0 @@ var shouldSplit = _this.shouldSplitEventsList(eventString); |
@@ -12,4 +12,4 @@ import { __assign, __awaiter, __generator, __read } from "tslib"; | ||
var STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_replay_unsent"); | ||
var PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS = 200; // derived by JSON stringifying an example payload without events | ||
var MAX_EVENT_LIST_SIZE_IN_BYTES = 20 * 1000000 - PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS; | ||
var PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS = 500; // derived by JSON stringifying an example payload without events | ||
var MAX_EVENT_LIST_SIZE_IN_BYTES = 10 * 1000000 - PAYLOAD_ESTIMATED_SIZE_IN_BYTES_WITHOUT_EVENTS; | ||
var MIN_INTERVAL = 500; // 500 ms | ||
@@ -168,2 +168,7 @@ var MAX_INTERVAL = 10 * 1000; // 10 seconds | ||
emit: function (event) { | ||
var GlobalScope = getGlobalScope(); | ||
if (GlobalScope && GlobalScope.document && !GlobalScope.document.hasFocus()) { | ||
_this.stopRecordingEvents && _this.stopRecordingEvents(); | ||
return; | ||
} | ||
var eventString = JSON.stringify(event); | ||
@@ -170,0 +175,0 @@ var shouldSplit = _this.shouldSplitEventsList(eventString); |
{ | ||
"name": "@amplitude/plugin-session-replay-browser", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "", | ||
@@ -58,3 +58,3 @@ "author": "Amplitude Inc", | ||
], | ||
"gitHead": "2c95641a226169afa89936f06afbbeef030f78e1" | ||
"gitHead": "6d9cf5f1a05293815917f2136914493a67a9256f" | ||
} |
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
369678
1856