// Headless Chromium as the remote WebRTC peer for // crates/voelin-stream/tests/browser_interop.rs (see README.md here). // // Reads one JSON command per line on stdin and writes one JSON reply per line // on stdout; logs go to stderr. Commands (`op`): // answer {sdp} answer an offer, wait for ICE gathering -> {sdp} // offer {codec, trickle} send canvas video + oscillator audio; offer with // `codec` preferred -> {sdp} or {unsupported}; // with `trickle` the SDP has no candidates // reoffer {codec} a new offer on the running connection with `codec` // preferred (a renegotiation) -> {sdp} or {unsupported} // candidates candidates gathered so far -> {candidates: [{candidate, sdpMid, sdpMLineIndex}]} // accept {sdp} apply the answer to our offer // candidate {candidate, sdpMid, sdpMLineIndex} add a remote candidate // stats connection state, inbound/outbound RTP counters // (incl. the decoder and decoded frame size), // frames shown by a