* Impl record iframe * iframe observe * temp: add bundle file to git * update bundle * update with pick * update bundle * fix fragment map remove * feat: add an option to determine whether to pause CSS animation when playback is paused (#428) set pauseAnimation to true by default * fix: elements would lose some states like scroll position because of "virtual parent" optimization (#427) * fix: elements would lose some state like scroll position because of "virtual parent" optimization * refactor: the bugfix code bug: elements would lose some state like scroll position because of "virtual parent" optimization * fix: an error occured at applyMutation(remove nodes part) error message: Uncaught (in promise) DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node * pick fixes * revert ignore file * re-impl iframe record * re-impl iframe replay * code housekeeping * move multi layer dimension calculation to replay side * update test cases * teardown test server * upgrade rrweb-snapshot with iframe load timeout Co-authored-by: Lucky Feng <yun.feng@smartx.com>
65 lines
2.1 KiB
TypeScript
65 lines
2.1 KiB
TypeScript
import { Timer } from './timer';
|
|
import { createPlayerService, createSpeedService } from './machine';
|
|
import { eventWithTime, playerConfig, playerMetaData, Handler } from '../types';
|
|
import './styles/style.css';
|
|
export declare class Replayer {
|
|
wrapper: HTMLDivElement;
|
|
iframe: HTMLIFrameElement;
|
|
service: ReturnType<typeof createPlayerService>;
|
|
speedService: ReturnType<typeof createSpeedService>;
|
|
get timer(): Timer;
|
|
config: playerConfig;
|
|
private mouse;
|
|
private mouseTail;
|
|
private tailPositions;
|
|
private emitter;
|
|
private nextUserInteractionEvent;
|
|
private legacy_missingNodeRetryMap;
|
|
private treeIndex;
|
|
private fragmentParentMap;
|
|
private elementStateMap;
|
|
private imageMap;
|
|
private newDocumentQueue;
|
|
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
|
|
on(event: string, handler: Handler): this;
|
|
setConfig(config: Partial<playerConfig>): void;
|
|
getMetaData(): playerMetaData;
|
|
getCurrentTime(): number;
|
|
getTimeOffset(): number;
|
|
play(timeOffset?: number): void;
|
|
pause(timeOffset?: number): void;
|
|
resume(timeOffset?: number): void;
|
|
startLive(baselineTime?: number): void;
|
|
addEvent(rawEvent: eventWithTime | string): void;
|
|
enableInteract(): void;
|
|
disableInteract(): void;
|
|
private setupDom;
|
|
private handleResize;
|
|
private getCastFn;
|
|
private rebuildFullSnapshot;
|
|
private insertStyleRules;
|
|
private attachDocumentToIframe;
|
|
private collectIframeAndAttachDocument;
|
|
private waitForStylesheetLoad;
|
|
private preloadAllImages;
|
|
private applyIncremental;
|
|
private applyMutation;
|
|
private applyScroll;
|
|
private applyInput;
|
|
private formatMessage;
|
|
private getConsoleLogger;
|
|
private legacy_resolveMissingNode;
|
|
private moveAndHover;
|
|
private drawMouseTail;
|
|
private hoverElements;
|
|
private isUserInteraction;
|
|
private backToNormal;
|
|
private storeState;
|
|
private restoreState;
|
|
private warnNodeNotFound;
|
|
private warnCanvasMutationFailed;
|
|
private debugNodeNotFound;
|
|
private warn;
|
|
private debug;
|
|
}
|