public Task SendScreenCapture(byte[] captureBytes, string rcBrowserHubConnectionID, int left, int top, int width, int height, DateTime captureTime) { if (AppConfig.RecordRemoteControlSessions) { RCSessionRecorder.SaveFrame(captureBytes, left, top, CurrentScreenSize.Width, CurrentScreenSize.Height, rcBrowserHubConnectionID, MachineName, StartTime); } return(RCBrowserHub.Clients.Client(rcBrowserHubConnectionID).SendAsync("ScreenCapture", captureBytes, left, top, width, height, captureTime)); }
public override async Task OnDisconnectedAsync(Exception exception) { if (Context.User.Identity.IsAuthenticated) { OrganizationConnectionList.Remove(Context.ConnectionId, out _); } await RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ViewerDisconnected", Context.ConnectionId); if (AppConfig.RecordRemoteControlSessions) { RCSessionRecorder.StopProcessing(Context.ConnectionId); } }
public override Task OnDisconnectedAsync(Exception exception) { if (ScreenCasterID != null) { RCDeviceHubContext.Clients.Client(ScreenCasterID).SendAsync("ViewerDisconnected", Context.ConnectionId); } if (AppConfig.RecordRemoteControlSessions) { RCSessionRecorder.StopProcessing(Context.ConnectionId); } return(base.OnDisconnectedAsync(exception)); }
public override async Task OnDisconnectedAsync(Exception exception) { if (Context.User.Identity.IsAuthenticated) { while (!OrganizationConnectionList.TryRemove(Context.ConnectionId, out var user)) { await Task.Delay(1000); } } await RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ViewerDisconnected", Context.ConnectionId); if (AppConfig.RecordRemoteControlSessions) { RCSessionRecorder.EncodeFrames(Context.ConnectionId); } }