Skip to main content

Real-time Remote Screen Viewing (Screen Streaming)

The Streaming system (server-nest/src/screen-streaming) allows administrators to watch what's happening on the screen in real-time, similar to VNC but web-based.

Technology

The solution uses WebSockets (ScreenStreamingGateway) for frame transmission.

Data Flow

  1. Start Stream: The administrator requests viewing. The server sends a START_STREAM command to the device.
  2. Device Capture: The device starts capturing the screen at a defined rate (for example 5-10 FPS).
  3. Compression: Each frame is compressed to JPEG (at low/medium quality to save bandwidth).
  4. Transmission: The frames are sent via Socket to the server.
  5. Broadcasting: The server passes the frames to the client (Admin Dashboard) which displays them on an <img /> or <canvas /> element that updates frequently.

Security and Performance

  • Token Auth: The Socket channel is secured and requires MANAGE_REMOTE_CONTROL permission.
  • Throttling: The server limits the transmission rate to avoid choking the synagogue's network.
  • Auto Stop: The streaming stops automatically if the administrator closes the window or after a timeout (for example 2 minutes) to save resources.

Common Issues

  • Lag: Highly dependent on the synagogue's upload speed.
  • Black Screen: On some Android devices, protected video content (DRM) may appear black in screenshots.