@extn/segi-js 0.2.9 → 0.2.11
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/dist/cdn.global.js +25 -26
- package/dist/replay/index.js +11 -0
- package/dist/replay/index.mjs +11 -0
- package/package.json +1 -1
package/dist/replay/index.js
CHANGED
|
@@ -351,6 +351,16 @@ async function activateReplay(args) {
|
|
|
351
351
|
clickCount: 0,
|
|
352
352
|
recordingEnabled: true
|
|
353
353
|
};
|
|
354
|
+
let lastSessionBump = Date.now();
|
|
355
|
+
const bumpIfStale = () => {
|
|
356
|
+
const now = Date.now();
|
|
357
|
+
if (now - lastSessionBump < 6e4) return;
|
|
358
|
+
lastSessionBump = now;
|
|
359
|
+
bumpSessionActivity();
|
|
360
|
+
};
|
|
361
|
+
for (const ev of ["mousedown", "keydown", "scroll", "touchstart"]) {
|
|
362
|
+
window.addEventListener(ev, bumpIfStale, { passive: true, capture: true });
|
|
363
|
+
}
|
|
354
364
|
const w = window;
|
|
355
365
|
const scheduleRrwebStart = (run) => {
|
|
356
366
|
let fired = false;
|
|
@@ -506,6 +516,7 @@ var replayApi = {
|
|
|
506
516
|
*/
|
|
507
517
|
notifyRouteChange(url, title) {
|
|
508
518
|
if (!active) return;
|
|
519
|
+
bumpSessionActivity();
|
|
509
520
|
const nowBlocked = isPathBlocked(active.options, location.pathname);
|
|
510
521
|
if (nowBlocked) {
|
|
511
522
|
if (!active.paused) {
|
package/dist/replay/index.mjs
CHANGED
|
@@ -351,6 +351,16 @@ async function activateReplay(args) {
|
|
|
351
351
|
clickCount: 0,
|
|
352
352
|
recordingEnabled: true
|
|
353
353
|
};
|
|
354
|
+
let lastSessionBump = Date.now();
|
|
355
|
+
const bumpIfStale = () => {
|
|
356
|
+
const now = Date.now();
|
|
357
|
+
if (now - lastSessionBump < 6e4) return;
|
|
358
|
+
lastSessionBump = now;
|
|
359
|
+
bumpSessionActivity();
|
|
360
|
+
};
|
|
361
|
+
for (const ev of ["mousedown", "keydown", "scroll", "touchstart"]) {
|
|
362
|
+
window.addEventListener(ev, bumpIfStale, { passive: true, capture: true });
|
|
363
|
+
}
|
|
354
364
|
const w = window;
|
|
355
365
|
const scheduleRrwebStart = (run) => {
|
|
356
366
|
let fired = false;
|
|
@@ -506,6 +516,7 @@ var replayApi = {
|
|
|
506
516
|
*/
|
|
507
517
|
notifyRouteChange(url, title) {
|
|
508
518
|
if (!active) return;
|
|
519
|
+
bumpSessionActivity();
|
|
509
520
|
const nowBlocked = isPathBlocked(active.options, location.pathname);
|
|
510
521
|
if (nowBlocked) {
|
|
511
522
|
if (!active.paused) {
|