From 6471e4b0b0a78e8cee4c7a765dc0162eef62f122 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Tue, 21 Apr 2020 11:00:41 -0700 Subject: [PATCH] Restructure for sending cursor change through WebRTC. --- .../ViewModels/MainWindowViewModel.cs | 118 +++++++++--------- Desktop.Win/ViewModels/MainWindowViewModel.cs | 39 +++--- ScreenCast.Core/Communication/CasterSocket.cs | 4 +- .../Communication/WebRtcSession.cs | 5 + ScreenCast.Core/Conductor.cs | 10 -- .../Interfaces/ICursorIconWatcher.cs | 15 +++ ScreenCast.Core/Models/Viewer.cs | 14 +-- .../{ScreenCasterBase.cs => ScreenCaster.cs} | 50 +++++--- ScreenCast.Linux/Program.cs | 10 +- .../Services/CursorIconWatcherLinux.cs | 18 +++ .../Services/ScreenCasterLinux.cs | 30 ----- ScreenCast.Win/Program.cs | 40 +++--- ...IconWatcher.cs => CursorIconWatcherWin.cs} | 5 +- ScreenCast.Win/Services/ScreenCasterWin.cs | 47 ------- Server/Services/RCDeviceSocketHub.cs | 4 +- .../scripts/RemoteControl/RCBrowserSockets.js | 2 +- .../RemoteControl/RCBrowserSockets.js.map | 2 +- .../scripts/RemoteControl/RCBrowserSockets.ts | 2 +- .../scripts/RemoteControl/RtcDtos.js.map | 2 +- .../wwwroot/scripts/RemoteControl/RtcDtos.ts | 6 +- .../RemoteControl/RtcMessageHandler.js | 2 +- .../RemoteControl/RtcMessageHandler.js.map | 2 +- .../RemoteControl/RtcMessageHandler.ts | 2 +- Server/wwwroot/scripts/RemoteControl/UI.js | 12 +- .../wwwroot/scripts/RemoteControl/UI.js.map | 2 +- Server/wwwroot/scripts/RemoteControl/UI.ts | 12 +- Shared/Models/RtcDtos/CursorChangeDto.cs | 36 ++++++ 27 files changed, 248 insertions(+), 243 deletions(-) create mode 100644 ScreenCast.Core/Interfaces/ICursorIconWatcher.cs rename ScreenCast.Core/Services/{ScreenCasterBase.cs => ScreenCaster.cs} (72%) create mode 100644 ScreenCast.Linux/Services/CursorIconWatcherLinux.cs delete mode 100644 ScreenCast.Linux/Services/ScreenCasterLinux.cs rename ScreenCast.Win/Services/{CursorIconWatcher.cs => CursorIconWatcherWin.cs} (96%) delete mode 100644 ScreenCast.Win/Services/ScreenCasterWin.cs create mode 100644 Shared/Models/RtcDtos/CursorChangeDto.cs diff --git a/Desktop.Linux/ViewModels/MainWindowViewModel.cs b/Desktop.Linux/ViewModels/MainWindowViewModel.cs index cad48a6f7..72fab17c4 100644 --- a/Desktop.Linux/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Linux/ViewModels/MainWindowViewModel.cs @@ -44,6 +44,7 @@ public MainWindowViewModel() BuildServices(); Conductor = Services.GetRequiredService(); + CasterSocket = Services.GetRequiredService(); Conductor.SessionIDChanged += SessionIDChanged; Conductor.ViewerRemoved += ViewerRemoved; @@ -54,8 +55,6 @@ public MainWindowViewModel() public static MainWindowViewModel Current { get; private set; } - public static IServiceProvider Services => ServiceContainer.Instance; - public ICommand ChangeServerCommand => new Executor(async (param) => { await PromptForHostName(); @@ -67,8 +66,6 @@ public MainWindowViewModel() (param as Window)?.Close(); }); - public Conductor Conductor { get; } - public ICommand CopyLinkCommand => new Executor(async (param) => { await App.Current.Clipboard.SetTextAsync($"{Host}/RemoteControl?sessionID={SessionID.Replace(" ", "")}"); @@ -121,7 +118,7 @@ public bool IsCopyMessageVisible foreach (Viewer viewer in viewerList) { viewer.DisconnectRequested = true; - await Conductor.CasterSocket.SendViewerRemoved(viewer.ViewerConnectionID); + await CasterSocket.SendViewerRemoved(viewer.ViewerConnectionID); } }); @@ -132,52 +129,13 @@ public string SessionID } public ObservableCollection Viewers { get; } = new ObservableCollection(); - private async Task CheckDependencies() - { - var dependencies = new string[] - { - "libx11-dev", - "libc6-dev", - "libgdiplus", - "libxtst-dev", - "xclip" - }; - - foreach (var dependency in dependencies) - { - var proc = Process.Start("dpkg", $"-s {dependency}"); - proc.WaitForExit(); - if (proc.ExitCode != 0) - { - var commands = "sudo apt-get -y install libx11-dev ; " + - "sudo apt-get -y install libc6-dev ; " + - "sudo apt-get -y install libgdiplus ; " + - "sudo apt-get -y install libxtst-dev ; " + - "sudo apt-get -y install xclip"; - - await App.Current.Clipboard.SetTextAsync(commands); - - var message = "The following dependencies are required. Install commands have been copied to your clipboard." + - Environment.NewLine + Environment.NewLine + - "Please paste them into a terminal and run, then try opening Remotely again." + - Environment.NewLine + Environment.NewLine + - "libx11-dev" + Environment.NewLine + - "libc6-dev" + Environment.NewLine + - "libgdiplus" + Environment.NewLine + - "libxtst-dev" + Environment.NewLine + - "xclip"; - - await MessageBox.Show(message, "Dependencies Required", MessageBoxType.OK); - - Environment.Exit(0); - } - } - } - + private static IServiceProvider Services => ServiceContainer.Instance; + private CasterSocket CasterSocket { get; } + private Conductor Conductor { get; } public async Task GetSessionID() { - await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); - await Conductor.CasterSocket.GetSessionID(); + await CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); + await CasterSocket.GetSessionID(); } public async Task Init() @@ -198,9 +156,9 @@ public async Task Init() } Conductor.ProcessArgs(new string[] { "-mode", "Normal", "-host", Host }); - await Conductor.Connect(); + await CasterSocket.Connect(Conductor.Host); - Conductor.CasterSocket.Connection.Closed += async (ex) => + CasterSocket.Connection.Closed += async (ex) => { await Dispatcher.UIThread.InvokeAsync(() => { @@ -208,7 +166,7 @@ await Dispatcher.UIThread.InvokeAsync(() => }); }; - Conductor.CasterSocket.Connection.Reconnecting += async (ex) => + CasterSocket.Connection.Reconnecting += async (ex) => { await Dispatcher.UIThread.InvokeAsync(() => { @@ -216,14 +174,14 @@ await Dispatcher.UIThread.InvokeAsync(() => }); }; - Conductor.CasterSocket.Connection.Reconnected += async (arg) => + CasterSocket.Connection.Reconnected += async (arg) => { await GetSessionID(); }; - await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); - await Conductor.CasterSocket.GetSessionID(); + await CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); + await CasterSocket.GetSessionID(); } catch (Exception ex) { @@ -264,7 +222,7 @@ private void BuildServices() builder.AddConsole().AddDebug(); }); - serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); @@ -275,10 +233,53 @@ private void BuildServices() serviceCollection.AddTransient(); serviceCollection.AddScoped(); serviceCollection.AddScoped(); + serviceCollection.AddSingleton(); ServiceContainer.Instance = serviceCollection.BuildServiceProvider(); } + + private async Task CheckDependencies() + { + var dependencies = new string[] + { + "libx11-dev", + "libc6-dev", + "libgdiplus", + "libxtst-dev", + "xclip" + }; + + foreach (var dependency in dependencies) + { + var proc = Process.Start("dpkg", $"-s {dependency}"); + proc.WaitForExit(); + if (proc.ExitCode != 0) + { + var commands = "sudo apt-get -y install libx11-dev ; " + + "sudo apt-get -y install libc6-dev ; " + + "sudo apt-get -y install libgdiplus ; " + + "sudo apt-get -y install libxtst-dev ; " + + "sudo apt-get -y install xclip"; + + await App.Current.Clipboard.SetTextAsync(commands); + + var message = "The following dependencies are required. Install commands have been copied to your clipboard." + + Environment.NewLine + Environment.NewLine + + "Please paste them into a terminal and run, then try opening Remotely again." + + Environment.NewLine + Environment.NewLine + + "libx11-dev" + Environment.NewLine + + "libc6-dev" + Environment.NewLine + + "libgdiplus" + Environment.NewLine + + "libxtst-dev" + Environment.NewLine + + "xclip"; + + await MessageBox.Show(message, "Dependencies Required", MessageBoxType.OK); + + Environment.Exit(0); + } + } + } private void ScreenCastRequested(object sender, ScreenCastRequest screenCastRequest) { Dispatcher.UIThread.InvokeAsync(async () => @@ -286,10 +287,9 @@ private void ScreenCastRequested(object sender, ScreenCastRequest screenCastRequ var result = await MessageBox.Show($"You've received a connection request from {screenCastRequest.RequesterName}. Accept?", "Connection Request", MessageBoxType.YesNo); if (result == MessageBoxResult.Yes) { - _ = Task.Run(async () => + _ = Task.Run(() => { - await Conductor.CasterSocket.SendCursorChange(new CursorInfo(null, Point.Empty, "default"), new List() { screenCastRequest.ViewerID }); - _ = Services.GetRequiredService().BeginScreenCasting(screenCastRequest); + Services.GetRequiredService().BeginScreenCasting(screenCastRequest); }); } }); diff --git a/Desktop.Win/ViewModels/MainWindowViewModel.cs b/Desktop.Win/ViewModels/MainWindowViewModel.cs index dd3862169..3a1bad179 100644 --- a/Desktop.Win/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Win/ViewModels/MainWindowViewModel.cs @@ -33,10 +33,11 @@ public MainWindowViewModel() BuildServices(); - CursorIconWatcher = Services.GetRequiredService(); + CursorIconWatcher = Services.GetRequiredService(); CursorIconWatcher.OnChange += CursorIconWatcher_OnChange; Services.GetRequiredService().BeginWatching(); Conductor = Services.GetRequiredService(); + CasterSocket = Services.GetRequiredService(); Conductor.SessionIDChanged += SessionIDChanged; Conductor.ViewerRemoved += ViewerRemoved; Conductor.ViewerAdded += ViewerAdded; @@ -59,9 +60,9 @@ public ICommand ChangeServerCommand } } - public Conductor Conductor { get; } - - public CursorIconWatcher CursorIconWatcher { get; private set; } + private Conductor Conductor { get; } + private CasterSocket CasterSocket { get; } + private ICursorIconWatcher CursorIconWatcher { get; set; } public ICommand ElevateToAdminCommand { @@ -139,7 +140,7 @@ public ICommand RemoveViewersCommand { viewer.DisconnectRequested = true; ViewerRemoved(this, viewer.ViewerConnectionID); - await Conductor.CasterSocket.SendViewerRemoved(viewer.ViewerConnectionID); + await CasterSocket.SendViewerRemoved(viewer.ViewerConnectionID); } }, (param) => @@ -169,8 +170,8 @@ public void CopyLink() public async Task GetSessionID() { - await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); - await Conductor.CasterSocket.GetSessionID(); + await CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); + await CasterSocket.GetSessionID(); } public async Task Init() @@ -188,10 +189,10 @@ public async Task Init() Conductor.ProcessArgs(new string[] { "-mode", "Normal", "-host", Host }); try { - await Conductor.Connect(); + await CasterSocket.Connect(Conductor.Host); - Conductor.CasterSocket.Connection.Closed += async (ex) => + CasterSocket.Connection.Closed += async (ex) => { await App.Current.Dispatcher.InvokeAsync(() => { @@ -200,7 +201,7 @@ await App.Current.Dispatcher.InvokeAsync(() => }); }; - Conductor.CasterSocket.Connection.Reconnecting += async (ex) => + CasterSocket.Connection.Reconnecting += async (ex) => { await App.Current.Dispatcher.InvokeAsync(() => { @@ -209,7 +210,7 @@ await App.Current.Dispatcher.InvokeAsync(() => }); }; - Conductor.CasterSocket.Connection.Reconnected += async (arg) => + CasterSocket.Connection.Reconnected += async (arg) => { await GetSessionID(); }; @@ -266,8 +267,8 @@ private void BuildServices() builder.AddConsole().AddDebug().AddEventLog(); }); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); @@ -285,9 +286,12 @@ private void BuildServices() private async void CursorIconWatcher_OnChange(object sender, CursorInfo cursor) { - if (Conductor?.CasterSocket?.IsConnected == true && Conductor?.Viewers?.Count > 0) + if (Conductor?.Viewers?.Count > 0) { - await Conductor?.CasterSocket?.SendCursorChange(cursor, Conductor.Viewers.Keys.ToList()); + foreach (var viewer in Conductor.Viewers.Values) + { + await viewer.SendCursorChange(cursor); + } } } @@ -299,10 +303,9 @@ private void ScreenCastRequested(object sender, ScreenCastRequest screenCastRequ var result = MessageBox.Show(Application.Current.MainWindow, $"You've received a connection request from {screenCastRequest.RequesterName}. Accept?", "Connection Request", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { - Task.Run(async () => + Task.Run(() => { - await Conductor.CasterSocket.SendCursorChange(CursorIconWatcher.GetCurrentCursor(), new List() { screenCastRequest.ViewerID }); - _ = Services.GetRequiredService().BeginScreenCasting(screenCastRequest); + Services.GetRequiredService().BeginScreenCasting(screenCastRequest); }); } }); diff --git a/ScreenCast.Core/Communication/CasterSocket.cs b/ScreenCast.Core/Communication/CasterSocket.cs index 4c0fb9457..2d8d969d0 100644 --- a/ScreenCast.Core/Communication/CasterSocket.cs +++ b/ScreenCast.Core/Communication/CasterSocket.cs @@ -94,9 +94,9 @@ public async Task SendCtrlAltDel() await Connection.SendAsync("CtrlAltDel"); } - public async Task SendCursorChange(CursorInfo cursor, List viewerIDs) + public async Task SendCursorChange(CursorInfo cursor, string viewerID) { - await Connection.SendAsync("SendCursorChange", cursor, viewerIDs); + await Connection.SendAsync("SendCursorChange", cursor, viewerID); } public async Task SendDeviceInfo(string serviceID, string machineName, string deviceID) diff --git a/ScreenCast.Core/Communication/WebRtcSession.cs b/ScreenCast.Core/Communication/WebRtcSession.cs index 4341ec71c..038663bf0 100644 --- a/ScreenCast.Core/Communication/WebRtcSession.cs +++ b/ScreenCast.Core/Communication/WebRtcSession.cs @@ -115,6 +115,11 @@ public void SendScreenSize(int width, int height) SendDto(new ScreenSizeDto(width, height)); } + public void SendCursorChange(CursorInfo cursorInfo) + { + SendDto(new CursorChangeDto(cursorInfo.ImageBytes, cursorInfo.HotSpot.X, cursorInfo.HotSpot.Y, cursorInfo.CssOverride)); + } + public void SetRemoteDescription(string type, string sdp) { PeerConnection.SetRemoteDescription(type, sdp); diff --git a/ScreenCast.Core/Conductor.cs b/ScreenCast.Core/Conductor.cs index 054c8556c..0329871ef 100644 --- a/ScreenCast.Core/Conductor.cs +++ b/ScreenCast.Core/Conductor.cs @@ -12,11 +12,6 @@ namespace Remotely.ScreenCast.Core { public class Conductor { - public Conductor(CasterSocket casterSocket) - { - CasterSocket = casterSocket; - } - public event EventHandler ScreenCastRequested; public event EventHandler SessionIDChanged; @@ -26,7 +21,6 @@ public Conductor(CasterSocket casterSocket) public event EventHandler ViewerRemoved; public Dictionary ArgDict { get; set; } - public CasterSocket CasterSocket { get; private set; } public string DeviceID { get; private set; } public string Host { get; private set; } public AppMode Mode { get; private set; } @@ -34,10 +28,6 @@ public Conductor(CasterSocket casterSocket) public string RequesterID { get; private set; } public string ServiceID { get; private set; } public ConcurrentDictionary Viewers { get; } = new ConcurrentDictionary(); - public async Task Connect() - { - await CasterSocket.Connect(Host); - } public void InvokeScreenCastRequested(ScreenCastRequest viewerIdAndRequesterName) { diff --git a/ScreenCast.Core/Interfaces/ICursorIconWatcher.cs b/ScreenCast.Core/Interfaces/ICursorIconWatcher.cs new file mode 100644 index 000000000..673f757fa --- /dev/null +++ b/ScreenCast.Core/Interfaces/ICursorIconWatcher.cs @@ -0,0 +1,15 @@ +using Remotely.Shared.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Remotely.ScreenCast.Core.Interfaces +{ + public interface ICursorIconWatcher + { + event EventHandler OnChange; + + CursorInfo GetCurrentCursor(); + } + +} diff --git a/ScreenCast.Core/Models/Viewer.cs b/ScreenCast.Core/Models/Viewer.cs index 55addde48..9735c6fa7 100644 --- a/ScreenCast.Core/Models/Viewer.cs +++ b/ScreenCast.Core/Models/Viewer.cs @@ -1,6 +1,7 @@ using Remotely.ScreenCast.Core.Communication; using Remotely.ScreenCast.Core.Interfaces; using Remotely.ScreenCast.Core.Services; +using Remotely.Shared.Models; using System; using System.Drawing.Imaging; using System.Threading.Tasks; @@ -61,21 +62,13 @@ public int ImageQuality } public bool IsConnected => CasterSocket.IsConnected; - public string Name { get; set; } - public WebRtcSession RtcSession { get; set; } - public string ViewerConnectionID { get; set; } - public int WebSocketBuffer { get; set; } - private IAudioCapturer AudioCapturer { get; } - private CasterSocket CasterSocket { get; } - private IClipboardService ClipboardService { get; } - private IWebRtcSessionFactory WebRtcSessionFactory { get; } public void Dispose() @@ -126,6 +119,11 @@ public async Task SendClipboardText(string clipboardText) await SendToViewer(() => RtcSession.SendClipboardText(clipboardText), () => CasterSocket.SendClipboardText(clipboardText, ViewerConnectionID)); } + public async Task SendCursorChange(CursorInfo cursorInfo) + { + await SendToViewer(() => RtcSession.SendCursorChange(cursorInfo), + () => CasterSocket.SendCursorChange(cursorInfo, ViewerConnectionID)); + } public async Task SendMachineName(string machineName, string viewerID) { diff --git a/ScreenCast.Core/Services/ScreenCasterBase.cs b/ScreenCast.Core/Services/ScreenCaster.cs similarity index 72% rename from ScreenCast.Core/Services/ScreenCasterBase.cs rename to ScreenCast.Core/Services/ScreenCaster.cs index fb59f9abe..a447ae27a 100644 --- a/ScreenCast.Core/Services/ScreenCasterBase.cs +++ b/ScreenCast.Core/Services/ScreenCaster.cs @@ -12,13 +12,23 @@ using Remotely.Shared.Utilities; using System.Collections.Concurrent; using Remotely.ScreenCast.Core.Enums; +using Remotely.Shared.Models; +using Remotely.Shared.Win32; namespace Remotely.ScreenCast.Core.Services { - public class ScreenCasterBase + public class ScreenCaster : IScreenCaster { - public async Task BeginScreenCasting(string viewerID, - string requesterName) + public ScreenCaster(Conductor conductor, ICursorIconWatcher cursorIconWatcher) + { + Conductor = conductor; + CursorIconWatcher = cursorIconWatcher; + } + + private Conductor Conductor { get; } + private ICursorIconWatcher CursorIconWatcher { get; } + + public async Task BeginScreenCasting(ScreenCastRequest screenCastRequest) { var viewers = new ConcurrentDictionary(); var mode = AppMode.Unattended; @@ -27,41 +37,43 @@ public async Task BeginScreenCasting(string viewerID, { byte[] encodedImageBytes; var fpsQueue = new Queue(); - var conductor = ServiceContainer.Instance.GetRequiredService(); - mode = conductor.Mode; + mode = Conductor.Mode; var viewer = ServiceContainer.Instance.GetRequiredService(); - viewer.Name = requesterName; - viewer.ViewerConnectionID = viewerID; - viewers = conductor.Viewers; + viewer.Name = screenCastRequest.RequesterName; + viewer.ViewerConnectionID = screenCastRequest.ViewerID; + viewers = Conductor.Viewers; - Logger.Write($"Starting screen cast. Requester: {requesterName}. Viewer ID: {viewerID}. App Mode: {mode}"); + Logger.Write($"Starting screen cast. Requester: {viewer.Name}. Viewer ID: {viewer.ViewerConnectionID}. App Mode: {mode}"); - viewers.AddOrUpdate(viewerID, viewer, (id, v) => viewer); + viewers.AddOrUpdate(viewer.ViewerConnectionID, viewer, (id, v) => viewer); - if (mode == Enums.AppMode.Normal) + if (mode == AppMode.Normal) { - conductor.InvokeViewerAdded(viewer); + Conductor.InvokeViewerAdded(viewer); } if (EnvironmentHelper.IsWindows) { + Win32Interop.SwitchToInputDesktop(); await viewer.InitializeWebRtc(); } - await viewer.SendMachineName(Environment.MachineName, viewerID); + await viewer.SendMachineName(Environment.MachineName, viewer.ViewerConnectionID); await viewer.SendScreenData( viewer.Capturer.SelectedScreen, viewer.Capturer.GetDisplayNames().ToArray(), - viewerID); + viewer.ViewerConnectionID); await viewer.SendScreenSize(viewer.Capturer.CurrentScreenBounds.Width, viewer.Capturer.CurrentScreenBounds.Height, - viewerID); + viewer.ViewerConnectionID); + + await viewer.SendCursorChange(CursorIconWatcher.GetCurrentCursor()); viewer.Capturer.ScreenChanged += async (sender, bounds) => { - await viewer.SendScreenSize(bounds.Width, bounds.Height, viewerID); + await viewer.SendScreenSize(bounds.Width, bounds.Height, viewer.ViewerConnectionID); }; while (!viewer.DisconnectRequested && viewer.IsConnected) @@ -107,7 +119,7 @@ await viewer.SendScreenSize(viewer.Capturer.CurrentScreenBounds.Width, if (encodedImageBytes?.Length > 0) { - await viewer.SendScreenCapture(encodedImageBytes, viewerID, diffArea.Left, diffArea.Top, diffArea.Width, diffArea.Height); + await viewer.SendScreenCapture(encodedImageBytes, viewer.ViewerConnectionID, diffArea.Left, diffArea.Top, diffArea.Width, diffArea.Height); } } } @@ -117,8 +129,8 @@ await viewer.SendScreenSize(viewer.Capturer.CurrentScreenBounds.Width, } } - Logger.Write($"Ended screen cast. Requester: {requesterName}. Viewer ID: {viewerID}."); - viewers.TryRemove(viewerID, out _); + Logger.Write($"Ended screen cast. Requester: {viewer.Name}. Viewer ID: {viewer.ViewerConnectionID}."); + viewers.TryRemove(viewer.ViewerConnectionID, out _); viewer.Dispose(); } catch (Exception ex) diff --git a/ScreenCast.Linux/Program.cs b/ScreenCast.Linux/Program.cs index 26fdbe8b5..f53d1ff2a 100644 --- a/ScreenCast.Linux/Program.cs +++ b/ScreenCast.Linux/Program.cs @@ -36,10 +36,11 @@ public static void Main(string[] args) } else { - Conductor.Connect().ContinueWith(async (task) => + var casterSocket = Services.GetRequiredService(); + casterSocket.Connect(Conductor.Host).ContinueWith(async (task) => { - await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); - await Conductor.CasterSocket.NotifyRequesterUnattendedReady(Conductor.RequesterID); + await casterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); + await casterSocket.NotifyRequesterUnattendedReady(Conductor.RequesterID); Services.GetRequiredService().Start(); }); } @@ -61,7 +62,7 @@ private static void BuildServices() builder.AddConsole().AddDebug(); }); - serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); @@ -73,6 +74,7 @@ private static void BuildServices() serviceCollection.AddTransient(); serviceCollection.AddScoped(); serviceCollection.AddScoped(); + serviceCollection.AddSingleton(); ServiceContainer.Instance = serviceCollection.BuildServiceProvider(); } diff --git a/ScreenCast.Linux/Services/CursorIconWatcherLinux.cs b/ScreenCast.Linux/Services/CursorIconWatcherLinux.cs new file mode 100644 index 000000000..c1887cb84 --- /dev/null +++ b/ScreenCast.Linux/Services/CursorIconWatcherLinux.cs @@ -0,0 +1,18 @@ +using Remotely.ScreenCast.Core.Interfaces; +using Remotely.Shared.Models; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Text; + +namespace Remotely.ScreenCast.Linux.Services +{ + public class CursorIconWatcherLinux : ICursorIconWatcher + { +#pragma warning disable + public event EventHandler OnChange; +#pragma warning restore + + public CursorInfo GetCurrentCursor() => new CursorInfo(null, Point.Empty, "default"); + } +} diff --git a/ScreenCast.Linux/Services/ScreenCasterLinux.cs b/ScreenCast.Linux/Services/ScreenCasterLinux.cs deleted file mode 100644 index a279ab58d..000000000 --- a/ScreenCast.Linux/Services/ScreenCasterLinux.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Remotely.ScreenCast.Core; -using Remotely.ScreenCast.Core.Interfaces; -using Remotely.ScreenCast.Core.Models; -using Remotely.ScreenCast.Core.Services; -using Remotely.Shared.Models; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Threading.Tasks; - -namespace Remotely.ScreenCast.Linux.Services -{ - public class ScreenCasterLinux : ScreenCasterBase, IScreenCaster - { - public async Task BeginScreenCasting(ScreenCastRequest screenCastRequest) - { - try - { - var conductor = ServiceContainer.Instance.GetRequiredService(); - await conductor.CasterSocket.SendCursorChange(new CursorInfo(null, Point.Empty, "default"), new List() { screenCastRequest.ViewerID }); - _ = BeginScreenCasting(screenCastRequest.ViewerID, screenCastRequest.RequesterName); - } - catch (Exception ex) - { - Logger.Write(ex); - } - } - } -} diff --git a/ScreenCast.Win/Program.cs b/ScreenCast.Win/Program.cs index 34301f443..8b99720d1 100644 --- a/ScreenCast.Win/Program.cs +++ b/ScreenCast.Win/Program.cs @@ -17,17 +17,18 @@ namespace Remotely.ScreenCast.Win { public class Program { - public static Conductor Conductor { get; private set; } - public static CursorIconWatcher CursorIconWatcher { get; private set; } - public static IServiceProvider Services => ServiceContainer.Instance; - - private static string CurrentDesktopName { get; set; - } + private static Conductor Conductor { get; set; } + private static CasterSocket CasterSocket { get; set; } + private static ICursorIconWatcher CursorIconWatcher { get; set; } + private static IServiceProvider Services => ServiceContainer.Instance; public static async void CursorIconWatcher_OnChange(object sender, CursorInfo cursor) { - if (Conductor?.CasterSocket?.IsConnected == true) + if (Conductor?.Viewers?.Count > 0) { - await Conductor.CasterSocket.SendCursorChange(cursor, Conductor.Viewers.Keys.ToList()); + foreach (var viewer in Conductor.Viewers.Values) + { + await viewer.SendCursorChange(cursor); + } } } @@ -40,6 +41,7 @@ public static void Main(string[] args) BuildServices(); Conductor = Services.GetRequiredService(); + CasterSocket = Services.GetRequiredService(); Conductor.ProcessArgs(Environment.GetCommandLineArgs().SkipWhile(x => !x.StartsWith("-")).ToArray()); if (Conductor.Mode == Core.Enums.AppMode.Chat) @@ -67,8 +69,8 @@ private static void BuildServices() builder.AddConsole().AddDebug().AddEventLog(); }); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); @@ -94,31 +96,27 @@ private static async Task SendReadyNotificationToViewers() if (Conductor.ArgDict.ContainsKey("relaunch")) { - Logger.Write($"Resuming after relaunch in desktop {CurrentDesktopName}."); + Logger.Write($"Resuming after relaunch."); var viewersString = Conductor.ArgDict["viewers"]; var viewerIDs = viewersString.Split(",".ToCharArray()); - await Conductor.CasterSocket.NotifyViewersRelaunchedScreenCasterReady(viewerIDs); + await CasterSocket.NotifyViewersRelaunchedScreenCasterReady(viewerIDs); } else { - await Conductor.CasterSocket.NotifyRequesterUnattendedReady(Conductor.RequesterID); + await CasterSocket.NotifyRequesterUnattendedReady(Conductor.RequesterID); } } private static void StartScreenCasting() { - CursorIconWatcher = Services.GetRequiredService(); + CursorIconWatcher = Services.GetRequiredService(); - Conductor.Connect().ContinueWith(async (task) => + CasterSocket.Connect(Conductor.Host).ContinueWith(async (task) => { - await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); + await CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID); if (Win32Interop.GetCurrentDesktop(out var currentDesktopName)) { Logger.Write($"Setting initial desktop to {currentDesktopName}."); - if (Win32Interop.SwitchToInputDesktop()) - { - CurrentDesktopName = currentDesktopName; - } - else + if (!Win32Interop.SwitchToInputDesktop()) { Logger.Write("Failed to set initial desktop."); } diff --git a/ScreenCast.Win/Services/CursorIconWatcher.cs b/ScreenCast.Win/Services/CursorIconWatcherWin.cs similarity index 96% rename from ScreenCast.Win/Services/CursorIconWatcher.cs rename to ScreenCast.Win/Services/CursorIconWatcherWin.cs index 8c37020b4..43552fd0b 100644 --- a/ScreenCast.Win/Services/CursorIconWatcher.cs +++ b/ScreenCast.Win/Services/CursorIconWatcherWin.cs @@ -7,15 +7,16 @@ using System.Windows.Forms; using Remotely.Shared.Win32; using Remotely.Shared.Models; +using Remotely.ScreenCast.Core.Interfaces; namespace Remotely.ScreenCast.Win.Services { /// /// A class that can be used to watch for cursor icon changes. /// - public class CursorIconWatcher + public class CursorIconWatcherWin : ICursorIconWatcher { - public CursorIconWatcher() + public CursorIconWatcherWin() { ChangeTimer = new System.Timers.Timer(25); ChangeTimer.Elapsed += ChangeTimer_Elapsed; diff --git a/ScreenCast.Win/Services/ScreenCasterWin.cs b/ScreenCast.Win/Services/ScreenCasterWin.cs deleted file mode 100644 index 64c892083..000000000 --- a/ScreenCast.Win/Services/ScreenCasterWin.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Remotely.ScreenCast.Core.Interfaces; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Remotely.ScreenCast.Core.Services; -using Remotely.ScreenCast.Core; -using Remotely.Shared.Models; -using Remotely.Shared.Win32; -using Microsoft.Extensions.DependencyInjection; -using Remotely.ScreenCast.Core.Models; - -namespace Remotely.ScreenCast.Win.Services -{ - public class ScreenCasterWin : ScreenCasterBase, IScreenCaster - { - public ScreenCasterWin(CursorIconWatcher cursorIconWatcher) - { - CursorIconWatcher = cursorIconWatcher; - } - - protected CursorIconWatcher CursorIconWatcher { get; } - - public async Task BeginScreenCasting(ScreenCastRequest screenCastRequest) - { - try - { - if (Win32Interop.GetCurrentDesktop(out var currentDesktopName)) - { - Logger.Write($"Setting desktop to {currentDesktopName} before screen casting."); - Win32Interop.SwitchToInputDesktop(); - } - else - { - Logger.Write("Failed to get current desktop before screen casting."); - } - - var conductor = ServiceContainer.Instance.GetRequiredService(); - await conductor.CasterSocket.SendCursorChange(CursorIconWatcher.GetCurrentCursor(), new List() { screenCastRequest.ViewerID }); - _ = BeginScreenCasting(screenCastRequest.ViewerID, screenCastRequest.RequesterName); - } - catch (Exception ex) - { - Logger.Write(ex); - } - } - } -} diff --git a/Server/Services/RCDeviceSocketHub.cs b/Server/Services/RCDeviceSocketHub.cs index 0d4e74015..4904f98a8 100644 --- a/Server/Services/RCDeviceSocketHub.cs +++ b/Server/Services/RCDeviceSocketHub.cs @@ -163,9 +163,9 @@ public Task SendConnectionFailedToViewers(List viewerIDs) return RCBrowserHub.Clients.Clients(viewerIDs).SendAsync("ConnectionFailed"); } - public Task SendCursorChange(CursorInfo cursor, List viewerIDs) + public Task SendCursorChange(CursorInfo cursor, string viewerID) { - return RCBrowserHub.Clients.Clients(viewerIDs).SendAsync("CursorChange", cursor); + return RCBrowserHub.Clients.Client(viewerID).SendAsync("CursorChange", cursor); } public Task SendMachineName(string machineName, string viewerID) diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js index 4bc99e2f3..77f9cd244 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js @@ -185,7 +185,7 @@ export class RCBrowserSockets { UI.ShowMessage("Reconnecting..."); }); hubConnection.on("CursorChange", (cursor) => { - UI.UpdateCursor(cursor); + UI.UpdateCursor(cursor.ImageBytes, cursor.HotSpot.X, cursor.HotSpot.Y, cursor.CssOverride); }); hubConnection.on("RequestingScreenCast", () => { UI.ShowMessage("Requesting remote control..."); diff --git a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map index 7f0de6ca2..3ede73078 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.js.map @@ -1 +1 @@ -{"version":3,"file":"RCBrowserSockets.js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AC,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 e3f546263..3c32f32d3 100644 --- a/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts +++ b/Server/wwwroot/scripts/RemoteControl/RCBrowserSockets.ts @@ -205,7 +205,7 @@ export class RCBrowserSockets { }); hubConnection.on("CursorChange", (cursor: CursorInfo) => { - UI.UpdateCursor(cursor); + UI.UpdateCursor(cursor.ImageBytes, cursor.HotSpot.X, cursor.HotSpot.Y, cursor.CssOverride); }); hubConnection.on("RequestingScreenCast", () => { diff --git a/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map b/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map index 4f49497d0..de6cf5c2a 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map +++ b/Server/wwwroot/scripts/RemoteControl/RtcDtos.js.map @@ -1 +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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Ac;QAO1C,YAAO,GAAkB,aAAa,CAAC,UAAU,CAAC;QAN9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CAKJ;AAED,MAAM,OAAO,gBAAgB;IACzB,YAAY,YAAoB;QAKhC,YAAO,GAAkB,aAAa,CAAC,aAAa,CAAC;QAJjD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;CAIJ;AAYD,MAAM,OAAO,eAAe;IACxB,YAAY,WAAmB;QAK/B,YAAO,GAAkB,aAAa,CAAC,YAAY,CAAC;QAJhD,IAAI,CAAC,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 index 500b34aa7..41a184727 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcDtos.ts +++ b/Server/wwwroot/scripts/RemoteControl/RtcDtos.ts @@ -1,6 +1,7 @@ import { BinaryDto } from "./BinaryDto.js"; import { BinaryDtoType } from "../Enums/BinaryDtoType.js"; import { CursorInfo } from "../Models/CursorInfo.js"; +import { Point } from "../Models/Point.js"; export class AutoQualityAdjustDto implements BinaryDto { constructor(isOn: boolean) { @@ -48,7 +49,10 @@ export class CtrlAltDelDto implements BinaryDto { } export interface CursorChangeDto extends BinaryDto { - CursorInfo: CursorInfo; + ImageBytes: Uint8Array; + HotSpotX: number; + HotSpotY: number; + CssOverride: string; } export class FileDto implements BinaryDto { diff --git a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js index 406dc1f92..cac308c18 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js +++ b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js @@ -71,7 +71,7 @@ export class RtcMessageHandler { ShowMessage("Clipboard updated."); } HandleCursorChange(cursorChange) { - UI.UpdateCursor(cursorChange.CursorInfo); + UI.UpdateCursor(cursorChange.ImageBytes, cursorChange.HotSpotX, cursorChange.HotSpotY, cursorChange.CssOverride); } HandleMachineName(machineNameDto) { document.title = `${machineNameDto.MachineName} - Remotely Session`; diff --git a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js.map b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.js.map index 379648d1e..c557f56ee 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,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAYpC,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,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 d098651a3..da5ddefac 100644 --- a/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.ts +++ b/Server/wwwroot/scripts/RemoteControl/RtcMessageHandler.ts @@ -87,7 +87,7 @@ export class RtcMessageHandler { ShowMessage("Clipboard updated."); } HandleCursorChange(cursorChange: CursorChangeDto) { - UI.UpdateCursor(cursorChange.CursorInfo); + UI.UpdateCursor(cursorChange.ImageBytes, cursorChange.HotSpotX, cursorChange.HotSpotY, cursorChange.CssOverride); } HandleMachineName(machineNameDto: MachineNameDto) { document.title = `${machineNameDto.MachineName} - Remotely Session`; diff --git a/Server/wwwroot/scripts/RemoteControl/UI.js b/Server/wwwroot/scripts/RemoteControl/UI.js index 7ba1998dc..00a06f19f 100644 --- a/Server/wwwroot/scripts/RemoteControl/UI.js +++ b/Server/wwwroot/scripts/RemoteControl/UI.js @@ -421,16 +421,16 @@ export function ShowMessage(message) { messageDiv.remove(); }, 5000); } -export function UpdateCursor(cursor) { - if (cursor.CssOverride) { - ScreenViewer.style.cursor = cursor.CssOverride; +export function UpdateCursor(imageBytes, hotSpotX, hotSpotY, cssOverride) { + if (cssOverride) { + ScreenViewer.style.cursor = cssOverride; } - else if (cursor.ImageBytes.byteLength == 0) { + else if (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`; + var base64 = ConvertUInt8ArrayToBase64(imageBytes); + ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${hotSpotX} ${hotSpotY}, default`; } } export function UpdateDisplays(selectedDisplay, displayNames) { diff --git a/Server/wwwroot/scripts/RemoteControl/UI.js.map b/Server/wwwroot/scripts/RemoteControl/UI.js.map index cd8776688..c1953841f 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,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,IAAI,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAsB,CAAC;AACrF,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAsB,CAAC;AACnF,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAmB,CAAC;AAC9E,MAAM,CAAC,IAAI,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAqB,CAAC;AAC1F,MAAM,CAAC,IAAI,aAAa,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAsB,CAAC;AACzF,MAAM,CAAC,IAAI,kBAAkB,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAqB,CAAC;AACzF,MAAM,CAAC,IAA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C,MAAM,CAAC,EAAE;gBAClF,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;YACF,EAAE,CAAC,aAAmC,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACrE,CAAC,CAAC;KACL;AACL,CAAC;AAGD,SAAS,sBAAsB,CAAC,WAAmB;IAC/C,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QACvB,IAAI,CAAC,CAAC,EAAE,IAAI,WAAW,EAAE;YACrB,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,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 03e5ac7ad..4013300d9 100644 --- a/Server/wwwroot/scripts/RemoteControl/UI.ts +++ b/Server/wwwroot/scripts/RemoteControl/UI.ts @@ -467,16 +467,16 @@ export function ShowMessage(message: string) { }, 5000); } -export function UpdateCursor(cursor: CursorInfo) { - if (cursor.CssOverride) { - ScreenViewer.style.cursor = cursor.CssOverride; +export function UpdateCursor(imageBytes: Uint8Array, hotSpotX: number, hotSpotY: number, cssOverride: string) { + if (cssOverride) { + ScreenViewer.style.cursor = cssOverride; } - else if (cursor.ImageBytes.byteLength == 0) { + else if (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`; + var base64 = ConvertUInt8ArrayToBase64(imageBytes); + ScreenViewer.style.cursor = `url('data:image/png;base64,${base64}') ${hotSpotX} ${hotSpotY}, default`; } } diff --git a/Shared/Models/RtcDtos/CursorChangeDto.cs b/Shared/Models/RtcDtos/CursorChangeDto.cs new file mode 100644 index 000000000..a235bd99d --- /dev/null +++ b/Shared/Models/RtcDtos/CursorChangeDto.cs @@ -0,0 +1,36 @@ +using Remotely.Shared.Enums; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Runtime.Serialization; +using System.Text; + +namespace Remotely.Shared.Models.RtcDtos +{ + [DataContract] + public class CursorChangeDto : BinaryDtoBase + { + public CursorChangeDto(byte[] imageBytes, int hotSpotX, int hotSpotY, string cssOverride) + { + ImageBytes = imageBytes; + HotSpotX = hotSpotX; + HotSpotY = hotSpotY; + CssOverride = cssOverride; + } + + [DataMember(Name = "CssOverride")] + public string CssOverride { get; } + + [DataMember(Name = "DtoType")] + public new BinaryDtoType DtoType { get; } = BinaryDtoType.CursorChange; + + [DataMember(Name = "HotSpotX")] + public int HotSpotX { get; } + + [DataMember(Name = "HotSpotY")] + public int HotSpotY { get; } + + [DataMember(Name = "ImageBytes")] + public byte[] ImageBytes { get; } + } +}