@openreplay/tracker-assist
Version:
Tracker plugin for screen assistance through the WebRTC
33 lines (32 loc) • 1.27 kB
TypeScript
import type { Options as AssistOptions } from './Assist.js';
export declare enum RCStatus {
Disabled = 0,
Requesting = 1,
Enabled = 2
}
export default class RemoteControl {
private readonly options;
private readonly onGrand;
private readonly onRelease;
private readonly onBusy;
private readonly updateState;
private mouse;
status: RCStatus;
private agentID;
constructor(options: AssistOptions, onGrand: (id: string) => string | undefined, onRelease: (id?: string | null, isDenied?: boolean) => void, onBusy: (id?: string) => void, updateState: (activeId?: string) => void);
reconnect(ids: string[]): void;
private confirm;
requestControl: (id: string) => void;
releaseControl: (isDenied?: boolean, keepId?: boolean, skipUpdate?: boolean) => void;
grantControl: (id: string, skipUpdate?: boolean) => void;
resetMouse: () => void;
scroll: (id: any, d: any) => void;
move: (id: any, xy: any) => false | void | undefined;
private focused;
click: (id: any, xy: any) => void;
focus: (id: any, el: HTMLElement) => void;
startDrag: (id: any, xy: any) => void;
drag: (id: any, xydxdy: any) => void;
stopDrag: (id: any) => void;
input: (id: any, value: string) => void;
}