Skip to main content

Browser Client

The CloudGaming client is a browser-based application that receives video/audio streams via WebRTC and forwards input to the host.

Architecture Overview

The client consists of:
  • WebRTC Peer Connection: Video/audio track reception
  • Video Rendering: Hardware-accelerated direct rendering
  • Audio Playback: Dedicated audio element with low-latency configuration
  • Input Capture: Keyboard/mouse event forwarding via DataChannels
  • Latency Measurement: Round-trip time tracking via ping/pong
  • Matchmaker Integration: Automatic host discovery

Implementation

WebRTC Connection Establishment

Peer Connection Creation

SDP Negotiation

Signaling via WebSocket

UI Components

Loading Overlay

Performance Overlay

Debug Console

Key Source Files

index.html

Main client application with WebRTC, rendering, and input handling.

adapter.js

WebRTC adapter shim for cross-browser compatibility.
Browser Compatibility:
  • Chrome 90+: Full support including requestVideoFrameCallback
  • Firefox 89+: Full support
  • Safari 15.4+: Limited support (no rVFC)
  • Edge 90+: Full support (Chromium-based)