GFN Client Overview
The GFN client is an Angular-based application delivered as bundled JavaScript. The source was obtained by beautifying production client bundles from the rig/client package snapshot.
Bundle Files
| File | Size | Purpose |
|---|---|---|
vendor_beautified.js | 3.0 MB / 115,689 lines | WebRTC, networking, session management, telemetry |
main_beautified.js | 5.7 MB / 143,116 lines | Core services, IPC bridge, database, logging |
298_beautified.js | 4.3 MB / 103,534 lines | Streaming manager, platform selection UI |
277_beautified.js | 1.1 MB / 18,755 lines | UI carousel, game tiles, telemetry |
598_beautified.js | 105 KB / 2,934 lines | Angular Material forms |
Total: ~384,000 lines of client code
Architecture
┌─────────────────────────────────────────────────┐
│ GFN Client (Angular) │
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ UI Layer │ │ IPC Bridge │ │
│ │ (277, 298) │ │ (main) │ │
│ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │
│ ┌──────▼─────────────────▼──────┐ │
│ │ Core Services (main) │ │
│ │ - StreamingManagerService │ │
│ │ - StreamingService │ │
│ │ - TelemetryService │ │
│ │ - AuthService │ │
│ │ - DatabaseService │ │
│ └──────┬────────────────────────┘ │
│ │ │
│ ┌──────▼────────────────────────┐ │
│ │ vendor.js (WebRTC/Session) │ │
│ │ - NetworkTest (ntrtcclient) │ │
│ │ - WebRTC streaming │ │
│ │ - Session state machine │ │
│ │ - Telemetry aggregator │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────────────────┘Key Services
| Service | File | Description |
|---|---|---|
StreamingManagerService | 298 | Orchestrates streaming lifecycle, platform selection |
StreamerConfigService | 298 | Streaming configuration |
StreamingService | 298 | Active streaming state |
GameSessionDistributedTracingService | 298 | Session tracing/telemetry |
TelemetryService | main/277 | Analytics event sending |
GFNUriActionHandlerService | 277 | GFN URI scheme handling |
NetworkTest | vendor | Pre-session network quality check |
GFN Commands (IPC Bridge)
The client exposes a bridge IPC to the native shell. Key command categories:
Authentication
SET_AUTH_INFOSET_AUTH_TOKEN
Session Control
QUERY_GFN_STARTQUERY_GFN_STOPQUERY_GFN_GET_SESSION_INFOPAUSE_STREAMINGRESUMECANCEL
Streaming Stats
QUERY_GFN_GET_STREAM_STATSQUERY_GFN_REGISTER_CALLBACKIPC_GFN_REMOTE_CONFIG_UPDATED_EVENT
Input
- Keyboard layout management
- Microphone control
- Gamepad input management
Display
- HDR capabilities query
- FPS capabilities query
- Volume control
GFN URI Scheme
The client handles gfn:// URIs:
| URI Action | Description |
|---|---|
GFN_PC_MEMBERSHIP_JOIN | Open membership join flow |
GFN_PC_MEMBERSHIP_UPGRADE | Open membership upgrade |
GFN_PC_HELP_CONNECTIONS | Open connection help |
Build Info
From vendor_beautified.js:
USER_AGENT: "GFN-PC/1.0 (WebRTC) NetworkTest/0.0.51"
CLIENT_IDENTIFICATION: "GFN-PC"
CLIENT_VERSION: "1.0"
CHANGELIST: "master-8926289"