Answer a streamer's new offer on the running connection
Watching a stream from the official client failed. Its log shows why:
after our answer it decided our codec choice did not suit it ("remote peer
is using unsupported codec, realign") and sent a new offer on the same
connection, a renegotiation. Voelin answered every offer with a new peer:
new ICE credentials, new DTLS fingerprint (the official client logged both
answers, they differ), so the connection the official client kept using
was gone and no picture came.
- `Peer::renegotiate` answers a new offer on the running peer (str0m
`accept_offer` on the same Rtc): same ICE credentials and fingerprint.
- The viewer uses it for an `offer` signal while it has a connection; a
`reconnectOffer` still starts a new one.
- str0m answers a renegotiation in the codec order the connection was
built with, so a streamer re-offering another codec first kept sending
the old one; `order_like_offer` puts the answer's payload types in the
new offer's order.
Tests: a unit test (a str0m offerer adds audio in a new offer; same ICE
credentials and fingerprint, audio answered) and the order helper; the
browser interop test `browser_renegotiates_with_rust` (Chromium streams
VP8, re-offers VP9 on the same connection, VP9 frames arrive), passing
with Chromium 152.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f61c34b42c
commit
379eeb355f
6 files changed
+174
No files matched your search
@@ -262,6 +262,22 @@ the official client itself is still to be confirmed: the beta needs a
|
||||
myTeamSpeak sign-in on first start, so it cannot run from a throwaway
|
||||
profile.
|
||||
|
||||
### The official client re-offers (confirmed, client 6.0.0-beta4.1, 2026-10-03)
|
||||
|
||||
Streaming from the official client to Voelin, its log shows: our answer
|
||||
(H.264, VP9, VP8 — no AV1, which the app did not decode) → "remote peer is
|
||||
using unsupported codec, realign" → a new `offer` signal on the same
|
||||
connection → our answer → `ENCODER create: H264`. The new offer is a
|
||||
renegotiation of the running connection: the answer must come from the same
|
||||
peer (same ICE credentials and DTLS fingerprint). Voelin answered every offer
|
||||
with a new peer, so the connection broke and nothing was shown. Now
|
||||
`Peer::renegotiate` answers an `offer` signal on the running connection (a
|
||||
`reconnectOffer` still starts a new one), in the codec order of the new offer
|
||||
(str0m keeps the first offer's order; `order_like_offer` fixes the answer's
|
||||
`m=` lines), so the streamer switches to the codec it re-offered. Tested
|
||||
against Chromium: `browser_renegotiates_with_rust` (VP8, then a re-offer of
|
||||
VP9 on the same connection; VP9 frames arrive).
|
||||
|
||||
## Open questions
|
||||
|
||||
- [x] Viewer side: `joinstreamrequest id clid msg is_remove` (see above).
|
||||
|
||||
Reference in new issue
Block a user