Add web bridge: browser Remote Play over WebRTC #808

Open
zalo wants to merge 2 commits from zalo/webbridge into main
zalo commented 2026-09-03 15:42:51 -05:00 (Migrated from github.com)

chiaki-web is a headless bridge that embeds chiaki-lib to run a real Remote Play session and relays it to any modern browser (desktop or mobile). The browser is a thin client; the console-facing half is all libchiaki.

  • Video: Annex-B H.264/HEVC access units over a partially-reliable WebRTC DataChannel, decoded with WebCodecs in a worker.
  • Audio: the console's Opus as a native RTP Opus track.
  • Input: JSON over a reliable DataChannel (keyboard, Gamepad API with rumble, and a dual-stick multi-touch on-screen controller). Mic via the libchiaki Opus encoder.
  • WebSocket transport fallback for UDP-hostile networks.
  • Discovery / wakeup / pairing over REST; demo mode for pipeline validation.

Gated behind CHIAKI_ENABLE_WEBBRIDGE (OFF by default); self-contained under webbridge/ and consumes only the public libchiaki API. nlohmann/json and cpp-httplib are fetched via FetchContent, not vendored.

See webbridge/README.md and webbridge/PROTOCOL.md.

Note: It works pretty well! Solid latency, smoothness, and performance on Windows, Mac, and iOS Chrome browsers, even when forwarded over Cloudflare TURN relay servers.

https://github.com/user-attachments/assets/d4a483bd-5858-4349-bf45-e1ef324cd17c

chiaki-web is a headless bridge that embeds chiaki-lib to run a real Remote Play session and relays it to any modern browser (desktop or mobile). The browser is a thin client; the console-facing half is all libchiaki. - Video: Annex-B H.264/HEVC access units over a partially-reliable WebRTC DataChannel, decoded with WebCodecs in a worker. - Audio: the console's Opus as a native RTP Opus track. - Input: JSON over a reliable DataChannel (keyboard, Gamepad API with rumble, and a dual-stick multi-touch on-screen controller). Mic via the libchiaki Opus encoder. - WebSocket transport fallback for UDP-hostile networks. - Discovery / wakeup / pairing over REST; demo mode for pipeline validation. Gated behind CHIAKI_ENABLE_WEBBRIDGE (OFF by default); self-contained under webbridge/ and consumes only the public libchiaki API. nlohmann/json and cpp-httplib are fetched via FetchContent, not vendored. See webbridge/README.md and webbridge/PROTOCOL.md. Note: It works pretty well! Solid latency, smoothness, and performance on Windows, Mac, and iOS Chrome browsers, even when forwarded over Cloudflare TURN relay servers. https://github.com/user-attachments/assets/d4a483bd-5858-4349-bf45-e1ef324cd17c
CSystem77 commented 2026-09-05 13:35:59 -05:00 (Migrated from github.com)

Hey,

I did the same thing using WASM with a proxy. Here are the sources: Chiaki-NG-Web.

Video :
https://www.youtube.com/watch?v=oqji_qCdI4E

Hey, I did the same thing using WASM with a proxy. Here are the sources: [Chiaki-NG-Web](https://github.com/CSystem77/Chiaki-NG-Web). Video : [https://www.youtube.com/watch?v=oqji_qCdI4E](https://www.youtube.com/watch?v=oqji_qCdI4E)
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'zalo/webbridge:zalo/webbridge'
git switch 'zalo/webbridge'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'zalo/webbridge'
git switch 'zalo/webbridge'
git rebase 'main'
git switch 'main'
git merge --ff-only 'zalo/webbridge'
git switch 'zalo/webbridge'
git rebase 'main'
git switch 'main'
git merge --no-ff 'zalo/webbridge'
git switch 'main'
git merge --squash 'zalo/webbridge'
git switch 'main'
git merge --ff-only 'zalo/webbridge'
git switch 'main'
git merge 'zalo/webbridge'
git push origin 'main'
Sign in to join this conversation.
No description provided.