Closes the coverage gap the README flagged as "Next": two real str0m clients
connect to the sidecar over loopback UDP (full ICE/DTLS/SRTP + the data-channel
renegotiation the browser does), peer A sends Opus RTP, and we assert peer B
RECEIVES the forwarded media. Pure `cargo test`, ~0.8s, no browser — proves the
SFU data plane (accept offer → forward without decode) end to end.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Backend-hosted rooms now work on a plain `composer require`/`update` with no
download step: rust/dist/blax-webrtc-sfu-linux-x86_64 (+ .sha256) is committed
and BinaryManager::find() resolves rust/dist/blax-webrtc-sfu-<platform> before
the download fallback. A consuming app just sets WEBRTC_MEDIA_ENGINE=
RustMediaEngine (+ pin/publish WEBRTC_SFU_UDP_PORT and WEBRTC_SFU_PUBLIC_IP for
prod) and the sidecar auto-spawns.
- .gitignore: keep rust/target/ ignored, COMMIT rust/dist/ (shipped binaries)
- BinaryManager: add shipped-binary resolution + doc; README/doc updated
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rust/ becomes a standalone static binary (blax-webrtc-sfu, tokio-free
std-thread loop on str0m): terminates ICE/DTLS/SRTP, forwards Opus between
room peers without decoding, records per-peer Ogg/Opus (ffprobe-verified),
server-side mute/kick, stats + peer_connected/peer_left usage events, all
driven by PHP over a JSON-lines Unix control socket. Renegotiation rides the
browser data channel (str0m chat model) — signaling only carries the initial
offer/answer.
PHP side: RustMediaEngine (MediaEngine contract + room-aware API) is
plug-and-play — first use downloads the sha256-verified prebuilt binary
(BinaryManager, RoadRunner pattern) and spawns it detached, flock-guarded
(SidecarSupervisor). webrtc:install / webrtc:sidecar provided for explicit
control; config gains the webrtc.sfu block. Replaces the ext-php-rs
Str0mMediaEngine seam.
Tests: 61 PHP (incl. a real PHP<->Rust E2E that spawns the sidecar from
PHPUnit) + 7 Rust (incl. an end-to-end control-socket integration test).
build-release.sh produces the static-musl release + .sha256 (verified:
static-pie, 9.2MB, runs).
Card #1083 (rel #1051#1060#1064).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WebRTC for Laravel on blax-software/reactphp-kernel. PHP owns signaling +
orchestration; a pluggable MediaEngine owns real-time media, with the production
engine backed by a Rust core (str0m via ext-php-rs) so PHP never runs per-20ms DSP.
- WebRtcServiceProvider + config/webrtc.php + webrtc:serve command
- Contracts\MediaEngine (offer/ice/record/connect/bridge/close)
- Media\NullMediaEngine (signaling-only) + Media\Str0mMediaEngine (Rust seam)
- Signaling\SignalingHandler (transport-agnostic) + Server\SignalingServer (on the kernel)
- rust/ crate stub (blax_webrtc: str0m + ext-php-rs) documenting the media plan
Enables: server-side record/intercept, provider-hidden AI-realtime bridging,
and party-to-party/group calls. rel learn-atc #1055#1051#1019
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>