mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved MeshCmd.
This commit is contained in:
parent
143d4cb647
commit
2a835d25cd
20 changed files with 174 additions and 121 deletions
|
@ -99,11 +99,8 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) {
|
|||
if (obj.webrtc != null) {
|
||||
obj.webchannel = obj.webrtc.createDataChannel("DataChannel", {}); // { ordered: false, maxRetransmits: 2 }
|
||||
obj.webchannel.onmessage = function (event) { obj.xxOnMessage({ data: event.data }); };
|
||||
obj.webchannel.onopen = function () {
|
||||
obj.webRtcActive = true;
|
||||
performWebRtcSwitch();
|
||||
};
|
||||
obj.webchannel.onclose = function (event) { /*console.log('WebRTC close');*/ obj.Stop(); }
|
||||
obj.webchannel.onopen = function () { obj.webRtcActive = true; performWebRtcSwitch(); };
|
||||
obj.webchannel.onclose = function (event) { /*console.log('WebRTC close');*/ if (obj.webRtcActive) { obj.Stop(); } }
|
||||
obj.webrtc.onicecandidate = function (e) {
|
||||
if (e.candidate == null) {
|
||||
obj.socket.send(JSON.stringify(obj.webrtcoffer)); // End of candidates, send the offer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue