SkyNX/SkyNX-Streamer/js/main.js

36 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-04-16 03:58:28 +00:00
ipcRenderer.on('close', function (event, data) {
});
var running = false;
function connect() {
$('#startBtn').addClass('btn-danger').removeClass('btn-dark');
$("#startBtn").html("End Streamer");
running = true;
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() {
$("#startBtn").addClass('btn-dark').removeClass('btn-danger');
$("#startBtn").html("Start Streamer");
2020-04-16 03:58:28 +00:00
ipcRenderer.send('kill');
running = false;
2020-04-16 03:58:28 +00:00
}
function restart() {
if (running) {
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});
}
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
});