diff --git a/Desktop.Win/ViewModels/MainWindowViewModel.cs b/Desktop.Win/ViewModels/MainWindowViewModel.cs index 3ddfd572d..e3e91d2a7 100644 --- a/Desktop.Win/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Win/ViewModels/MainWindowViewModel.cs @@ -311,6 +311,14 @@ private void ScreenCastRequested(object sender, ScreenCastRequest screenCastRequ Services.GetRequiredService().BeginScreenCasting(screenCastRequest); }); } + else + { + // Run on another thread so it doesn't tie up the UI thread. + Task.Run(async () => + { + await CasterSocket.SendConnectionRequestDenied(screenCastRequest.ViewerID); + }); + } }); } private void SessionIDChanged(object sender, string sessionID) diff --git a/ScreenCast.Core/Communication/CasterSocket.cs b/ScreenCast.Core/Communication/CasterSocket.cs index 2d8d969d0..854b62401 100644 --- a/ScreenCast.Core/Communication/CasterSocket.cs +++ b/ScreenCast.Core/Communication/CasterSocket.cs @@ -29,12 +29,11 @@ public CasterSocket( public HubConnection Connection { get; private set; } public bool IsConnected => Connection?.State == HubConnectionState.Connected; - private IScreenCaster ScreenCaster { get; } - private IFileTransferService FileDownloadService { get; } private IAudioCapturer AudioCapturer { get; } - private IClipboardService ClipboardService { get; } + private IFileTransferService FileDownloadService { get; } private IKeyboardMouseInput KeyboardMouseInput { get; } + private IScreenCaster ScreenCaster { get; } public async Task Connect(string host) { if (Connection != null) @@ -89,6 +88,11 @@ public async Task SendConnectionFailedToViewers(List viewerIDs) await Connection.SendAsync("SendConnectionFailedToViewers", viewerIDs); } + public async Task SendConnectionRequestDenied(string viewerID) + { + await Connection.SendAsync("SendConnectionRequestDenied", viewerID); + } + public async Task SendCtrlAltDel() { await Connection.SendAsync("CtrlAltDel"); diff --git a/Server/Services/RCBrowserSocketHub.cs b/Server/Services/RCBrowserSocketHub.cs index 2bfd31eea..80e7474da 100644 --- a/Server/Services/RCBrowserSocketHub.cs +++ b/Server/Services/RCBrowserSocketHub.cs @@ -134,6 +134,11 @@ public Task SelectScreen(string displayName) return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("SelectScreen", displayName, Context.ConnectionId); } + public Task SendAutoQualityAdjust(bool isOn) + { + return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("AutoQualityAdjust", isOn, Context.ConnectionId); + } + public Task SendClipboardTransfer(string transferText, bool typeText) { return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ClipboardTransfer", transferText, typeText, Context.ConnectionId); @@ -143,15 +148,18 @@ public Task SendFrameReceived(int bytesReceived) { return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("FrameReceived", bytesReceived, Context.ConnectionId); } + public Task SendIceCandidateToAgent(string candidate, int sdpMlineIndex, string sdpMid) + { + return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ReceiveIceCandidate", candidate, sdpMlineIndex, sdpMid, Context.ConnectionId); + } public Task SendQualityChange(int qualityLevel) { return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("QualityChange", qualityLevel, Context.ConnectionId); } - - public Task SendAutoQualityAdjust(bool isOn) + public Task SendRtcAnswerToAgent(string sdp) { - return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("AutoQualityAdjust", isOn, Context.ConnectionId); + return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ReceiveRtcAnswer", sdp, Context.ConnectionId); } public async Task SendScreenCastRequestToDevice(string screenCasterID, string requesterName, int remoteControlMode) @@ -260,15 +268,5 @@ public Task TouchUp() { return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("TouchUp", Context.ConnectionId); } - - public Task SendIceCandidateToAgent(string candidate, int sdpMlineIndex, string sdpMid) - { - return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ReceiveIceCandidate", candidate, sdpMlineIndex, sdpMid, Context.ConnectionId); - } - - public Task SendRtcAnswerToAgent(string sdp) - { - return RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ReceiveRtcAnswer", sdp, Context.ConnectionId); - } } } diff --git a/Server/Services/RCDeviceSocketHub.cs b/Server/Services/RCDeviceSocketHub.cs index 4904f98a8..29f79ed2f 100644 --- a/Server/Services/RCDeviceSocketHub.cs +++ b/Server/Services/RCDeviceSocketHub.cs @@ -162,36 +162,39 @@ public Task SendConnectionFailedToViewers(List viewerIDs) { return RCBrowserHub.Clients.Clients(viewerIDs).SendAsync("ConnectionFailed"); } - - public Task SendCursorChange(CursorInfo cursor, string viewerID) + public Task SendConnectionRequestDenied(string viewerID) { - return RCBrowserHub.Clients.Client(viewerID).SendAsync("CursorChange", cursor); + return RCBrowserHub.Clients.Client(viewerID).SendAsync("ConnectionRequestDenied"); } - - public Task SendMachineName(string machineName, string viewerID) + public Task SendCursorChange(CursorInfo cursor, string viewerID) { - return RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveMachineName", machineName); + return RCBrowserHub.Clients.Client(viewerID).SendAsync("CursorChange", cursor); } - public Task SendRtcOfferToBrowser(string sdp, string viewerID) + public Task SendIceCandidateToBrowser(string candidate, int sdpMlineIndex, string sdpMid, string viewerID) { if (AppConfig.UseWebRtc) { - return RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveRtcOffer", sdp); + return RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveIceCandidate", candidate, sdpMlineIndex, sdpMid); } return Task.CompletedTask; } - public Task SendIceCandidateToBrowser(string candidate, int sdpMlineIndex, string sdpMid, string viewerID) + + public Task SendMachineName(string machineName, string viewerID) + { + return RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveMachineName", machineName); + } + + public Task SendRtcOfferToBrowser(string sdp, string viewerID) { if (AppConfig.UseWebRtc) { - return RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveIceCandidate", candidate, sdpMlineIndex, sdpMid); + return RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveRtcOffer", sdp); } return Task.CompletedTask; } - public Task SendScreenCapture(byte[] captureBytes, string rcBrowserHubConnectionID, int left, int top, int width, int height, long imageQuality) { if (AppConfig.RecordRemoteControlSessions) diff --git a/Server/wwwroot/scripts/RemoteControl/MessageSender.js b/Server/wwwroot/scripts/RemoteControl/MessageSender.js index faa26f71a..bf4224fe6 100644 --- a/Server/wwwroot/scripts/RemoteControl/MessageSender.js +++ b/Server/wwwroot/scripts/RemoteControl/MessageSender.js @@ -72,7 +72,7 @@ export class MessageSender { if (MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open") { rtcSend(); } - else { + else if (MainRc.RCBrowserSockets.Connection.connectionStarted) { websocketSend(); } } diff --git a/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map b/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map index 0709724fd..127782286 100644 --- a/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map +++ b/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map @@ -1 +1 @@ -{"version":3,"file":"MessageSender.js","sourceRoot":"","sources":["MessageSender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACH,aAAa,EACb,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EAEpB,OAAO,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,OAAO,aAAa;IACtB,gBAAgB,CAAC,WAAmB;QAChC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC,EAC9E,GAAG,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,aAAa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,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtE,CAAC;IACD,qBAAqB,CAAC,IAAY,EAAE,QAAiB;QACjD,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,EACtF,GAAG,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC7E,CAAC;IAEO,iBAAiB;QACrB,OAAO,MAAM,CAAC,UAAU,CAAC,WAAW,IAAI,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,UAAU,IAAI,MAAM,CAAC;IAC/F,CAAC;IAEO,WAAW,CAAC,OAAmB,EAAE,aAAyB;QAC9D,IAAI,MAAM,CAAC,UAAU,CAAC,WAAW,IAAI,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,UAAU,IAAI,MAAM,EAAE;YACrF,OAAO,EAAE,CAAC;SACb;aACI;YACD,aAAa,EAAE,CAAC;SACnB;IACL,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,OAA2B,EAAE,aAAiC;QACzF,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YAC1B,MAAM,OAAO,EAAE,CAAC;SACnB;aACI;YACD,MAAM,aAAa,EAAE,CAAC;SACzB;IACL,CAAC;CAGJ"} \ No newline at end of file +{"version":3,"file":"MessageSender.js","sourceRoot":"","sources":["MessageSender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACH,aAAa,EACb,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,OAAO,EACV,MAAM,c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AI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YAC1B,MAAM,OAAO,EAAE,CAAC;SACnB;aACI;YACD,MAAM,aAAa,EAAE,CAAC;SACzB;IACL,CAAC;CAGJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/MessageSender.ts b/Server/wwwroot/scripts/RemoteControl/MessageSender.ts index 3f36786ec..5d73fa25f 100644 --- a/Server/wwwroot/scripts/RemoteControl/MessageSender.ts +++ b/Server/wwwroot/scripts/RemoteControl/MessageSender.ts @@ -1,134 +1,134 @@ -import { MainRc } from "./Main.js"; -import { - CtrlAltDelDto, - KeyDownDto, - KeyPressDto, - KeyUpDto, - MouseDownDto, - MouseMoveDto, - MouseUpDto, - MouseWheelDto, - QualityChangeDto, - SelectScreenDto, - TapDto, - AutoQualityAdjustDto, - ToggleAudioDto, - ToggleBlockInputDto, - ClipboardTransferDto, +import { MainRc } from "./Main.js"; +import { + CtrlAltDelDto, + KeyDownDto, + KeyPressDto, + KeyUpDto, + MouseDownDto, + MouseMoveDto, + MouseUpDto, + MouseWheelDto, + QualityChangeDto, + SelectScreenDto, + TapDto, + AutoQualityAdjustDto, + ToggleAudioDto, + ToggleBlockInputDto, + ClipboardTransferDto, FileDto -} from "./RtcDtos.js"; -import { CreateGUID, When } from "../Utilities.js"; -import { FileTransferProgress } from "./UI.js"; - -export class MessageSender { - SendSelectScreen(displayName: string) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new SelectScreenDto(displayName)), - () => MainRc.RCBrowserSockets.SendSelectScreen(displayName)); - } - SendMouseMove(percentX: number, percentY: number) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseMoveDto(percentX, percentY)), - () => MainRc.RCBrowserSockets.SendMouseMove(percentX, percentY)); - } - SendMouseDown(button: number, percentX: number, percentY: number) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseDownDto(button, percentX, percentY)), - () => MainRc.RCBrowserSockets.SendMouseDown(button, percentX, percentY)); - } - SendMouseUp(button: number, percentX: number, percentY: number) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseUpDto(button, percentX, percentY)), - () => MainRc.RCBrowserSockets.SendMouseUp(button, percentX, percentY)); - } - SendTap(percentX: number, percentY: number) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new TapDto(percentX, percentY)), - () => MainRc.RCBrowserSockets.SendTap(percentX, percentY)); - } - SendMouseWheel(deltaX: number, deltaY: number) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseWheelDto(deltaX, deltaY)), - () => MainRc.RCBrowserSockets.SendMouseWheel(deltaX, deltaY)); - } - SendKeyDown(key: string) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyDownDto(key)), - () => MainRc.RCBrowserSockets.SendKeyDown(key)); - } - SendKeyUp(key: string) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyUpDto(key)), - () => MainRc.RCBrowserSockets.SendKeyUp(key)); - } - SendKeyPress(key: string) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyPressDto(key)), - () => MainRc.RCBrowserSockets.SendKeyPress(key)); - } - - SendCtrlAltDel() { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new CtrlAltDelDto()), - () => MainRc.RCBrowserSockets.SendCtrlAltDel()); - } - - async SendFile(buffer: Uint8Array, fileName: string) { - var messageId = CreateGUID(); - - this.SendToAgent(() => MainRc.RtcSession.SendDto(new FileDto(null, fileName, messageId, false, true)), - () => MainRc.RCBrowserSockets.SendFile(null, fileName, messageId, false, true)); - - for (var i = 0; i < buffer.byteLength; i += 50_000) { - - await this.SendToAgentAsync(async () => { - MainRc.RtcSession.SendDto(new FileDto(buffer.slice(i, i + 50_000), fileName, messageId, false, false)); - await When(() => MainRc.RtcSession.DataChannel.bufferedAmount == 0, 10); - }, async () => { - await MainRc.RCBrowserSockets.SendFile(buffer.slice(i, i + 50_000), fileName, messageId, false, false); - }); - - if (i > 0) { - FileTransferProgress.value = i / buffer.byteLength; - } - } - - this.SendToAgent(() => MainRc.RtcSession.SendDto(new FileDto(null, fileName, messageId, true, false)), - () => MainRc.RCBrowserSockets.SendFile(null, fileName, messageId, true, false)); - } - - SendQualityChange(qualityLevel: number) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new QualityChangeDto(qualityLevel)), - () => MainRc.RCBrowserSockets.SendQualityChange(qualityLevel)); - } - SendAutoQualityAdjust(isOn: boolean) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new AutoQualityAdjustDto(isOn)), - () => MainRc.RCBrowserSockets.SendAutoQualityAdjust(isOn)); - } - SendToggleAudio(toggleOn: boolean) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new ToggleAudioDto(toggleOn)), - () => MainRc.RCBrowserSockets.SendToggleAudio(toggleOn)); - }; - SendToggleBlockInput(toggleOn: boolean) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new ToggleBlockInputDto(toggleOn)), - () => MainRc.RCBrowserSockets.SendToggleBlockInput(toggleOn)); - } - SendClipboardTransfer(text: string, typeText: boolean) { - this.SendToAgent(() => MainRc.RtcSession.SendDto(new ClipboardTransferDto(text, typeText)), - () => MainRc.RCBrowserSockets.SendClipboardTransfer(text, typeText)); - } - - private IsWebRtcAvailable() { - return MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open"; - } - - private SendToAgent(rtcSend: () => void, websocketSend: () => void) { - if (MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open") { - rtcSend(); - } - else { - websocketSend(); - } - } - - private async SendToAgentAsync(rtcSend: () => Promise, websocketSend: () => Promise) { - if (this.IsWebRtcAvailable()) { - await rtcSend(); - } - else { - await websocketSend(); - } - } - - +} from "./RtcDtos.js"; +import { CreateGUID, When } from "../Utilities.js"; +import { FileTransferProgress } from "./UI.js"; + +export class MessageSender { + SendSelectScreen(displayName: string) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new SelectScreenDto(displayName)), + () => MainRc.RCBrowserSockets.SendSelectScreen(displayName)); + } + SendMouseMove(percentX: number, percentY: number) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseMoveDto(percentX, percentY)), + () => MainRc.RCBrowserSockets.SendMouseMove(percentX, percentY)); + } + SendMouseDown(button: number, percentX: number, percentY: number) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseDownDto(button, percentX, percentY)), + () => MainRc.RCBrowserSockets.SendMouseDown(button, percentX, percentY)); + } + SendMouseUp(button: number, percentX: number, percentY: number) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseUpDto(button, percentX, percentY)), + () => MainRc.RCBrowserSockets.SendMouseUp(button, percentX, percentY)); + } + SendTap(percentX: number, percentY: number) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new TapDto(percentX, percentY)), + () => MainRc.RCBrowserSockets.SendTap(percentX, percentY)); + } + SendMouseWheel(deltaX: number, deltaY: number) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseWheelDto(deltaX, deltaY)), + () => MainRc.RCBrowserSockets.SendMouseWheel(deltaX, deltaY)); + } + SendKeyDown(key: string) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyDownDto(key)), + () => MainRc.RCBrowserSockets.SendKeyDown(key)); + } + SendKeyUp(key: string) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyUpDto(key)), + () => MainRc.RCBrowserSockets.SendKeyUp(key)); + } + SendKeyPress(key: string) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyPressDto(key)), + () => MainRc.RCBrowserSockets.SendKeyPress(key)); + } + + SendCtrlAltDel() { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new CtrlAltDelDto()), + () => MainRc.RCBrowserSockets.SendCtrlAltDel()); + } + + async SendFile(buffer: Uint8Array, fileName: string) { + var messageId = CreateGUID(); + + this.SendToAgent(() => MainRc.RtcSession.SendDto(new FileDto(null, fileName, messageId, false, true)), + () => MainRc.RCBrowserSockets.SendFile(null, fileName, messageId, false, true)); + + for (var i = 0; i < buffer.byteLength; i += 50_000) { + + await this.SendToAgentAsync(async () => { + MainRc.RtcSession.SendDto(new FileDto(buffer.slice(i, i + 50_000), fileName, messageId, false, false)); + await When(() => MainRc.RtcSession.DataChannel.bufferedAmount == 0, 10); + }, async () => { + await MainRc.RCBrowserSockets.SendFile(buffer.slice(i, i + 50_000), fileName, messageId, false, false); + }); + + if (i > 0) { + FileTransferProgress.value = i / buffer.byteLength; + } + } + + this.SendToAgent(() => MainRc.RtcSession.SendDto(new FileDto(null, fileName, messageId, true, false)), + () => MainRc.RCBrowserSockets.SendFile(null, fileName, messageId, true, false)); + } + + SendQualityChange(qualityLevel: number) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new QualityChangeDto(qualityLevel)), + () => MainRc.RCBrowserSockets.SendQualityChange(qualityLevel)); + } + SendAutoQualityAdjust(isOn: boolean) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new AutoQualityAdjustDto(isOn)), + () => MainRc.RCBrowserSockets.SendAutoQualityAdjust(isOn)); + } + SendToggleAudio(toggleOn: boolean) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new ToggleAudioDto(toggleOn)), + () => MainRc.RCBrowserSockets.SendToggleAudio(toggleOn)); + }; + SendToggleBlockInput(toggleOn: boolean) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new ToggleBlockInputDto(toggleOn)), + () => MainRc.RCBrowserSockets.SendToggleBlockInput(toggleOn)); + } + SendClipboardTransfer(text: string, typeText: boolean) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new ClipboardTransferDto(text, typeText)), + () => MainRc.RCBrowserSockets.SendClipboardTransfer(text, typeText)); + } + + private IsWebRtcAvailable() { + return MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open"; + } + + private SendToAgent(rtcSend: () => void, websocketSend: () => void) { + if (MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open") { + rtcSend(); + } + else if (MainRc.RCBrowserSockets.Connection.connectionStarted) { + websocketSend(); + } + } + + private async SendToAgentAsync(rtcSend: () => Promise, websocketSend: () => Promise) { + if (this.IsWebRtcAvailable()) { + await rtcSend(); + } + else { + await websocketSend(); + } + } + + } \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js index 02cd0802b..0248f0b22 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js @@ -158,6 +158,11 @@ export class RCBrowserSockets { UI.ShowMessage("Connection failed. Please reconnect."); this.Connection.stop(); }); + hubConnection.on("ConnectionRequestDenied", () => { + this.Connection.stop(); + UI.StatusMessage.innerHTML = "Connection request denied."; + UI.ShowMessage("Connection request denied."); + }); hubConnection.on("Unauthorized", () => { UI.ConnectButton.removeAttribute("disabled"); UI.StatusMessage.innerHTML = "Authorization failed."; diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map index a128e8a00..b81fcd849 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map @@ -1 +1 @@ -{"version":3,"file":"RCBrowserSockets.js","sourceRoot":"","sources":["RCBrowserSockets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,IAAI,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAShC,MAAM,OAAO,gBAAgB;IAA7B;QAEI,aAAQ,GAAkB,EAAE,CAAC;IA6NjC,CAAC;IA5NG,OAAO;QACH,IAAI,CAAC,UA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aAAa,CAAC,EAAE,CAAC,iBAAiB,EAAE,KAAK,EAAE,GAAW,EAAE,EAAE;YACtD,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACzB,MAAM,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAEjD,CAAC,CAAC,CAAC;QACH,aAAa,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,SAAiB,EAAE,aAAqB,EAAE,MAAc,EAAE,EAAE;YACjG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC;gBAC/B,SAAS,EAAE,SAAS;gBACpB,aAAa,EAAE,aAAa;gBAC5B,MAAM,EAAE,MAAM;aACV,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QACH,aAAa,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,OAAe,EAAE,EAAE;YAChD,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts index 9eda0eb7a..becdf86ec 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts @@ -9,6 +9,7 @@ var signalR = window["signalR"]; type HubConnection = { start: () => Promise; + connectionStarted: boolean; closedCallbacks: any[]; invoke: (...rest) => any; stop: () => any; @@ -176,6 +177,11 @@ export class RCBrowserSockets { UI.ShowMessage("Connection failed. Please reconnect."); this.Connection.stop(); }); + hubConnection.on("ConnectionRequestDenied", () => { + this.Connection.stop(); + UI.StatusMessage.innerHTML = "Connection request denied."; + UI.ShowMessage("Connection request denied."); + }); hubConnection.on("Unauthorized", () => { UI.ConnectButton.removeAttribute("disabled"); UI.StatusMessage.innerHTML = "Authorization failed.";