rtci 0.21.1+brainwires.3
Released 2026-11-19.
From CHANGELOG.md of rtci at its release tag.
W3C WebRTC behaviour the Deno WebRTC extension (Brainwires/deno ext/webrtc) relies on: JSEP negotiation edge cases from the web-platform-tests, the data channel lifecycle (ids, closing, failure, stream-id reuse, bufferedAmount), stats timestamps in milliseconds, and RTCP that no longer stops at a nested interceptor. FORK.md lists everything the fork carries over upstream.
Features
- sctp, data channel:
Stream::bytes_dequeued,Association::stream_bytes_dequeuedandRTCDataChannel::bytes_dequeuedcount the application bytes taken from a stream's send queue (first transmission, or abandoned before it), for W3CbufferedAmount, which falls on transmission rather than on acknowledgement.outstanding_bytesis unchanged. - interceptor:
PassThroughInterceptor(exported) hands every packet on in both directions; it is the inner end of a nested interceptor in a registry slot (PassThroughInterceptor::new().with(builder.build())).
Bug Fixes
- interceptor: the documented recipe for a nested interceptor in a registry slot,
NoopInterceptor::new().with(...), put the chain's RTCP terminus inside the slot: inSlot::CongestionControl(the fork's GCC) no NACK, receiver report, PLI or FIR reached the interceptors after it or the application. The recipe, the GCC and adaptive jitter buffer modules andFORK.mdnow usePassThroughInterceptor. - ice:
RTCIceCandidate::to_jsonwrotesdpMid: ""withsdpMLineIndex: 0; the empty mid matched no media section, soadd_remote_candidateon the other peer refused it. A candidate built from a bare ICE candidate now has no mid and names the first section by index. - peer_connection: JSEP negotiation (W3C web-platform-tests): a BUNDLE group's m-sections may carry their own ICE credentials (the offerer-tagged section's are the transport's, RFC 8843 §7.2); a description with no m-section starts no transport, so a remote offer can be re-applied or rolled back;
have-remote-offertakes another remote offer and the pranswer states another pranswer, a remote pranswer deciding the ICE role;add_remote_candidatefollows W3CaddIceCandidate(mid or m-line index,usernameFragmentchecked, the candidate ora=end-of-candidatesrecorded in the descriptions);ice-ufrag/ice-pwdsyntax checked (RFC 8839 §5.4);a=ice-options:tricklewritten; onea=fingerprintper local certificate and every remote one kept; an answer tosetup:active/setup:passivetakes the other role; media sections withouta=ssrcaccepted with several m-sections (bound by the MID header extension, RFC 8843 §9.2);RTCTransportStats.dtlsRoleserializes as W3CRTCDtlsRole. - data channel: a channel gets its RFC 8832 id when an answer negotiates the DTLS role, and one created after that gets it at once, before SCTP connects.
- data channel: a close the remote starts fires
OnClosingbeforeOnClose; an association lost to the peer's ABORT (nowAssociationError::AssociationClosed, notReset), a protocol error or a timeout firesOnErrorbeforeOnClose, on every channel of the association, an idle pre-negotiated one included (Event::AssociationClosed). - sctp, data channel: a stream id is freed only once both directions are reset (RFC 8831 §6.7); a reset this side started is not echoed back, and a reset of a stream with no state here is reported and answered. A new channel no longer takes an id the peer is still resetting.
- data channel:
close()follows the messages sent before it instead of resetting the stream ahead of them, and a read that completes a deferred stream reset no longer loses that pass's messages. - sctp:
SctpTransport.stateisConnectingwhile the association handshakes (it reported the accepting sideClosed); an ended association is passed over for a live one. - shared: stats timestamps serialize as epoch milliseconds with sub-millisecond precision (they were seconds, truncated to whole milliseconds).
- peer_connection: an offer made while an ICE restart is staged carries no candidates of the previous generation.
Dependencies
- The workspace audit ignores RUSTSEC-2026-0543 (
chronounmaintained, published after the previous release):chronois a dev-dependency only, for log timestamps in examples and tests. The library's own audit, which ignores nothing, is unaffected.
Testing
- Interceptor tests that a PLI passes the GCC slot to a later interceptor and the application, and that the old
NoopInterceptorrecipe ends it there; an ICE candidate JSON round-trip test (tests/ice_tcp_rtc2rtc.rspasses again); SCTP tests for stream-id release, idle-stream resets, association failure and the dequeued byte count.