* fix: prevent duplicate call link detection (#23) Co-authored-by: Maksim <maksim@MacBook-Pro-Maksim.local> * bot improvements (#25) Co-authored-by: Maksim <maksim@MBP-Maksim.lan> * headless vk video creator * add scroll to logs * allow peer reconnection * add todo about topology changes, kick stale peer to prevent SFU topology * unified relay for headless * remove relay binaries, extend build-go.sh to build them * refactor constants * limit headless resource usage * nuke everyone and yourself at sfu topology changes * add headless for creator * save bot enabled state * increment release version --------- Co-authored-by: Nevenuga <80585376+Nevenuga@users.noreply.github.com> Co-authored-by: Maksim <maksim@MacBook-Pro-Maksim.local> Co-authored-by: Maksim <maksim@MBP-Maksim.lan> Co-authored-by: kulikov <user@Mac.lan>
18 lines
1.3 KiB
JavaScript
18 lines
1.3 KiB
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('bridge', {
|
|
onRelayLog: function(cb) { ipcRenderer.on('relay-log', function(e, data) { cb(data.tabId, data.msg); }); },
|
|
getHookCode: function(tabId, url) { return ipcRenderer.invoke('get-hook-code', tabId, url); },
|
|
setTunnelMode: function(tabId, mode) { return ipcRenderer.invoke('set-tunnel-mode', tabId, mode); },
|
|
startRelay: function(tabId) { return ipcRenderer.invoke('start-relay', tabId); },
|
|
closeTab: function(tabId) { return ipcRenderer.invoke('close-tab', tabId); },
|
|
startBot: function(settings) { return ipcRenderer.invoke('start-bot', settings); },
|
|
stopBot: function() { return ipcRenderer.invoke('stop-bot'); },
|
|
onCreateBotTab: function(cb) { ipcRenderer.on('create-bot-tab', function(e, data) { cb(data); }); },
|
|
getCallCreatorCode: function(scriptFile) { return ipcRenderer.invoke('get-call-creator-code', scriptFile); },
|
|
onBotError: function(cb) { ipcRenderer.on('bot-error', function(e, msg) { cb(msg); }); },
|
|
getCookies: function(domain) { return ipcRenderer.invoke('get-cookies', domain); },
|
|
startHeadless: function(tabId) { return ipcRenderer.invoke('start-headless', tabId); },
|
|
onCloseBotTab: function(cb) { ipcRenderer.on('close-bot-tab', function(e, data) { cb(data); }); }
|
|
});
|