Skip to main content

Module sfu

Module sfu 

Source
Expand description

SfuCore::admit_user returns one MediaSession per admitted room connection.

The session sequences offer/answer, publication, subscription, recording and cleanup without exposing room or transport internals.

SfuCore::admit_user -> MediaSession

establish             -> offer -> answer
publish               -> [offer -> answer]?
deactivate_publication -> cancel pending or suppress committed source
subscribe             -> persist intent and reconcile eligible routes
close                 -> remove only the current connection

&mut MediaSession serializes negotiation. MediaSession::publish queues the first intent for each stream while the initial offer awaits its answer. Media published or consumed while a later offer is out waits in the transport for the next one. A successful MediaSession::answer may return that follow-up offer.

Structsยง

InFlightOffer ๐Ÿ”’
in-flight offer state plus mutations deferred until its answer is accepted
MediaSession
One admitted user connection in one room.
NegotiationOffer
Server-authored SDP offer for the client.
RemoteTrackProjection
One remote track as the client binds it: a room track with the MID of its consumer media.
SfuCore
A cloneable core handle that admits users into room-bound MediaSessions.
UploadEncoding
one upload encoding offered to the client
UploadSlot
one offered upload media section

Enumsยง

SessionError
error returned by MediaSession operations
SessionOfferPurpose ๐Ÿ”’
reason an offer is waiting for an answer
SessionPhase ๐Ÿ”’
media-session negotiation phase
SfuCoreError