From d28498898511607754c4512e40aa8e6a6e837765 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Tue, 14 Apr 2020 16:46:31 -0700 Subject: [PATCH] Add WebRTC DTOs. --- .../Properties/PublishProfiles/win-x64.pubxml | 2 +- Server/Server.csproj | 16 +- Server/wwwroot/scripts/Enums/BinaryDtoType.js | 26 +++ .../scripts/Enums/BinaryDtoType.js.map | 1 + Server/wwwroot/scripts/Enums/BinaryDtoType.ts | 24 +++ .../wwwroot/scripts/Enums/DynamicDtoType.js | 9 - .../scripts/Enums/DynamicDtoType.js.map | 1 - .../wwwroot/scripts/Enums/DynamicDtoType.ts | 7 - .../scripts/RemoteControl/BinaryDto.js | 1 + .../scripts/RemoteControl/BinaryDto.js.map | 1 + .../scripts/RemoteControl/BinaryDto.ts | 5 + .../scripts/RemoteControl/ClipboardWatcher.js | 4 +- .../RemoteControl/ClipboardWatcher.js.map | 2 +- .../scripts/RemoteControl/ClipboardWatcher.ts | 4 +- .../scripts/RemoteControl/DynamicDto.js | 1 - .../scripts/RemoteControl/DynamicDto.js.map | 1 - .../scripts/RemoteControl/DynamicDto.ts | 5 - Server/wwwroot/scripts/RemoteControl/Main.js | 18 +- .../wwwroot/scripts/RemoteControl/Main.js.map | 2 +- Server/wwwroot/scripts/RemoteControl/Main.ts | 18 +- .../scripts/RemoteControl/MessageSender.js | 59 ++++++ .../RemoteControl/MessageSender.js.map | 1 + .../scripts/RemoteControl/MessageSender.ts | 92 +++++++++ .../scripts/RemoteControl/RCBrowserSockets.js | 30 +-- .../RemoteControl/RCBrowserSockets.js.map | 2 +- .../scripts/RemoteControl/RCBrowserSockets.ts | 29 +-- .../wwwroot/scripts/RemoteControl/RtcDtos.js | 99 +++++++++ .../scripts/RemoteControl/RtcDtos.js.map | 1 + .../wwwroot/scripts/RemoteControl/RtcDtos.ts | 188 ++++++++++++++++++ .../RemoteControl/RtcDtos/CaptureFrameDto.js | 1 - .../RtcDtos/CaptureFrameDto.js.map | 1 - .../RemoteControl/RtcDtos/CaptureFrameDto.ts | 11 - .../RemoteControl/RtcDtos/ClipboardTextDto.js | 1 - .../RtcDtos/ClipboardTextDto.js.map | 1 - .../RemoteControl/RtcDtos/ClipboardTextDto.ts | 5 - .../RemoteControl/RtcDtos/MachineNameDto.js | 1 - .../RtcDtos/MachineNameDto.js.map | 1 - .../RemoteControl/RtcDtos/MachineNameDto.ts | 5 - .../RemoteControl/RtcDtos/ScreenDataDto.js | 1 - .../RtcDtos/ScreenDataDto.js.map | 1 - .../RemoteControl/RtcDtos/ScreenDataDto.ts | 6 - .../RemoteControl/RtcDtos/ScreenSizeDto.js | 1 - .../RtcDtos/ScreenSizeDto.js.map | 1 - .../RemoteControl/RtcDtos/ScreenSizeDto.ts | 6 - .../RemoteControl/RtcMessageHandler.js | 67 ++++--- .../RemoteControl/RtcMessageHandler.js.map | 2 +- .../RemoteControl/RtcMessageHandler.ts | 89 +++++---- .../scripts/RemoteControl/RtcSession.js | 14 +- .../scripts/RemoteControl/RtcSession.js.map | 2 +- .../scripts/RemoteControl/RtcSession.ts | 13 +- Server/wwwroot/scripts/RemoteControl/UI.js | 40 ++-- .../wwwroot/scripts/RemoteControl/UI.js.map | 2 +- Server/wwwroot/scripts/RemoteControl/UI.ts | 42 ++-- Shared/Enums/BinaryDtoType.cs | 53 +++++ Shared/Enums/DynamicDtoType.cs | 19 -- .../Models/{IDynamicDto.cs => IBinaryDto.cs} | 4 +- Shared/Models/RtcDtos/CaptureFrameDto.cs | 4 +- Shared/Models/RtcDtos/ClipboardTextDto.cs | 4 +- Shared/Models/RtcDtos/MachineNameDto.cs | 4 +- Shared/Models/RtcDtos/ScreenDataDto.cs | 4 +- Shared/Models/RtcDtos/ScreenSizeDto.cs | 4 +- 61 files changed, 782 insertions(+), 277 deletions(-) create mode 100644 Server/wwwroot/scripts/Enums/BinaryDtoType.js create mode 100644 Server/wwwroot/scripts/Enums/BinaryDtoType.js.map create mode 100644 Server/wwwroot/scripts/Enums/BinaryDtoType.ts delete mode 100644 Server/wwwroot/scripts/Enums/DynamicDtoType.js delete mode 100644 Server/wwwroot/scripts/Enums/DynamicDtoType.js.map delete mode 100644 Server/wwwroot/scripts/Enums/DynamicDtoType.ts create mode 100644 Server/wwwroot/scripts/RemoteControl/BinaryDto.js create mode 100644 Server/wwwroot/scripts/RemoteControl/BinaryDto.js.map create mode 100644 Server/wwwroot/scripts/RemoteControl/BinaryDto.ts delete mode 100644 Server/wwwroot/scripts/RemoteControl/DynamicDto.js delete mode 100644 Server/wwwroot/scripts/RemoteControl/DynamicDto.js.map delete mode 100644 Server/wwwroot/scripts/RemoteControl/DynamicDto.ts create mode 100644 Server/wwwroot/scripts/RemoteControl/MessageSender.js create mode 100644 Server/wwwroot/scripts/RemoteControl/MessageSender.js.map create mode 100644 Server/wwwroot/scripts/RemoteControl/MessageSender.ts create mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos.js create mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map create mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos.ts delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js.map delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.ts delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js.map delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.ts delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js.map delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.ts delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js.map delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.ts delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js.map delete mode 100644 Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.ts create mode 100644 Shared/Enums/BinaryDtoType.cs delete mode 100644 Shared/Enums/DynamicDtoType.cs rename Shared/Models/{IDynamicDto.cs => IBinaryDto.cs} (53%) diff --git a/Desktop.Win/Properties/PublishProfiles/win-x64.pubxml b/Desktop.Win/Properties/PublishProfiles/win-x64.pubxml index 07b73b6e4..29fb19719 100644 --- a/Desktop.Win/Properties/PublishProfiles/win-x64.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/win-x64.pubxml @@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. netcoreapp3.1 ..\Server\wwwroot\Downloads\Win-x64\ win10-x64 - True + true True False True diff --git a/Server/Server.csproj b/Server/Server.csproj index d10530e53..1248ddf2a 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -45,9 +45,7 @@ - - - + @@ -55,7 +53,6 @@ - @@ -156,18 +153,9 @@ - - + - - - Code - - - Code - - diff --git a/Server/wwwroot/scripts/Enums/BinaryDtoType.js b/Server/wwwroot/scripts/Enums/BinaryDtoType.js new file mode 100644 index 000000000..8ef28862e --- /dev/null +++ b/Server/wwwroot/scripts/Enums/BinaryDtoType.js @@ -0,0 +1,26 @@ +export var BinaryDtoType; +(function (BinaryDtoType) { + BinaryDtoType[BinaryDtoType["CaptureFrame"] = 0] = "CaptureFrame"; + BinaryDtoType[BinaryDtoType["ScreenData"] = 1] = "ScreenData"; + BinaryDtoType[BinaryDtoType["ScreenSize"] = 2] = "ScreenSize"; + BinaryDtoType[BinaryDtoType["MachineName"] = 3] = "MachineName"; + BinaryDtoType[BinaryDtoType["ClipboardText"] = 4] = "ClipboardText"; + BinaryDtoType[BinaryDtoType["AudioSample"] = 5] = "AudioSample"; + BinaryDtoType[BinaryDtoType["CursorChange"] = 6] = "CursorChange"; + BinaryDtoType[BinaryDtoType["SelectScreen"] = 7] = "SelectScreen"; + BinaryDtoType[BinaryDtoType["MouseMove"] = 8] = "MouseMove"; + BinaryDtoType[BinaryDtoType["MouseDown"] = 9] = "MouseDown"; + BinaryDtoType[BinaryDtoType["MouseUp"] = 10] = "MouseUp"; + BinaryDtoType[BinaryDtoType["Tap"] = 11] = "Tap"; + BinaryDtoType[BinaryDtoType["MouseWheel"] = 12] = "MouseWheel"; + BinaryDtoType[BinaryDtoType["KeyDown"] = 13] = "KeyDown"; + BinaryDtoType[BinaryDtoType["KeyUp"] = 14] = "KeyUp"; + BinaryDtoType[BinaryDtoType["CtrlAltDel"] = 15] = "CtrlAltDel"; + BinaryDtoType[BinaryDtoType["AutoQualityAdjust"] = 16] = "AutoQualityAdjust"; + BinaryDtoType[BinaryDtoType["ToggleAudio"] = 17] = "ToggleAudio"; + BinaryDtoType[BinaryDtoType["ToggleBlockInput"] = 18] = "ToggleBlockInput"; + BinaryDtoType[BinaryDtoType["ClipboardTransfer"] = 19] = "ClipboardTransfer"; + BinaryDtoType[BinaryDtoType["KeyPress"] = 20] = "KeyPress"; + BinaryDtoType[BinaryDtoType["QualityChange"] = 21] = "QualityChange"; +})(BinaryDtoType || (BinaryDtoType = {})); +//# sourceMappingURL=BinaryDtoType.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/Enums/BinaryDtoType.js.map b/Server/wwwroot/scripts/Enums/BinaryDtoType.js.map new file mode 100644 index 000000000..542a95d96 --- /dev/null +++ b/Server/wwwroot/scripts/Enums/BinaryDtoType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BinaryDtoType.js","sourceRoot":"","sources":["BinaryDtoType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAuBX;AAvBD,WAAY,aAAa;IACrB,iEAAgB,CAAA;IAChB,6DAAc,CAAA;IACd,6DAAc,CAAA;IACd,+DAAe,CAAA;IACf,mEAAiB,CAAA;IACjB,+DAAe,CAAA;IACf,iEAAgB,CAAA;IAChB,iEAAgB,CAAA;IAChB,2DAAa,CAAA;IACb,2DAAa,CAAA;IACb,wDAAY,CAAA;IACZ,gDAAQ,CAAA;IACR,8DAAe,CAAA;IACf,wDAAY,CAAA;IACZ,oDAAU,CAAA;IACV,8DAAe,CAAA;IACf,4EAAsB,CAAA;IACtB,gEAAgB,CAAA;IAChB,0EAAqB,CAAA;IACrB,4EAAsB,CAAA;IACtB,0DAAa,CAAA;IACb,oEAAkB,CAAA;AACtB,CAAC,EAvBW,aAAa,KAAb,aAAa,QAuBxB"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/Enums/BinaryDtoType.ts b/Server/wwwroot/scripts/Enums/BinaryDtoType.ts new file mode 100644 index 000000000..d953d3849 --- /dev/null +++ b/Server/wwwroot/scripts/Enums/BinaryDtoType.ts @@ -0,0 +1,24 @@ +export enum BinaryDtoType { + CaptureFrame = 0, + ScreenData = 1, + ScreenSize = 2, + MachineName = 3, + ClipboardText = 4, + AudioSample = 5, + CursorChange = 6, + SelectScreen = 7, + MouseMove = 8, + MouseDown = 9, + MouseUp = 10, + Tap = 11, + MouseWheel = 12, + KeyDown = 13, + KeyUp = 14, + CtrlAltDel = 15, + AutoQualityAdjust = 16, + ToggleAudio = 17, + ToggleBlockInput = 18, + ClipboardTransfer = 19, + KeyPress = 20, + QualityChange = 21 +} \ No newline at end of file diff --git a/Server/wwwroot/scripts/Enums/DynamicDtoType.js b/Server/wwwroot/scripts/Enums/DynamicDtoType.js deleted file mode 100644 index 2eae92a39..000000000 --- a/Server/wwwroot/scripts/Enums/DynamicDtoType.js +++ /dev/null @@ -1,9 +0,0 @@ -export var DynamicDtoType; -(function (DynamicDtoType) { - DynamicDtoType[DynamicDtoType["CaptureFrame"] = 0] = "CaptureFrame"; - DynamicDtoType[DynamicDtoType["ScreenData"] = 1] = "ScreenData"; - DynamicDtoType[DynamicDtoType["ScreenSize"] = 2] = "ScreenSize"; - DynamicDtoType[DynamicDtoType["MachineName"] = 3] = "MachineName"; - DynamicDtoType[DynamicDtoType["ClipboardText"] = 4] = "ClipboardText"; -})(DynamicDtoType || (DynamicDtoType = {})); -//# sourceMappingURL=DynamicDtoType.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/Enums/DynamicDtoType.js.map b/Server/wwwroot/scripts/Enums/DynamicDtoType.js.map deleted file mode 100644 index a405fc6c5..000000000 --- a/Server/wwwroot/scripts/Enums/DynamicDtoType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DynamicDtoType.js","sourceRoot":"","sources":["DynamicDtoType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACtB,mEAAgB,CAAA;IAChB,+DAAc,CAAA;IACd,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,qEAAa,CAAA;AACjB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/Enums/DynamicDtoType.ts b/Server/wwwroot/scripts/Enums/DynamicDtoType.ts deleted file mode 100644 index 41e287834..000000000 --- a/Server/wwwroot/scripts/Enums/DynamicDtoType.ts +++ /dev/null @@ -1,7 +0,0 @@ -export enum DynamicDtoType { - CaptureFrame = 0, - ScreenData = 1, - ScreenSize = 2, - MachineName = 3, - ClipboardText -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/BinaryDto.js b/Server/wwwroot/scripts/RemoteControl/BinaryDto.js new file mode 100644 index 000000000..2fe1c3584 --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/BinaryDto.js @@ -0,0 +1 @@ +//# sourceMappingURL=BinaryDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/BinaryDto.js.map b/Server/wwwroot/scripts/RemoteControl/BinaryDto.js.map new file mode 100644 index 000000000..15b668622 --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/BinaryDto.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BinaryDto.js","sourceRoot":"","sources":["BinaryDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/BinaryDto.ts b/Server/wwwroot/scripts/RemoteControl/BinaryDto.ts new file mode 100644 index 000000000..7e7df83ce --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/BinaryDto.ts @@ -0,0 +1,5 @@ +import { BinaryDtoType } from "../Enums/BinaryDtoType.js"; + +export interface BinaryDto { + DtoType: BinaryDtoType +} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js index cb8eca020..51e060c29 100644 --- a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js +++ b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js @@ -1,5 +1,5 @@ import { ClipboardTransferTextArea } from "./UI.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; export class ClipboardWatcher { WatchClipboard() { navigator.clipboard.readText().then(currentText => { @@ -15,7 +15,7 @@ export class ClipboardWatcher { if (this.LastClipboardText != newText) { this.LastClipboardText = newText; ClipboardTransferTextArea.value = newText; - Remotely.RCBrowserSockets.SendClipboardTransfer(newText, false); + MainRc.RCBrowserSockets.SendClipboardTransfer(newText, false); } }); }, 100); diff --git a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map index c6fc36ba0..72f1f67f6 100644 --- a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map +++ b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map @@ -1 +1 @@ -{"version":3,"file":"ClipboardWatcher.js","sourceRoot":"","sources":["ClipboardWatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBA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AAS,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,OAAO,gBAAgB;IAKzB,cAAc;QACV,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC9C,IAAI,CAAC,iBAAiB,GAAG,WAAW,CAAC;YAErC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;gBACnC,IAAI,IAAI,CAAC,eAAe,EAAE;oBACtB,OAAO;iBACV;gBACD,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE;oBACtB,OAAO;iBACV;gBAED,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;oBAC1C,IAAI,IAAI,CAAC,iBAAiB,IAAI,OAAO,EAAE;wBACnC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC;wBACjC,yBAAyB,CAAC,KAAK,GAAG,OAAO,CAAC;wBAC1C,MAAM,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;qBACjE;gBACL,CAAC,CAAC,CAAA;YACN,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,CAAC,CAAC,CAAC;IACP,CAAC;IAED,gBAAgB,CAAC,IAAY;QACzB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpC,yBAAyB,CAAC,KAAK,GAAG,IAAI,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IACjC,CAAC;CACJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts index 26494c31e..9450c8619 100644 --- a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts +++ b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts @@ -1,5 +1,5 @@ import { ClipboardTransferTextArea } from "./UI.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; export class ClipboardWatcher { ClipboardTimer: number; @@ -22,7 +22,7 @@ export class ClipboardWatcher { if (this.LastClipboardText != newText) { this.LastClipboardText = newText; ClipboardTransferTextArea.value = newText; - Remotely.RCBrowserSockets.SendClipboardTransfer(newText, false); + MainRc.RCBrowserSockets.SendClipboardTransfer(newText, false); } }) }, 100); diff --git a/Server/wwwroot/scripts/RemoteControl/DynamicDto.js b/Server/wwwroot/scripts/RemoteControl/DynamicDto.js deleted file mode 100644 index 77146fc45..000000000 --- a/Server/wwwroot/scripts/RemoteControl/DynamicDto.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=DynamicDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/DynamicDto.js.map b/Server/wwwroot/scripts/RemoteControl/DynamicDto.js.map deleted file mode 100644 index 713de04ee..000000000 --- a/Server/wwwroot/scripts/RemoteControl/DynamicDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DynamicDto.js","sourceRoot":"","sources":["DynamicDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/DynamicDto.ts b/Server/wwwroot/scripts/RemoteControl/DynamicDto.ts deleted file mode 100644 index 68fe2cd88..000000000 --- a/Server/wwwroot/scripts/RemoteControl/DynamicDto.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DynamicDtoType } from "../Enums/DynamicDtoType.js"; - -export interface DynamicDto { - DtoType: DynamicDtoType -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/Main.js b/Server/wwwroot/scripts/RemoteControl/Main.js index b4f1fec60..fa13ad2e1 100644 --- a/Server/wwwroot/scripts/RemoteControl/Main.js +++ b/Server/wwwroot/scripts/RemoteControl/Main.js @@ -6,7 +6,7 @@ import { RemoteControlMode } from "../Enums/RemoteControlMode.js"; import { ClipboardWatcher } from "./ClipboardWatcher.js"; import { RtcMessageHandler } from "./RtcMessageHandler.js"; var queryString = Utilities.ParseSearchString(); -export const Remotely = { +export const MainRc = { ClipboardWatcher: new ClipboardWatcher(), Debug: false, RCBrowserSockets: new RCBrowserSockets(), @@ -17,11 +17,11 @@ export const Remotely = { RequesterName: queryString["requesterName"] ? decodeURIComponent(queryString["requesterName"]) : "", Mode: RemoteControlMode.None, Init: () => { - UI.ApplyInputHandlers(Remotely.RCBrowserSockets); + UI.ApplyInputHandlers(MainRc.RCBrowserSockets); if (queryString["clientID"]) { - Remotely.Mode = RemoteControlMode.Unattended; + MainRc.Mode = RemoteControlMode.Unattended; UI.ConnectBox.style.display = "none"; - Remotely.RCBrowserSockets.Connect(); + MainRc.RCBrowserSockets.Connect(); } else if (queryString["sessionID"]) { UI.SessionIDInput.value = decodeURIComponent(queryString["sessionID"]); @@ -33,12 +33,12 @@ export const Remotely = { }, ConnectToClient: () => { UI.ConnectButton.disabled = true; - Remotely.ClientID = UI.SessionIDInput.value.split(" ").join(""); - Remotely.RequesterName = UI.RequesterNameInput.value; - Remotely.Mode = RemoteControlMode.Normal; - Remotely.RCBrowserSockets.Connect(); + MainRc.ClientID = UI.SessionIDInput.value.split(" ").join(""); + MainRc.RequesterName = UI.RequesterNameInput.value; + MainRc.Mode = RemoteControlMode.Normal; + MainRc.RCBrowserSockets.Connect(); UI.StatusMessage.innerHTML = "Sending connection request..."; } }; -window["Remotely"] = Remotely; +window["Remotely"] = MainRc; //# sourceMappingURL=Main.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/Main.js.map b/Server/wwwroot/scripts/RemoteControl/Main.js.map index 4fd13fb26..7a1d8cefd 100644 --- a/Server/wwwroot/scripts/RemoteControl/Main.js.map +++ b/Server/wwwroot/scripts/RemoteControl/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","s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C,OAAO,EAAE,CAAC;SACrC;aACI,IAAI,WAAW,CAAC,WAAW,CAAC,EAAE;YAC/B,EAAE,CAAC,cAAc,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;YACvE,IAAI,WAAW,CAAC,eAAe,CAAC,EAAE;gBAC9B,EAAE,CAAC,kBAAkB,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;gBAC/E,IAAI,CAAC,eAAe,EAAE,CAAC;aAC1B;SACJ;IACL,CAAC;IACD,eAAe,EAAE,GAAG,EAAE;QAClB,EAAE,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC;QACjC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,MAAM,CAAC,aAAa,GAAG,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC;QACnD,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC;QACvC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAClC,EAAE,CAAC,aAAa,CAAC,SAAS,GAAG,+BAA+B,CAAC;IACjE,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/Main.ts b/Server/wwwroot/scripts/RemoteControl/Main.ts index ae3c099fc..8c4fd16b1 100644 --- a/Server/wwwroot/scripts/RemoteControl/Main.ts +++ b/Server/wwwroot/scripts/RemoteControl/Main.ts @@ -9,7 +9,7 @@ import { RtcMessageHandler } from "./RtcMessageHandler.js"; var queryString = Utilities.ParseSearchString(); -export const Remotely = { +export const MainRc = { ClipboardWatcher: new ClipboardWatcher(), Debug: false, RCBrowserSockets: new RCBrowserSockets(), @@ -21,12 +21,12 @@ export const Remotely = { Mode: RemoteControlMode.None, Init: () => { - UI.ApplyInputHandlers(Remotely.RCBrowserSockets); + UI.ApplyInputHandlers(MainRc.RCBrowserSockets); if (queryString["clientID"]) { - Remotely.Mode = RemoteControlMode.Unattended; + MainRc.Mode = RemoteControlMode.Unattended; UI.ConnectBox.style.display = "none"; - Remotely.RCBrowserSockets.Connect(); + MainRc.RCBrowserSockets.Connect(); } else if (queryString["sessionID"]) { UI.SessionIDInput.value = decodeURIComponent(queryString["sessionID"]); @@ -38,12 +38,12 @@ export const Remotely = { }, ConnectToClient: () => { UI.ConnectButton.disabled = true; - Remotely.ClientID = UI.SessionIDInput.value.split(" ").join(""); - Remotely.RequesterName = UI.RequesterNameInput.value; - Remotely.Mode = RemoteControlMode.Normal; - Remotely.RCBrowserSockets.Connect(); + MainRc.ClientID = UI.SessionIDInput.value.split(" ").join(""); + MainRc.RequesterName = UI.RequesterNameInput.value; + MainRc.Mode = RemoteControlMode.Normal; + MainRc.RCBrowserSockets.Connect(); UI.StatusMessage.innerHTML = "Sending connection request..."; } } -window["Remotely"] = Remotely; \ No newline at end of file +window["Remotely"] = MainRc; \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/MessageSender.js b/Server/wwwroot/scripts/RemoteControl/MessageSender.js new file mode 100644 index 000000000..6c435e5ef --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/MessageSender.js @@ -0,0 +1,59 @@ +import { MainRc } from "./Main.js"; +import { CtrlAltDelDto, KeyDownDto, KeyPressDto, KeyUpDto, MouseDownDto, MouseMoveDto, MouseUpDto, MouseWheelDto, QualityChangeDto, SelectScreenDto, TapDto, AutoQualityAdjustDto, ToggleAudioDto, ToggleBlockInputDto, ClipboardTransferDto } from "./RtcDtos.js"; +export class MessageSender { + SendSelectScreen(displayName) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new SelectScreenDto(displayName)), () => MainRc.RCBrowserSockets.SendSelectScreen(displayName)); + } + SendMouseMove(percentX, percentY) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseMoveDto(percentX, percentY)), () => MainRc.RCBrowserSockets.SendMouseMove(percentX, percentY)); + } + SendMouseDown(button, percentX, percentY) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseDownDto(button, percentX, percentY)), () => MainRc.RCBrowserSockets.SendMouseDown(button, percentX, percentY)); + } + SendMouseUp(button, percentX, percentY) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseUpDto(button, percentX, percentY)), () => MainRc.RCBrowserSockets.SendMouseUp(button, percentX, percentY)); + } + SendTap(percentX, percentY) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new TapDto(percentX, percentY)), () => MainRc.RCBrowserSockets.SendTap(percentX, percentY)); + } + SendMouseWheel(deltaX, deltaY) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new MouseWheelDto(deltaX, deltaY)), () => MainRc.RCBrowserSockets.SendMouseWheel(deltaX, deltaY)); + } + SendKeyDown(key) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyDownDto(key)), () => MainRc.RCBrowserSockets.SendKeyDown(key)); + } + SendKeyUp(key) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyUpDto(key)), () => MainRc.RCBrowserSockets.SendKeyUp(key)); + } + SendKeyPress(key) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new KeyPressDto(key)), () => MainRc.RCBrowserSockets.SendKeyPress(key)); + } + SendCtrlAltDel() { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new CtrlAltDelDto()), () => MainRc.RCBrowserSockets.SendCtrlAltDel()); + } + SendQualityChange(qualityLevel) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new QualityChangeDto(qualityLevel)), () => MainRc.RCBrowserSockets.SendQualityChange(qualityLevel)); + } + SendAutoQualityAdjust(isOn) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new AutoQualityAdjustDto(isOn)), () => MainRc.RCBrowserSockets.SendAutoQualityAdjust(isOn)); + } + SendToggleAudio(toggleOn) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new ToggleAudioDto(toggleOn)), () => MainRc.RCBrowserSockets.SendToggleAudio(toggleOn)); + } + ; + SendToggleBlockInput(toggleOn) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new ToggleBlockInputDto(toggleOn)), () => MainRc.RCBrowserSockets.SendToggleBlockInput(toggleOn)); + } + SendClipboardTransfer(text, typeText) { + this.SendToAgent(() => MainRc.RtcSession.SendDto(new ClipboardTransferDto(text, typeText)), () => MainRc.RCBrowserSockets.SendClipboardTransfer(text, typeText)); + } + SendToAgent(rtcSend, websocketSend) { + if (MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open") { + rtcSend(); + } + else { + websocketSend(); + } + } +} +//# sourceMappingURL=MessageSender.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map b/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map new file mode 100644 index 000000000..e46aa5978 --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/MessageSender.js.map @@ -0,0 +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,EACvB,MAAM,cAAc,CAAC;AAEtB,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,gB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EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC7E,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;CACJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/MessageSender.ts b/Server/wwwroot/scripts/RemoteControl/MessageSender.ts new file mode 100644 index 000000000..320d9146c --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/MessageSender.ts @@ -0,0 +1,92 @@ +import { MainRc } from "./Main.js"; +import { + CtrlAltDelDto, + KeyDownDto, + KeyPressDto, + KeyUpDto, + MouseDownDto, + MouseMoveDto, + MouseUpDto, + MouseWheelDto, + QualityChangeDto, + SelectScreenDto, + TapDto, + AutoQualityAdjustDto, + ToggleAudioDto, + ToggleBlockInputDto, + ClipboardTransferDto +} from "./RtcDtos.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()); + } + + 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 SendToAgent(rtcSend: () => void, websocketSend: () => void) { + if (MainRc.RtcSession.DataChannel && MainRc.RtcSession.DataChannel.readyState == "open") { + rtcSend(); + } + else { + websocketSend(); + } + } +} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js index cc6ffecf8..f1c969d0a 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js @@ -1,6 +1,5 @@ -import * as Utilities from "../Utilities.js"; import * as UI from "./UI.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; import { Sound } from "../Sound.js"; import { PopupMessage } from "../UI.js"; var signalR = window["signalR"]; @@ -34,7 +33,7 @@ export class RCBrowserSockets { UI.ScreenViewer.setAttribute("hidden", "hidden"); UI.ConnectBox.style.removeProperty("display"); }); - Remotely.ClipboardWatcher.WatchClipboard(); + MainRc.ClipboardWatcher.WatchClipboard(); } ; SendIceCandidate(candidate) { @@ -49,7 +48,7 @@ export class RCBrowserSockets { this.Connection.invoke("SendRtcAnswerToAgent", sessionDescription.sdp); } SendScreenCastRequestToDevice() { - this.Connection.invoke("SendScreenCastRequestToDevice", Remotely.ClientID, Remotely.RequesterName, Remotely.Mode); + this.Connection.invoke("SendScreenCastRequestToDevice", MainRc.ClientID, MainRc.RequesterName, MainRc.Mode); } SendFrameReceived(bytesReceived) { this.Connection.invoke("SendFrameReceived", bytesReceived); @@ -117,7 +116,7 @@ export class RCBrowserSockets { } ApplyMessageHandlers(hubConnection) { hubConnection.on("ClipboardTextChanged", (clipboardText) => { - Remotely.ClipboardWatcher.SetClipboardText(clipboardText); + MainRc.ClipboardWatcher.SetClipboardText(clipboardText); PopupMessage("Clipboard updated."); }); hubConnection.on("ScreenData", (selectedDisplay, displayNames) => { @@ -139,7 +138,7 @@ export class RCBrowserSockets { window.URL.revokeObjectURL(url); }; img.src = url; - if (Remotely.Debug) { + if (MainRc.Debug) { this.FpsStack.push(Date.now()); while (Date.now() - this.FpsStack[0] > 1000) { this.FpsStack.shift(); @@ -175,7 +174,7 @@ export class RCBrowserSockets { document.title = `${machineName} - Remotely Session`; }); hubConnection.on("RelaunchedScreenCasterReady", (newClientID) => { - Remotely.ClientID = newClientID; + MainRc.ClientID = newClientID; this.Connection.stop(); this.Connect(); }); @@ -183,28 +182,19 @@ export class RCBrowserSockets { UI.ShowMessage("Reconnecting..."); }); hubConnection.on("CursorChange", (cursor) => { - if (cursor.CssOverride) { - UI.ScreenViewer.style.cursor = cursor.CssOverride; - } - else if (cursor.ImageBytes.byteLength == 0) { - UI.ScreenViewer.style.cursor = "default"; - } - else { - var base64 = Utilities.ConvertUInt8ArrayToBase64(cursor.ImageBytes); - UI.ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${cursor.HotSpot.X} ${cursor.HotSpot.Y}, default`; - } + UI.UpdateCursor(cursor); }); hubConnection.on("RequestingScreenCast", () => { UI.ShowMessage("Requesting remote control..."); }); hubConnection.on("ReceiveRtcOffer", async (sdp) => { console.log("Rtc offer SDP received."); - Remotely.RtcSession.Init(); - await Remotely.RtcSession.ReceiveRtcOffer(sdp); + MainRc.RtcSession.Init(); + await MainRc.RtcSession.ReceiveRtcOffer(sdp); }); hubConnection.on("ReceiveIceCandidate", (candidate, sdpMlineIndex, sdpMid) => { console.log("Ice candidate received."); - Remotely.RtcSession.ReceiveCandidate({ + MainRc.RtcSession.ReceiveCandidate({ candidate: candidate, sdpMLineIndex: sdpMlineIndex, sdpMid: sdpMid diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map index 3057697d4..5b33c6bfd 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBr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AAa;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 d14c7a822..0295efc2d 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts @@ -1,6 +1,6 @@ import * as Utilities from "../Utilities.js"; import * as UI from "./UI.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; import { CursorInfo } from "../Models/CursorInfo.js"; import { Sound } from "../Sound.js"; import { PopupMessage } from "../UI.js"; @@ -46,7 +46,7 @@ export class RCBrowserSockets { UI.ConnectBox.style.removeProperty("display"); }); - Remotely.ClipboardWatcher.WatchClipboard(); + MainRc.ClipboardWatcher.WatchClipboard(); }; SendIceCandidate(candidate: RTCIceCandidate) { @@ -63,7 +63,7 @@ export class RCBrowserSockets { SendScreenCastRequestToDevice() { - this.Connection.invoke("SendScreenCastRequestToDevice", Remotely.ClientID, Remotely.RequesterName, Remotely.Mode); + this.Connection.invoke("SendScreenCastRequestToDevice", MainRc.ClientID, MainRc.RequesterName, MainRc.Mode); } SendFrameReceived(bytesReceived: number) { this.Connection.invoke("SendFrameReceived", bytesReceived); @@ -131,7 +131,7 @@ export class RCBrowserSockets { } private ApplyMessageHandlers(hubConnection) { hubConnection.on("ClipboardTextChanged", (clipboardText: string) => { - Remotely.ClipboardWatcher.SetClipboardText(clipboardText); + MainRc.ClipboardWatcher.SetClipboardText(clipboardText); PopupMessage("Clipboard updated."); }); hubConnection.on("ScreenData", (selectedDisplay: string, displayNames: string[]) => { @@ -156,7 +156,7 @@ export class RCBrowserSockets { }; img.src = url; - if (Remotely.Debug) { + if (MainRc.Debug) { this.FpsStack.push(Date.now()); while (Date.now() - this.FpsStack[0] > 1000) { this.FpsStack.shift(); @@ -192,7 +192,7 @@ export class RCBrowserSockets { document.title = `${machineName} - Remotely Session`; }); hubConnection.on("RelaunchedScreenCasterReady", (newClientID: string) => { - Remotely.ClientID = newClientID; + MainRc.ClientID = newClientID; this.Connection.stop(); this.Connect(); }); @@ -202,16 +202,7 @@ export class RCBrowserSockets { }); hubConnection.on("CursorChange", (cursor: CursorInfo) => { - if (cursor.CssOverride) { - UI.ScreenViewer.style.cursor = cursor.CssOverride; - } - else if (cursor.ImageBytes.byteLength == 0) { - UI.ScreenViewer.style.cursor = "default"; - } - else { - var base64 = Utilities.ConvertUInt8ArrayToBase64(cursor.ImageBytes); - UI.ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${cursor.HotSpot.X} ${cursor.HotSpot.Y}, default`; - } + UI.UpdateCursor(cursor); }); hubConnection.on("RequestingScreenCast", () => { @@ -221,13 +212,13 @@ export class RCBrowserSockets { hubConnection.on("ReceiveRtcOffer", async (sdp: string) => { console.log("Rtc offer SDP received."); - Remotely.RtcSession.Init(); - await Remotely.RtcSession.ReceiveRtcOffer(sdp); + MainRc.RtcSession.Init(); + await MainRc.RtcSession.ReceiveRtcOffer(sdp); }); hubConnection.on("ReceiveIceCandidate", (candidate: string, sdpMlineIndex: number, sdpMid: string) => { console.log("Ice candidate received."); - Remotely.RtcSession.ReceiveCandidate({ + MainRc.RtcSession.ReceiveCandidate({ candidate: candidate, sdpMLineIndex: sdpMlineIndex, sdpMid: sdpMid diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos.js b/Server/wwwroot/scripts/RemoteControl/RtcDtos.js new file mode 100644 index 000000000..6dae8233e --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/RtcDtos.js @@ -0,0 +1,99 @@ +import { BinaryDtoType } from "../Enums/BinaryDtoType.js"; +export class AutoQualityAdjustDto { + constructor(isOn) { + this.DtoType = BinaryDtoType.AutoQualityAdjust; + this.IsOn = isOn; + } +} +export class ClipboardTransferDto { + constructor(text, typeText) { + this.DtoType = BinaryDtoType.ClipboardTransfer; + this.Text = text; + this.TypeText = typeText; + } +} +export class CtrlAltDelDto { + constructor() { + this.DtoType = BinaryDtoType.CtrlAltDel; + } +} +export class KeyDownDto { + constructor(key) { + this.DtoType = BinaryDtoType.KeyDown; + this.Key = key; + } +} +export class KeyPressDto { + constructor(key) { + this.DtoType = BinaryDtoType.KeyPress; + this.Key = key; + } +} +export class KeyUpDto { + constructor(key) { + this.DtoType = BinaryDtoType.KeyUp; + this.Key = key; + } +} +export class MouseDownDto { + constructor(button, percentX, percentY) { + this.DtoType = BinaryDtoType.MouseDown; + this.Button = button; + this.PercentX = percentX; + this.PercentY = percentY; + } +} +export class MouseMoveDto { + constructor(percentX, percentY) { + this.DtoType = BinaryDtoType.MouseMove; + this.PercentX = percentX; + this.PercentY = percentY; + } +} +export class MouseUpDto { + constructor(button, percentX, percentY) { + this.DtoType = BinaryDtoType.MouseUp; + this.Button = button; + this.PercentX = percentX; + this.PercentY = percentY; + } +} +export class MouseWheelDto { + constructor(deltaX, deltaY) { + this.DtoType = BinaryDtoType.MouseWheel; + this.DeltaX = deltaX; + this.DetlaY = deltaY; + } +} +export class QualityChangeDto { + constructor(qualityLevel) { + this.DtoType = BinaryDtoType.QualityChange; + this.QualityLevel = qualityLevel; + } +} +export class SelectScreenDto { + constructor(displayName) { + this.DtoType = BinaryDtoType.SelectScreen; + this.DisplayName = displayName; + } +} +export class TapDto { + constructor(percentX, percentY) { + this.DtoType = BinaryDtoType.Tap; + this.PercentX = percentX; + this.PercentY = percentY; + } +} +export class ToggleAudioDto { + constructor(toggleOn) { + this.DtoType = BinaryDtoType.ToggleAudio; + this.ToggleOn = toggleOn; + } +} +export class ToggleBlockInputDto { + constructor(toggleOn) { + this.DtoType = BinaryDtoType.ToggleBlockInput; + this.ToggleOn = toggleOn; + } +} +//# sourceMappingURL=RtcDtos.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map new file mode 100644 index 000000000..49c6738de --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RtcDtos.js","sourceRoot":"","sources":["RtcDtos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,MAAM,OAAO,oBAAoB;IAC7B,YAAY,IAAa;QAKzB,YAAO,GAAkB,aAAa,CAAC,iBAAiB,CAAC;QAJrD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CAIJ;AAsBD,MAAM,OAAO,oBAAoB;IAC7B,YAAY,IAAY,EAAE,QAAgB;QAO1C,YAAO,GAAkB,aAAa,CAAC,iBAAiB,CAAC;QANrD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CAKJ;AAGD,MAAM,OAAO,aAAa;IAA1B;QACI,YAAO,GAAkB,aAAa,CAAC,UAAU,CAAC;IACtD,CAAC;CAAA;AAMD,MAAM,OAAO,UAAU;IACnB,YAAY,GAAW;QAKvB,YAAO,GAAkB,aAAa,CAAC,OAAO,CAAC;QAJ3C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;CAIJ;AAED,MAAM,OAAO,WAAW;IACpB,YAAY,GAAW;QAKvB,YAAO,GAAkB,aAAa,CAAC,QAAQ,CAAC;QAJ5C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;CAIJ;AAED,MAAM,OAAO,QAAQ;IACjB,YAAY,GAAW;QAKvB,YAAO,GAAkB,aAAa,CAAC,KAAK,CAAC;QAJzC,IAAI,CAAC,GAAG,GAAG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C,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CAIJ;AAED,MAAM,OAAO,MAAM;IACf,YAAY,QAAgB,EAAE,QAAgB;QAO9C,YAAO,GAAkB,aAAa,CAAC,GAAG,CAAC;QANvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CAKJ;AAED,MAAM,OAAO,cAAc;IACvB,YAAY,QAAiB;QAK7B,YAAO,GAAkB,aAAa,CAAC,WAAW,CAAC;QAJ/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CAIJ;AAED,MAAM,OAAO,mBAAmB;IAC5B,YAAY,QAAiB;QAK7B,YAAO,GAAkB,aAAa,CAAC,gBAAgB,CAAC;QAJpD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CAIJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos.ts b/Server/wwwroot/scripts/RemoteControl/RtcDtos.ts new file mode 100644 index 000000000..a2cf8af79 --- /dev/null +++ b/Server/wwwroot/scripts/RemoteControl/RtcDtos.ts @@ -0,0 +1,188 @@ +import { BinaryDto } from "./BinaryDto.js"; +import { BinaryDtoType } from "../Enums/BinaryDtoType.js"; +import { CursorInfo } from "../Models/CursorInfo.js"; + +export class AutoQualityAdjustDto implements BinaryDto { + constructor(isOn: boolean) { + this.IsOn = isOn; + } + + IsOn: boolean; + DtoType: BinaryDtoType = BinaryDtoType.AutoQualityAdjust; +} + + +export interface AudioSampleDto extends BinaryDto { + Buffer: Uint8Array; +} + +export interface CaptureFrameDto extends BinaryDto { + EndOfFrame: boolean; + Left: number; + Top: number; + Width: number; + Height: number; + ImageBytes: Uint8Array; + ImageQuality: number; +} + +export interface ClipboardTextDto extends BinaryDto { + ClipboardText: string; +} + + +export class ClipboardTransferDto implements BinaryDto { + constructor(text: string, typeText:boolean) { + this.Text = text; + this.TypeText = typeText; + } + + Text: string; + TypeText: boolean; + DtoType: BinaryDtoType = BinaryDtoType.ClipboardTransfer; +} + + +export class CtrlAltDelDto implements BinaryDto { + DtoType: BinaryDtoType = BinaryDtoType.CtrlAltDel; +} + +export interface CursorChangeDto extends BinaryDto { + CursorInfo: CursorInfo; +} + +export class KeyDownDto implements BinaryDto { + constructor(key: string) { + this.Key = key; + } + + Key: string; + DtoType: BinaryDtoType = BinaryDtoType.KeyDown; +} + +export class KeyPressDto implements BinaryDto { + constructor(key: string) { + this.Key = key; + } + + Key: string; + DtoType: BinaryDtoType = BinaryDtoType.KeyPress; +} + +export class KeyUpDto implements BinaryDto { + constructor(key: string) { + this.Key = key; + } + + Key: string; + DtoType: BinaryDtoType = BinaryDtoType.KeyUp; +} + +export interface MachineNameDto extends BinaryDto { + MachineName: string; +} + +export class MouseDownDto implements BinaryDto { + constructor(button: number, percentX: number, percentY: number) { + this.Button = button; + this.PercentX = percentX; + this.PercentY = percentY; + } + + Button: number; + PercentX: number; + PercentY: number; + DtoType: BinaryDtoType = BinaryDtoType.MouseDown; +} + +export class MouseMoveDto implements BinaryDto { + constructor(percentX: number, percentY: number) { + this.PercentX = percentX; + this.PercentY = percentY; + } + + PercentX: number; + PercentY: number; + DtoType: BinaryDtoType = BinaryDtoType.MouseMove; +} + +export class MouseUpDto implements BinaryDto { + constructor(button: number, percentX: number, percentY: number) { + this.Button = button; + this.PercentX = percentX; + this.PercentY = percentY; + } + + Button: number; + PercentX: number; + PercentY: number; + DtoType: BinaryDtoType = BinaryDtoType.MouseUp; +} + +export class MouseWheelDto implements BinaryDto { + constructor(deltaX: number, deltaY: number) { + this.DeltaX = deltaX; + this.DetlaY = deltaY; + } + + DeltaX: number; + DetlaY: number; + DtoType: BinaryDtoType = BinaryDtoType.MouseWheel; +} + +export class QualityChangeDto implements BinaryDto { + constructor(qualityLevel: number) { + this.QualityLevel = qualityLevel; + } + + QualityLevel: number; + DtoType: BinaryDtoType = BinaryDtoType.QualityChange; +} + +export interface ScreenDataDto extends BinaryDto { + DisplayNames: string[]; + SelectedScreen: string; +} + +export interface ScreenSizeDto extends BinaryDto { + Width: number; + Height: number; +} + +export class SelectScreenDto implements BinaryDto { + constructor(displayName: string) { + this.DisplayName = displayName; + } + + DisplayName: string; + DtoType: BinaryDtoType = BinaryDtoType.SelectScreen; +} + +export class TapDto implements BinaryDto { + constructor(percentX: number, percentY: number) { + this.PercentX = percentX; + this.PercentY = percentY; + } + + PercentX: number; + PercentY: number; + DtoType: BinaryDtoType = BinaryDtoType.Tap; +} + +export class ToggleAudioDto implements BinaryDto { + constructor(toggleOn: boolean) { + this.ToggleOn = toggleOn; + } + + ToggleOn: boolean; + DtoType: BinaryDtoType = BinaryDtoType.ToggleAudio; +} + +export class ToggleBlockInputDto implements BinaryDto { + constructor(toggleOn: boolean) { + this.ToggleOn = toggleOn; + } + + ToggleOn: boolean; + DtoType: BinaryDtoType = BinaryDtoType.ToggleBlockInput; +} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js b/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js deleted file mode 100644 index 1d662d4ca..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=CaptureFrameDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js.map deleted file mode 100644 index 07b33cec8..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CaptureFrameDto.js","sourceRoot":"","sources":["CaptureFrameDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.ts b/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.ts deleted file mode 100644 index b330e1f5c..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/CaptureFrameDto.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { DynamicDto } from "../DynamicDto.js"; - -export interface CaptureFrameDto extends DynamicDto { - EndOfFrame: boolean; - Left: number; - Top: number; - Width: number; - Height: number; - ImageBytes: Uint8Array; - ImageQuality: number; -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js deleted file mode 100644 index 36ae694d4..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=ClipboardTextDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js.map deleted file mode 100644 index 8ebe88259..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ClipboardTextDto.js","sourceRoot":"","sources":["ClipboardTextDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.ts b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.ts deleted file mode 100644 index 7bc30752c..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ClipboardTextDto.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DynamicDto } from "../DynamicDto.js"; - -export interface ClipboardTextDto extends DynamicDto { - ClipboardText: string; -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js b/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js deleted file mode 100644 index 5189401af..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=MachineNameDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js.map deleted file mode 100644 index e6ee4c381..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MachineNameDto.js","sourceRoot":"","sources":["MachineNameDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.ts b/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.ts deleted file mode 100644 index a052edd3e..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/MachineNameDto.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DynamicDto } from "../DynamicDto.js"; - -export interface MachineNameDto extends DynamicDto { - MachineName: string; -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js deleted file mode 100644 index a6db3f8be..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=ScreenDataDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js.map deleted file mode 100644 index ae049b491..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScreenDataDto.js","sourceRoot":"","sources":["ScreenDataDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.ts b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.ts deleted file mode 100644 index 1f97c6503..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenDataDto.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DynamicDto } from "../DynamicDto.js"; - -export interface ScreenDataDto extends DynamicDto { - DisplayNames: string[]; - SelectedScreen: string; -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js deleted file mode 100644 index a0fdc0119..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=ScreenSizeDto.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js.map deleted file mode 100644 index 0d7b4416f..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScreenSizeDto.js","sourceRoot":"","sources":["ScreenSizeDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.ts b/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.ts deleted file mode 100644 index c31fffa55..000000000 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos/ScreenSizeDto.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { DynamicDto } from "../DynamicDto.js"; - -export interface ScreenSizeDto extends DynamicDto { - Width: number; - Height: number; -} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js index dda90df07..bb3cc48f1 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js +++ b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js @@ -1,7 +1,8 @@ import * as UI from "./UI.js"; -import { DynamicDtoType } from "../Enums/DynamicDtoType.js"; -import { Remotely } from "./Main.js"; +import { BinaryDtoType } from "../Enums/BinaryDtoType.js"; +import { MainRc } from "./Main.js"; import { PopupMessage } from "../UI.js"; +import { Sound } from "../Sound.js"; export class RtcMessageHandler { constructor() { this.FpsStack = []; @@ -11,37 +12,35 @@ export class RtcMessageHandler { ParseBinaryMessage(data) { var model = this.MessagePack.decode(data); switch (model.DtoType) { - case DynamicDtoType.CaptureFrame: - this.ProcessCaptureFrame(model); + case BinaryDtoType.AudioSample: + this.HandleAudioSample(model); break; - case DynamicDtoType.MachineName: - this.ProcessMachineName(model); + case BinaryDtoType.CaptureFrame: + this.HandleCaptureFrame(model); break; - case DynamicDtoType.ScreenData: - this.ProcessScreenData(model); + case BinaryDtoType.ClipboardText: + this.HandleClipboardText(model); break; - case DynamicDtoType.ScreenSize: - this.ProcessScreenSize(model); + case BinaryDtoType.CursorChange: + this.HandleCursorChange(model); + break; + case BinaryDtoType.MachineName: + this.HandleMachineName(model); + break; + case BinaryDtoType.ScreenData: + this.HandleScreenData(model); + break; + case BinaryDtoType.ScreenSize: + this.HandleScreenSize(model); break; - case DynamicDtoType.ClipboardText: - this.ProcessClipboardText(model); default: + break; } } - ProcessClipboardText(clipboardText) { - Remotely.ClipboardWatcher.SetClipboardText(clipboardText.ClipboardText); - PopupMessage("Clipboard updated."); - } - ProcessMachineName(machineNameDto) { - document.title = `${machineNameDto.MachineName} - Remotely Session`; - } - ProcessScreenData(screenDataDto) { - UI.UpdateDisplays(screenDataDto.SelectedScreen, screenDataDto.DisplayNames); - } - ProcessScreenSize(screenSizeDto) { - UI.SetScreenSize(screenSizeDto.Width, screenSizeDto.Height); + HandleAudioSample(audioSample) { + Sound.Play(audioSample.Buffer); } - ProcessCaptureFrame(captureFrame) { + HandleCaptureFrame(captureFrame) { if (UI.AutoQualityAdjustCheckBox.checked && Number(UI.QualitySlider.value) != captureFrame.ImageQuality) { UI.QualitySlider.value = String(captureFrame.ImageQuality); @@ -55,7 +54,7 @@ export class RtcMessageHandler { }; img.src = url; this.PartialCaptureFrames = []; - if (Remotely.Debug) { + if (MainRc.Debug) { this.FpsStack.push(Date.now()); while (Date.now() - this.FpsStack[0] > 1000) { this.FpsStack.shift(); @@ -67,5 +66,21 @@ export class RtcMessageHandler { this.PartialCaptureFrames.push(captureFrame.ImageBytes); } } + HandleClipboardText(clipboardText) { + MainRc.ClipboardWatcher.SetClipboardText(clipboardText.ClipboardText); + PopupMessage("Clipboard updated."); + } + HandleCursorChange(cursorChange) { + UI.UpdateCursor(cursorChange.CursorInfo); + } + HandleMachineName(machineNameDto) { + document.title = `${machineNameDto.MachineName} - Remotely Session`; + } + HandleScreenData(screenDataDto) { + UI.UpdateDisplays(screenDataDto.SelectedScreen, screenDataDto.DisplayNames); + } + HandleScreenSize(screenSizeDto) { + UI.SetScreenSize(screenSizeDto.Width, screenSizeDto.Height); + } } //# sourceMappingURL=RtcMessageHandler.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js.map b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js.map index eb043bf14..561aa838e 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js.map +++ b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js.map @@ -1 +1 @@ -{"version":3,"file":"RtcMessageHandler.js","sourceRoot":"","sources":["RtcMessageHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,OAAO,iBAAiB;I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AK,EAAE;gBACd,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;gBAC/B,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE;oBACzC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;iBACzB;gBACD,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;aACvD;SACJ;aACI;YACD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;SAC3D;IACL,CAAC;IACD,mBAAmB,CAAC,aAA+B;QAC/C,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACtE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACvC,CAAC;IACD,kBAAkB,CAAC,YAA6B;QAC5C,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IACD,iBAAiB,CAAC,cAA8B;QAC5C,QAAQ,CAAC,KAAK,GAAG,GAAG,cAAc,CAAC,WAAW,qBAAqB,CAAC;IACxE,CAAC;IACD,gBAAgB,CAAC,aAA4B;QACzC,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,cAAc,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAChF,CAAC;IAED,gBAAgB,CAAC,aAA4B;QACzC,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;CACJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.ts b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.ts index 814b950fc..b67aa80e3 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.ts +++ b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.ts @@ -1,54 +1,56 @@ import * as UI from "./UI.js"; -import { DynamicDtoType } from "../Enums/DynamicDtoType.js"; -import { DynamicDto } from "./DynamicDto.js"; -import { Remotely } from "./Main.js"; -import { CaptureFrameDto } from "./RtcDtos/CaptureFrameDto.js"; -import { MachineNameDto } from "./RtcDtos/MachineNameDto.js"; -import { ScreenDataDto } from "./RtcDtos/ScreenDataDto.js"; -import { ScreenSizeDto } from "./RtcDtos/ScreenSizeDto.js"; -import { ClipboardTextDto } from "./RtcDtos/ClipboardTextDto.js"; +import { BinaryDtoType } from "../Enums/BinaryDtoType.js"; +import { BinaryDto } from "./BinaryDto.js"; +import { MainRc } from "./Main.js"; import { PopupMessage } from "../UI.js"; +import { Sound } from "../Sound.js"; +import { + AudioSampleDto, + CaptureFrameDto, + ClipboardTextDto, + CursorChangeDto, + MachineNameDto, + ScreenDataDto, + ScreenSizeDto +} from "./RtcDtos.js"; + export class RtcMessageHandler { FpsStack: Array = []; MessagePack: any = window['MessagePack']; PartialCaptureFrames: Uint8Array[] = []; ParseBinaryMessage(data: ArrayBuffer) { - var model = this.MessagePack.decode(data) as DynamicDto; + var model = this.MessagePack.decode(data) as BinaryDto; switch (model.DtoType) { - case DynamicDtoType.CaptureFrame: - this.ProcessCaptureFrame(model as unknown as CaptureFrameDto); + case BinaryDtoType.AudioSample: + this.HandleAudioSample(model as unknown as AudioSampleDto); + break; + case BinaryDtoType.CaptureFrame: + this.HandleCaptureFrame(model as unknown as CaptureFrameDto); + break; + case BinaryDtoType.ClipboardText: + this.HandleClipboardText(model as unknown as ClipboardTextDto); break; - case DynamicDtoType.MachineName: - this.ProcessMachineName(model as unknown as MachineNameDto); + case BinaryDtoType.CursorChange: + this.HandleCursorChange(model as unknown as CursorChangeDto); break; - case DynamicDtoType.ScreenData: - this.ProcessScreenData(model as unknown as ScreenDataDto); + case BinaryDtoType.MachineName: + this.HandleMachineName(model as unknown as MachineNameDto); break; - case DynamicDtoType.ScreenSize: - this.ProcessScreenSize(model as unknown as ScreenSizeDto) + case BinaryDtoType.ScreenData: + this.HandleScreenData(model as unknown as ScreenDataDto); + break; + case BinaryDtoType.ScreenSize: + this.HandleScreenSize(model as unknown as ScreenSizeDto) break; - case DynamicDtoType.ClipboardText: - this.ProcessClipboardText(model as unknown as ClipboardTextDto); default: + break; } } - ProcessClipboardText(clipboardText: ClipboardTextDto) { - Remotely.ClipboardWatcher.SetClipboardText(clipboardText.ClipboardText); - PopupMessage("Clipboard updated."); - } - ProcessMachineName(machineNameDto: MachineNameDto) { - document.title = `${machineNameDto.MachineName} - Remotely Session`; - } - ProcessScreenData(screenDataDto: ScreenDataDto) { - UI.UpdateDisplays(screenDataDto.SelectedScreen, screenDataDto.DisplayNames); - } - - ProcessScreenSize(screenSizeDto: ScreenSizeDto) { - UI.SetScreenSize(screenSizeDto.Width, screenSizeDto.Height); + HandleAudioSample(audioSample: AudioSampleDto) { + Sound.Play(audioSample.Buffer); } - - ProcessCaptureFrame(captureFrame: CaptureFrameDto) { + HandleCaptureFrame(captureFrame: CaptureFrameDto) { if (UI.AutoQualityAdjustCheckBox.checked && Number(UI.QualitySlider.value) != captureFrame.ImageQuality) { UI.QualitySlider.value = String(captureFrame.ImageQuality); @@ -68,7 +70,7 @@ export class RtcMessageHandler { img.src = url; this.PartialCaptureFrames = []; - if (Remotely.Debug) { + if (MainRc.Debug) { this.FpsStack.push(Date.now()); while (Date.now() - this.FpsStack[0] > 1000) { this.FpsStack.shift(); @@ -80,4 +82,21 @@ export class RtcMessageHandler { this.PartialCaptureFrames.push(captureFrame.ImageBytes); } } + HandleClipboardText(clipboardText: ClipboardTextDto) { + MainRc.ClipboardWatcher.SetClipboardText(clipboardText.ClipboardText); + PopupMessage("Clipboard updated."); + } + HandleCursorChange(cursorChange: CursorChangeDto) { + UI.UpdateCursor(cursorChange.CursorInfo); + } + HandleMachineName(machineNameDto: MachineNameDto) { + document.title = `${machineNameDto.MachineName} - Remotely Session`; + } + HandleScreenData(screenDataDto: ScreenDataDto) { + UI.UpdateDisplays(screenDataDto.SelectedScreen, screenDataDto.DisplayNames); + } + + HandleScreenSize(screenSizeDto: ScreenSizeDto) { + UI.SetScreenSize(screenSizeDto.Width, screenSizeDto.Height); + } } \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcSession.js b/Server/wwwroot/scripts/RemoteControl/RtcSession.js index ef69b0dae..32ecf2e1f 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcSession.js +++ b/Server/wwwroot/scripts/RemoteControl/RtcSession.js @@ -1,7 +1,10 @@ import * as UI from "./UI.js"; import * as Utilities from "../Utilities.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; export class RtcSession { + constructor() { + this.MessagePack = window['MessagePack']; + } Init() { this.PeerConnection = new RTCPeerConnection({ iceServers: [ @@ -28,7 +31,7 @@ export class RtcSession { }; this.DataChannel.onmessage = async (ev) => { var data = ev.data; - Remotely.RtcMessageHandler.ParseBinaryMessage(data); + MainRc.RtcMessageHandler.ParseBinaryMessage(data); }; this.DataChannel.onopen = (ev) => { console.log("Data channel opened."); @@ -43,7 +46,7 @@ export class RtcSession { console.log("ICE connection state changed to " + this.iceConnectionState); }; this.PeerConnection.onicecandidate = async (ev) => { - await Remotely.RCBrowserSockets.SendIceCandidate(ev.candidate); + await MainRc.RCBrowserSockets.SendIceCandidate(ev.candidate); }; } Disconnect() { @@ -55,7 +58,7 @@ export class RtcSession { return this.PeerConnection.remoteDescription.sdp.length > 0; }).then(async () => { await this.PeerConnection.setLocalDescription(await this.PeerConnection.createAnswer()); - await Remotely.RCBrowserSockets.SendRtcAnswer(this.PeerConnection.localDescription); + await MainRc.RCBrowserSockets.SendRtcAnswer(this.PeerConnection.localDescription); }); } async ReceiveCandidate(candidate) { @@ -66,5 +69,8 @@ export class RtcSession { console.log("Set ICE candidate."); }); } + SendDto(dto) { + this.DataChannel.send(this.MessagePack.encode(dto)); + } } //# sourceMappingURL=RtcSession.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcSession.js.map b/Server/wwwroot/scripts/RemoteControl/RtcSession.js.map index 63709b8b6..586004ea5 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcSession.js.map +++ b/Server/wwwroot/scripts/RemoteControl/RtcSession.js.map @@ -1 +1 @@ -{"version":3,"file":"RtcSession.js","sourceRoot":"","sources":["RtcSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,OAAO,UAAU;IAGnB,IAAI;QACA,IAAI,CAAC,cAAc,GAAG,IAAI,iBAAiB,CAAC;YACxC,UAAU,EAAE;gBACR,EAAE,IAAI,EAAE,+BAA+B,EAAE;gBACzC,EAAE,IAAI,EAAE,+BAA+B,EAAE;aAC5C;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,aAAa,GAAG,CAAC,EAAE,EAAE,EAAE;YACvC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YACtC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,OAAO,CAAC;YAC9B,IAAI,CAAC,WAAW,CAAC,UAAU,GAAG,aAAa,CAAC;YAC5C,IAAI,CAAC,WAAW,CAAC,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE;gBAC1C,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YACtC,CAAC,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,OAAO,GAAG,CAAC,EAAE,EAAE,EAAE;gBAC9B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;gBACpC,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;gBAC5C,EAAE,CAAC,qBAAqB,CAAC,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oBAAoB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAE5E,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE;YAChB,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;YACf,MAAM,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC,CAAC;YACxF,MAAM,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACtF,CAAC,CAAC,CAAA;IACN,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAA0B;QAC7C,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE;YAChB,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;YACf,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YACrD,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACtC,CAAC,CAAC,CAAA;IACN,CAAC;IAED,OAAO,CAAC,GAAQ;QACZ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/RtcSession.ts b/Server/wwwroot/scripts/RemoteControl/RtcSession.ts index abaa7c19e..6ab3d343e 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcSession.ts +++ b/Server/wwwroot/scripts/RemoteControl/RtcSession.ts @@ -1,10 +1,11 @@ import * as UI from "./UI.js"; import * as Utilities from "../Utilities.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; export class RtcSession { PeerConnection: RTCPeerConnection; DataChannel: RTCDataChannel; + MessagePack: any = window['MessagePack']; Init() { this.PeerConnection = new RTCPeerConnection({ iceServers: [ @@ -32,7 +33,7 @@ export class RtcSession { }; this.DataChannel.onmessage = async (ev) => { var data = ev.data as ArrayBuffer; - Remotely.RtcMessageHandler.ParseBinaryMessage(data); + MainRc.RtcMessageHandler.ParseBinaryMessage(data); }; this.DataChannel.onopen = (ev) => { @@ -49,7 +50,7 @@ export class RtcSession { console.log("ICE connection state changed to " + this.iceConnectionState); } this.PeerConnection.onicecandidate = async (ev) => { - await Remotely.RCBrowserSockets.SendIceCandidate(ev.candidate); + await MainRc.RCBrowserSockets.SendIceCandidate(ev.candidate); }; } @@ -63,7 +64,7 @@ export class RtcSession { return this.PeerConnection.remoteDescription.sdp.length > 0; }).then(async () => { await this.PeerConnection.setLocalDescription(await this.PeerConnection.createAnswer()); - await Remotely.RCBrowserSockets.SendRtcAnswer(this.PeerConnection.localDescription); + await MainRc.RCBrowserSockets.SendRtcAnswer(this.PeerConnection.localDescription); }) } async ReceiveCandidate(candidate: RTCIceCandidate) { @@ -74,4 +75,8 @@ export class RtcSession { console.log("Set ICE candidate."); }) } + + SendDto(dto: any) { + this.DataChannel.send(this.MessagePack.encode(dto)); + } } diff --git a/Server/wwwroot/scripts/RemoteControl/UI.js b/Server/wwwroot/scripts/RemoteControl/UI.js index 49f7f28b7..b0a56d9cb 100644 --- a/Server/wwwroot/scripts/RemoteControl/UI.js +++ b/Server/wwwroot/scripts/RemoteControl/UI.js @@ -1,7 +1,7 @@ -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; import { PopupMessage } from "../UI.js"; import { RemoteControlMode } from "../Enums/RemoteControlMode.js"; -import { GetDistanceBetween } from "../Utilities.js"; +import { GetDistanceBetween, ConvertUInt8ArrayToBase64 } from "../Utilities.js"; export var AudioButton = document.getElementById("audioButton"); export var MenuButton = document.getElementById("menuButton"); export var MenuFrame = document.getElementById("menuFrame"); @@ -73,19 +73,19 @@ export function ApplyInputHandlers(sockets) { PopupMessage("Clipboard sent!"); }); ConnectButton.addEventListener("click", (ev) => { - Remotely.ConnectToClient(); + MainRc.ConnectToClient(); }); CtrlAltDelButton.addEventListener("click", (ev) => { - if (!Remotely.ServiceID) { + if (!MainRc.ServiceID) { ShowMessage("Not available for this session."); return; } closeAllHorizontalBars(null); - Remotely.RCBrowserSockets.SendCtrlAltDel(); + MainRc.RCBrowserSockets.SendCtrlAltDel(); }); DisconnectButton.addEventListener("click", (ev) => { ConnectButton.removeAttribute("disabled"); - Remotely.RCBrowserSockets.Connection.stop(); + MainRc.RCBrowserSockets.Connection.stop(); if (location.search.includes("fromApi=true")) { window.close(); } @@ -93,7 +93,7 @@ export function ApplyInputHandlers(sockets) { document.querySelectorAll("#sessionIDInput, #nameInput").forEach(x => { x.addEventListener("keypress", (ev) => { if (ev.key.toLowerCase() == "enter") { - Remotely.ConnectToClient(); + MainRc.ConnectToClient(); } }); }); @@ -118,21 +118,21 @@ export function ApplyInputHandlers(sockets) { var button = ev.currentTarget; button.classList.toggle("toggled"); if (button.classList.contains("toggled")) { - Remotely.RCBrowserSockets.SendToggleBlockInput(true); + MainRc.RCBrowserSockets.SendToggleBlockInput(true); } else { - Remotely.RCBrowserSockets.SendToggleBlockInput(false); + MainRc.RCBrowserSockets.SendToggleBlockInput(false); } }); InviteButton.addEventListener("click", (ev) => { var url = ""; - if (Remotely.Mode == RemoteControlMode.Normal) { - url = `${location.origin}${location.pathname}?sessionID=${Remotely.ClientID}`; + if (MainRc.Mode == RemoteControlMode.Normal) { + url = `${location.origin}${location.pathname}?sessionID=${MainRc.ClientID}`; } else { - url = `${location.origin}${location.pathname}?clientID=${Remotely.ClientID}&serviceID=${Remotely.ServiceID}`; + url = `${location.origin}${location.pathname}?clientID=${MainRc.ClientID}&serviceID=${MainRc.ServiceID}`; } - Remotely.ClipboardWatcher.SetClipboardText(url); + MainRc.ClipboardWatcher.SetClipboardText(url); PopupMessage("Link copied to clipboard."); }); KeyboardButton.addEventListener("click", (ev) => { @@ -419,6 +419,18 @@ export function ShowMessage(message) { messageDiv.remove(); }, 5000); } +export function UpdateCursor(cursor) { + if (cursor.CssOverride) { + ScreenViewer.style.cursor = cursor.CssOverride; + } + else if (cursor.ImageBytes.byteLength == 0) { + ScreenViewer.style.cursor = "default"; + } + else { + var base64 = ConvertUInt8ArrayToBase64(cursor.ImageBytes); + ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${cursor.HotSpot.X} ${cursor.HotSpot.Y}, default`; + } +} export function UpdateDisplays(selectedDisplay, displayNames) { ScreenSelectBar.innerHTML = ""; for (let i = 0; i < displayNames.length; i++) { @@ -453,7 +465,7 @@ function uploadFiles(fileList) { FileTransferProgress.parentElement.setAttribute("hidden", "hidden"); if (xhr.status === 200) { ShowMessage("File upload completed."); - Remotely.RCBrowserSockets.SendSharedFileIDs(xhr.responseText); + MainRc.RCBrowserSockets.SendSharedFileIDs(xhr.responseText); } else { ShowMessage("File upload failed."); diff --git a/Server/wwwroot/scripts/RemoteControl/UI.js.map b/Server/wwwroot/scripts/RemoteControl/UI.js.map index 5f8432e43..069e03ff8 100644 --- a/Server/wwwroot/scripts/RemoteControl/UI.js.map +++ b/Server/wwwroot/scripts/RemoteControl/UI.js.map @@ -1 +1 @@ -{"version":3,"file":"UI.js","sourceRoot":"","sources":["UI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,CAAC,IAAI,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAsB,CAAC;AACrF,M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,CAAC;SAC9B;IACL,CAAC,CAAC,CAAA;AACN,CAAC;AAED,SAAS,cAAc,CAAC,EAAc;IAClC,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,EAAE;QAC/C,IAAI,EAAE,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE;YACnD,OAAO;SACV;QACD,oBAAoB,GAAG,IAAI,CAAC;QAC5B,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,OAAO,IAAI,CAAC;KAC5C;AACL,CAAC;AAED,SAAS,gCAAgC,CAAC,EAAc;IACpD,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACxD,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,gCAAgC,CAAC,CAAC;IACxE,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,gCAAgC,CAAC,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/UI.ts b/Server/wwwroot/scripts/RemoteControl/UI.ts index 805a589d8..c38113e0f 100644 --- a/Server/wwwroot/scripts/RemoteControl/UI.ts +++ b/Server/wwwroot/scripts/RemoteControl/UI.ts @@ -1,9 +1,10 @@ import { RCBrowserSockets } from "./RCBrowserSockets.js"; -import { Remotely } from "./Main.js"; +import { MainRc } from "./Main.js"; import { PopupMessage } from "../UI.js"; import { RemoteControlMode } from "../Enums/RemoteControlMode.js"; import { Point } from "../Models/Point.js"; -import { GetDistanceBetween } from "../Utilities.js"; +import { GetDistanceBetween, ConvertUInt8ArrayToBase64 } from "../Utilities.js"; +import { CursorInfo } from "../Models/CursorInfo.js"; export var AudioButton = document.getElementById("audioButton") as HTMLButtonElement; export var MenuButton = document.getElementById("menuButton") as HTMLButtonElement; @@ -78,19 +79,19 @@ export function ApplyInputHandlers(sockets: RCBrowserSockets) { PopupMessage("Clipboard sent!"); }); ConnectButton.addEventListener("click", (ev) => { - Remotely.ConnectToClient(); + MainRc.ConnectToClient(); }); CtrlAltDelButton.addEventListener("click", (ev) => { - if (!Remotely.ServiceID) { + if (!MainRc.ServiceID) { ShowMessage("Not available for this session."); return; } closeAllHorizontalBars(null); - Remotely.RCBrowserSockets.SendCtrlAltDel(); + MainRc.RCBrowserSockets.SendCtrlAltDel(); }); DisconnectButton.addEventListener("click", (ev) => { ConnectButton.removeAttribute("disabled"); - Remotely.RCBrowserSockets.Connection.stop(); + MainRc.RCBrowserSockets.Connection.stop(); if (location.search.includes("fromApi=true")) { window.close(); } @@ -98,7 +99,7 @@ export function ApplyInputHandlers(sockets: RCBrowserSockets) { document.querySelectorAll("#sessionIDInput, #nameInput").forEach(x => { x.addEventListener("keypress", (ev: KeyboardEvent) => { if (ev.key.toLowerCase() == "enter") { - Remotely.ConnectToClient(); + MainRc.ConnectToClient(); } }) }); @@ -123,21 +124,21 @@ export function ApplyInputHandlers(sockets: RCBrowserSockets) { var button = ev.currentTarget as HTMLButtonElement; button.classList.toggle("toggled"); if (button.classList.contains("toggled")) { - Remotely.RCBrowserSockets.SendToggleBlockInput(true); + MainRc.RCBrowserSockets.SendToggleBlockInput(true); } else { - Remotely.RCBrowserSockets.SendToggleBlockInput(false); + MainRc.RCBrowserSockets.SendToggleBlockInput(false); } }); InviteButton.addEventListener("click", (ev) => { var url = ""; - if (Remotely.Mode == RemoteControlMode.Normal) { - url = `${location.origin}${location.pathname}?sessionID=${Remotely.ClientID}`; + if (MainRc.Mode == RemoteControlMode.Normal) { + url = `${location.origin}${location.pathname}?sessionID=${MainRc.ClientID}`; } else { - url = `${location.origin}${location.pathname}?clientID=${Remotely.ClientID}&serviceID=${Remotely.ServiceID}`; + url = `${location.origin}${location.pathname}?clientID=${MainRc.ClientID}&serviceID=${MainRc.ServiceID}`; } - Remotely.ClipboardWatcher.SetClipboardText(url); + MainRc.ClipboardWatcher.SetClipboardText(url); PopupMessage("Link copied to clipboard."); }); KeyboardButton.addEventListener("click", (ev) => { @@ -464,6 +465,19 @@ export function ShowMessage(message: string) { }, 5000); } +export function UpdateCursor(cursor: CursorInfo) { + if (cursor.CssOverride) { + ScreenViewer.style.cursor = cursor.CssOverride; + } + else if (cursor.ImageBytes.byteLength == 0) { + ScreenViewer.style.cursor = "default"; + } + else { + var base64 = ConvertUInt8ArrayToBase64(cursor.ImageBytes); + ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${cursor.HotSpot.X} ${cursor.HotSpot.Y}, default`; + } +} + export function UpdateDisplays(selectedDisplay: string, displayNames: string[]) { ScreenSelectBar.innerHTML = ""; for (let i = 0; i < displayNames.length; i++) { @@ -500,7 +514,7 @@ function uploadFiles(fileList: FileList) { FileTransferProgress.parentElement.setAttribute("hidden", "hidden"); if (xhr.status === 200) { ShowMessage("File upload completed."); - Remotely.RCBrowserSockets.SendSharedFileIDs(xhr.responseText); + MainRc.RCBrowserSockets.SendSharedFileIDs(xhr.responseText); } else { ShowMessage("File upload failed."); diff --git a/Shared/Enums/BinaryDtoType.cs b/Shared/Enums/BinaryDtoType.cs new file mode 100644 index 000000000..a118681d9 --- /dev/null +++ b/Shared/Enums/BinaryDtoType.cs @@ -0,0 +1,53 @@ +using System.Runtime.Serialization; + +namespace Remotely.Shared.Enums +{ + [DataContract] + public enum BinaryDtoType + { + [EnumMember(Value = "CaptureFrame")] + CaptureFrame = 0, + [EnumMember(Value = "ScreenData")] + ScreenData = 1, + [EnumMember(Value = "ScreenSize")] + ScreenSize = 2, + [EnumMember(Value = "MachineName")] + MachineName = 3, + [EnumMember(Value = "ClipboardText")] + ClipboardText = 4, + [EnumMember(Value = "AudioSample")] + AudioSample = 5, + [EnumMember(Value = "CursorChange")] + CursorChange = 6, + [EnumMember(Value = "SelectScreen")] + SelectScreen = 7, + [EnumMember(Value = "MouseMove")] + MouseMove = 8, + [EnumMember(Value = "MouseDown")] + MouseDown = 9, + [EnumMember(Value = "MouseUp")] + MouseUp = 10, + [EnumMember(Value = "Tap")] + Tap = 11, + [EnumMember(Value = "MouseWheel")] + MouseWheel = 12, + [EnumMember(Value = "KeyDown")] + KeyDown = 13, + [EnumMember(Value = "KeyUp")] + KeyUp = 14, + [EnumMember(Value = "CtrlAltDel")] + CtrlAltDel = 15, + [EnumMember(Value = "AutoQualityAdjust")] + AutoQualityAdjust = 16, + [EnumMember(Value = "ToggleAudio")] + ToggleAudio = 17, + [EnumMember(Value = "ToggleBlockInput")] + ToggleBlockInput = 18, + [EnumMember(Value = "ClipboardTransfer")] + ClipboardTransfer = 19, + [EnumMember(Value = "KeyPress")] + KeyPress = 20, + [EnumMember(Value = "QualityChange")] + QualityChange = 21 + } +} diff --git a/Shared/Enums/DynamicDtoType.cs b/Shared/Enums/DynamicDtoType.cs deleted file mode 100644 index 746f85f4d..000000000 --- a/Shared/Enums/DynamicDtoType.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Runtime.Serialization; - -namespace Remotely.Shared.Enums -{ - [DataContract] - public enum DynamicDtoType - { - [EnumMember(Value = "CaptureFrame")] - CaptureFrame = 0, - [EnumMember(Value = "ScreenData")] - ScreenData = 1, - [EnumMember(Value = "ScreenSize")] - ScreenSize = 2, - [EnumMember(Value = "MachineName")] - MachineName = 3, - [EnumMember(Value = "ClipboardText")] - ClipboardText = 4 - } -} diff --git a/Shared/Models/IDynamicDto.cs b/Shared/Models/IBinaryDto.cs similarity index 53% rename from Shared/Models/IDynamicDto.cs rename to Shared/Models/IBinaryDto.cs index 7f0bd2cba..88bdec3ff 100644 --- a/Shared/Models/IDynamicDto.cs +++ b/Shared/Models/IBinaryDto.cs @@ -2,8 +2,8 @@ namespace Remotely.Shared.Models { - interface IDynamicDto + public interface IBinaryDto { - DynamicDtoType DtoType { get; } + BinaryDtoType DtoType { get; } } } diff --git a/Shared/Models/RtcDtos/CaptureFrameDto.cs b/Shared/Models/RtcDtos/CaptureFrameDto.cs index 76508f8d6..f144417e5 100644 --- a/Shared/Models/RtcDtos/CaptureFrameDto.cs +++ b/Shared/Models/RtcDtos/CaptureFrameDto.cs @@ -4,10 +4,10 @@ namespace Remotely.Shared.Models.RtcDtos { [DataContract] - public class CaptureFrameDto : IDynamicDto + public class CaptureFrameDto : IBinaryDto { [DataMember(Name = "DtoType")] - public DynamicDtoType DtoType { get; } = DynamicDtoType.CaptureFrame; + public BinaryDtoType DtoType { get; } = BinaryDtoType.CaptureFrame; [DataMember(Name = "EndOfFrame")] public bool EndOfFrame { get; set; } diff --git a/Shared/Models/RtcDtos/ClipboardTextDto.cs b/Shared/Models/RtcDtos/ClipboardTextDto.cs index 27ea9fd5b..4fd780ec3 100644 --- a/Shared/Models/RtcDtos/ClipboardTextDto.cs +++ b/Shared/Models/RtcDtos/ClipboardTextDto.cs @@ -7,7 +7,7 @@ namespace Remotely.Shared.Models.RtcDtos { [DataContract] - public class ClipboardTextDto : IDynamicDto + public class ClipboardTextDto : IBinaryDto { public ClipboardTextDto(string clipboardText) { @@ -19,6 +19,6 @@ public ClipboardTextDto(string clipboardText) [DataMember(Name = "DtoType")] - public DynamicDtoType DtoType { get; } = DynamicDtoType.ClipboardText; + public BinaryDtoType DtoType { get; } = BinaryDtoType.ClipboardText; } } diff --git a/Shared/Models/RtcDtos/MachineNameDto.cs b/Shared/Models/RtcDtos/MachineNameDto.cs index 576060152..f0084930d 100644 --- a/Shared/Models/RtcDtos/MachineNameDto.cs +++ b/Shared/Models/RtcDtos/MachineNameDto.cs @@ -7,7 +7,7 @@ namespace Remotely.Shared.Models.RtcDtos { [DataContract] - public class MachineNameDto : IDynamicDto + public class MachineNameDto : IBinaryDto { public MachineNameDto(string machineName) { @@ -15,7 +15,7 @@ public MachineNameDto(string machineName) } [DataMember(Name = "DtoType")] - public DynamicDtoType DtoType { get; } = DynamicDtoType.MachineName; + public BinaryDtoType DtoType { get; } = BinaryDtoType.MachineName; [DataMember(Name = "MachineName")] public string MachineName { get; } diff --git a/Shared/Models/RtcDtos/ScreenDataDto.cs b/Shared/Models/RtcDtos/ScreenDataDto.cs index d2d6fb17d..a7f0623d6 100644 --- a/Shared/Models/RtcDtos/ScreenDataDto.cs +++ b/Shared/Models/RtcDtos/ScreenDataDto.cs @@ -7,7 +7,7 @@ namespace Remotely.Shared.Models.RtcDtos { [DataContract] - public class ScreenDataDto : IDynamicDto + public class ScreenDataDto : IBinaryDto { public ScreenDataDto(string selectedScreen, string[] displayNames) { @@ -20,7 +20,7 @@ public ScreenDataDto(string selectedScreen, string[] displayNames) [DataMember(Name = "DtoType")] - public DynamicDtoType DtoType { get; } = DynamicDtoType.ScreenData; + public BinaryDtoType DtoType { get; } = BinaryDtoType.ScreenData; [DataMember(Name = "SelectedScreen")] public string SelectedScreen { get; } diff --git a/Shared/Models/RtcDtos/ScreenSizeDto.cs b/Shared/Models/RtcDtos/ScreenSizeDto.cs index 50449b574..04eeac726 100644 --- a/Shared/Models/RtcDtos/ScreenSizeDto.cs +++ b/Shared/Models/RtcDtos/ScreenSizeDto.cs @@ -7,7 +7,7 @@ namespace Remotely.Shared.Models.RtcDtos { [DataContract] - public class ScreenSizeDto : IDynamicDto + public class ScreenSizeDto : IBinaryDto { public ScreenSizeDto(int width, int height) { @@ -22,6 +22,6 @@ public ScreenSizeDto(int width, int height) public int Height { get; } [DataMember(Name = "DtoType")] - public DynamicDtoType DtoType { get; } = DynamicDtoType.ScreenSize; + public BinaryDtoType DtoType { get; } = BinaryDtoType.ScreenSize; } }