Expose constant SKIP_TIME_THRESHOLD as inactivePeriodThreshold in replayer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
This commit is contained in:
@@ -82,7 +82,6 @@ import './styles/style.css';
|
||||
import canvasMutation from './canvas';
|
||||
import { deserializeArg } from './canvas/deserialize-args';
|
||||
|
||||
const SKIP_TIME_THRESHOLD = 10 * 1000;
|
||||
const SKIP_TIME_INTERVAL = 5 * 1000;
|
||||
|
||||
// https://github.com/rollup/rollup/issues/1267#issuecomment-296395734
|
||||
@@ -179,6 +178,7 @@ export class Replayer {
|
||||
root: document.body,
|
||||
loadTimeout: 0,
|
||||
skipInactive: false,
|
||||
inactivePeriodThreshold: 10 * 1000,
|
||||
showWarning: true,
|
||||
showDebug: false,
|
||||
blockClass: 'rr-block',
|
||||
@@ -692,7 +692,7 @@ export class Replayer {
|
||||
if (
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
_event.delay! - event.delay! >
|
||||
SKIP_TIME_THRESHOLD *
|
||||
this.config.inactivePeriodThreshold *
|
||||
this.speedService.state.context.timer.speed
|
||||
) {
|
||||
this.nextUserInteractionEvent = _event;
|
||||
|
||||
@@ -170,6 +170,7 @@ export type playerConfig = {
|
||||
root: Element;
|
||||
loadTimeout: number;
|
||||
skipInactive: boolean;
|
||||
inactivePeriodThreshold: number;
|
||||
showWarning: boolean;
|
||||
showDebug: boolean;
|
||||
blockClass: string;
|
||||
|
||||
Reference in New Issue
Block a user