@openreplay/tracker-assist
Advanced tools
Comparing version
@@ -7,2 +7,3 @@ import './_slim'; | ||
session_calling_peer_key: string; | ||
config: Object; | ||
} | ||
@@ -9,0 +10,0 @@ export default function (opts?: Partial<Options>): (app: App | null, appOptions?: { |
@@ -29,2 +29,3 @@ "use strict"; | ||
session_calling_peer_key: "__openreplay_calling_peer", | ||
config: null | ||
}, opts); | ||
@@ -61,3 +62,3 @@ return function (app, appOptions = {}) { | ||
const peerID = `${app.getProjectKey()}-${app.getSessionID()}`; | ||
peer = new peerjs_1.default(peerID, { | ||
const _opt = { | ||
// @ts-ignore | ||
@@ -67,3 +68,7 @@ host: app.getHost(), | ||
port: location.protocol === 'http:' && appOptions.__DISABLE_SECURE_MODE ? 80 : 443, | ||
}); | ||
}; | ||
if (options.config) { | ||
_opt['config'] = options.config; | ||
} | ||
peer = new peerjs_1.default(peerID, _opt); | ||
log('Peer created: ', peer); | ||
@@ -70,0 +75,0 @@ peer.on('error', e => warn("Peer error: ", e.type, e)); |
@@ -7,2 +7,3 @@ import './_slim'; | ||
session_calling_peer_key: string; | ||
config: Object; | ||
} | ||
@@ -9,0 +10,0 @@ export default function (opts?: Partial<Options>): (app: App | null, appOptions?: { |
@@ -27,2 +27,3 @@ import './_slim'; | ||
session_calling_peer_key: "__openreplay_calling_peer", | ||
config: null | ||
}, opts); | ||
@@ -59,3 +60,3 @@ return function (app, appOptions = {}) { | ||
const peerID = `${app.getProjectKey()}-${app.getSessionID()}`; | ||
peer = new Peer(peerID, { | ||
const _opt = { | ||
// @ts-ignore | ||
@@ -65,3 +66,7 @@ host: app.getHost(), | ||
port: location.protocol === 'http:' && appOptions.__DISABLE_SECURE_MODE ? 80 : 443, | ||
}); | ||
}; | ||
if (options.config) { | ||
_opt['config'] = options.config; | ||
} | ||
peer = new Peer(peerID, _opt); | ||
log('Peer created: ', peer); | ||
@@ -68,0 +73,0 @@ peer.on('error', e => warn("Peer error: ", e.type, e)); |
{ | ||
"name": "@openreplay/tracker-assist", | ||
"description": "Tracker plugin for screen assistance through the WebRTC", | ||
"version": "3.4.6", | ||
"version": "3.4.7", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "WebRTC", |
63370
0.54%1580
0.77%