2020-04-16 23:01:29 +00:00
|
|
|
|
2020-04-16 03:58:28 +00:00
|
|
|
ipcRenderer.on('close', function (event, data) {
|
|
|
|
});
|
|
|
|
var running = false;
|
|
|
|
function connect() {
|
2022-03-07 11:29:19 +00:00
|
|
|
$('#startBtn').addClass('btn-danger').removeClass('btn-dark');
|
|
|
|
$("#startBtn").html("End Streamer");
|
|
|
|
running = true;
|
2022-05-01 17:09:59 +00:00
|
|
|
ipcRenderer.send('connect', { ip: clientSettings.ip, q: clientSettings.quality, disableVideo: clientSettings.disableVideo, disableAudio: clientSettings.disableAudio, abxySwap: clientSettings.abxySwap, encoding: clientSettings.encoding, limitFPS: clientSettings.limitFPS, mouseControl: clientSettings.mouseControl, vsync: clientSettings.vsync, monitorID: clientSettings.monitorID});
|
2020-04-16 03:58:28 +00:00
|
|
|
}
|
|
|
|
function disconnect() {
|
2022-03-07 11:29:19 +00:00
|
|
|
$("#startBtn").addClass('btn-dark').removeClass('btn-danger');
|
|
|
|
$("#startBtn").html("Start Streamer");
|
2020-04-16 03:58:28 +00:00
|
|
|
ipcRenderer.send('kill');
|
2022-03-07 11:29:19 +00:00
|
|
|
running = false;
|
2020-04-16 03:58:28 +00:00
|
|
|
}
|
|
|
|
function restart() {
|
2022-03-07 11:29:19 +00:00
|
|
|
if (running) {
|
2022-05-01 17:09:59 +00:00
|
|
|
ipcRenderer.send('restart', { ip: clientSettings.ip, q: clientSettings.quality, disableVideo: clientSettings.disableVideo, disableAudio: clientSettings.disableAudio, abxySwap: clientSettings.abxySwap, encoding: clientSettings.encoding, limitFPS: clientSettings.limitFPS, mouseControl: clientSettings.mouseControl, vsync: clientSettings.vsync, monitorID: clientSettings.monitorID});
|
2022-03-07 11:29:19 +00:00
|
|
|
}
|
2020-04-16 03:58:28 +00:00
|
|
|
}
|
|
|
|
$('#startBtn').click(function () {
|
|
|
|
if (!running) {
|
|
|
|
connect();
|
|
|
|
} else {
|
|
|
|
disconnect();
|
|
|
|
}
|
|
|
|
});
|
2020-04-26 22:08:05 +00:00
|
|
|
$('#donateBtn').click(function () {
|
|
|
|
ipcRenderer.send('donate');
|
|
|
|
});
|
2020-04-24 03:05:54 +00:00
|
|
|
$("#main-btn").click(function () {
|
|
|
|
$(".contentArea").hide();
|
|
|
|
$("#main").fadeIn(400);
|
|
|
|
$('#main-btn').tooltip('hide');
|
2020-04-26 22:56:40 +00:00
|
|
|
});
|