@openreplay/tracker-assist
Advanced tools
Comparing version
import type { Properties } from 'csstype'; | ||
import { App } from '@openreplay/tracker/cjs'; | ||
import type { Options as ConfirmOptions } from './ConfirmWindow/defaults.js'; | ||
declare type StartEndCallback = () => ((() => Record<string, unknown>) | void); | ||
declare type StartEndCallback = (agentInfo?: Record<string, any>) => ((() => any) | void); | ||
export interface Options { | ||
@@ -22,3 +22,3 @@ onAgentConnect: StartEndCallback; | ||
private readonly noSecureMode; | ||
readonly version = "4.1.3-beta.2"; | ||
readonly version = "4.1.3"; | ||
private socket; | ||
@@ -25,0 +25,0 @@ private peer; |
@@ -22,3 +22,3 @@ "use strict"; | ||
this.noSecureMode = noSecureMode; | ||
this.version = '4.1.3-beta.2'; | ||
this.version = '4.1.3'; | ||
this.socket = null; | ||
@@ -120,3 +120,3 @@ this.peer = null; | ||
} | ||
this.agents[id].onControlReleased = this.options.onRemoteControlStart(); | ||
this.agents[id].onControlReleased = this.options.onRemoteControlStart(this.agents[id].agentInfo); | ||
this.emit('control_granted', id); | ||
@@ -162,3 +162,6 @@ annot = new AnnotationCanvas_js_1.default(); | ||
var _a, _b; | ||
this.agents[id] = Object.assign({ onDisconnect: (_b = (_a = this.options).onAgentConnect) === null || _b === void 0 ? void 0 : _b.call(_a) }, info); | ||
this.agents[id] = { | ||
onDisconnect: (_b = (_a = this.options).onAgentConnect) === null || _b === void 0 ? void 0 : _b.call(_a, info), | ||
agentInfo: info, // TODO ? | ||
}; | ||
this.assistDemandedRestart = true; | ||
@@ -171,5 +174,7 @@ this.app.stop(); | ||
ids.forEach(id => { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
const agentInfo = (_a = this.agents[id]) === null || _a === void 0 ? void 0 : _a.agentInfo; | ||
this.agents[id] = { | ||
onDisconnect: (_b = (_a = this.options).onAgentConnect) === null || _b === void 0 ? void 0 : _b.call(_a), | ||
agentInfo, | ||
onDisconnect: (_c = (_b = this.options).onAgentConnect) === null || _c === void 0 ? void 0 : _c.call(_b, agentInfo), | ||
}; | ||
@@ -176,0 +181,0 @@ }); |
import type { Properties } from 'csstype'; | ||
import { App } from '@openreplay/tracker'; | ||
import type { Options as ConfirmOptions } from './ConfirmWindow/defaults.js'; | ||
declare type StartEndCallback = () => ((() => Record<string, unknown>) | void); | ||
declare type StartEndCallback = (agentInfo?: Record<string, any>) => ((() => any) | void); | ||
export interface Options { | ||
@@ -22,3 +22,3 @@ onAgentConnect: StartEndCallback; | ||
private readonly noSecureMode; | ||
readonly version = "4.1.3-beta.2"; | ||
readonly version = "4.1.3"; | ||
private socket; | ||
@@ -25,0 +25,0 @@ private peer; |
@@ -20,3 +20,3 @@ import { connect, } from 'socket.io-client'; | ||
this.noSecureMode = noSecureMode; | ||
this.version = '4.1.3-beta.2'; | ||
this.version = '4.1.3'; | ||
this.socket = null; | ||
@@ -118,3 +118,3 @@ this.peer = null; | ||
} | ||
this.agents[id].onControlReleased = this.options.onRemoteControlStart(); | ||
this.agents[id].onControlReleased = this.options.onRemoteControlStart(this.agents[id].agentInfo); | ||
this.emit('control_granted', id); | ||
@@ -160,3 +160,6 @@ annot = new AnnotationCanvas(); | ||
var _a, _b; | ||
this.agents[id] = Object.assign({ onDisconnect: (_b = (_a = this.options).onAgentConnect) === null || _b === void 0 ? void 0 : _b.call(_a) }, info); | ||
this.agents[id] = { | ||
onDisconnect: (_b = (_a = this.options).onAgentConnect) === null || _b === void 0 ? void 0 : _b.call(_a, info), | ||
agentInfo: info, // TODO ? | ||
}; | ||
this.assistDemandedRestart = true; | ||
@@ -169,5 +172,7 @@ this.app.stop(); | ||
ids.forEach(id => { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
const agentInfo = (_a = this.agents[id]) === null || _a === void 0 ? void 0 : _a.agentInfo; | ||
this.agents[id] = { | ||
onDisconnect: (_b = (_a = this.options).onAgentConnect) === null || _b === void 0 ? void 0 : _b.call(_a), | ||
agentInfo, | ||
onDisconnect: (_c = (_b = this.options).onAgentConnect) === null || _c === void 0 ? void 0 : _c.call(_b, agentInfo), | ||
}; | ||
@@ -174,0 +179,0 @@ }); |
{ | ||
"name": "@openreplay/tracker-assist", | ||
"description": "Tracker plugin for screen assistance through the WebRTC", | ||
"version": "4.1.3-beta.2", | ||
"version": "4.1.3", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "WebRTC", |
138155
0.33%3111
0.32%