Skip to main content

Module session

Module session 

Source
Expand description

One call at a time: the state machine, its signalling over gift-wrapped rumors, and the Iroh connection that carries the media once both sides have agreed.

Every deferred step (a ring timeout, a connect, a closed watcher) carries the call id it was started for and does nothing if the call it finds is another.

Structs§

CallState
CallStats
LevelPayload
VoiceShown
A voice Channel’s call as a phone’s notification shows it.

Enums§

Phase

Traits§

Ringer
A phone’s own call surfaces: the ring where the app’s window can’t show one (the lock screen), and the notification of a call under way. Installed once per process, so it rings even in one that runs no call engine (a phone’s background service).

Functions§

accept
decline
Decline a ringing call from a notification, whether or not this process holds it: a background service only rang it.
end
Tears the call down and tells the UI why. Idempotent: a second end is a no-op.
end_all
Account swap or shutdown: whatever is up comes down without a signal.
hangup
on_incoming
The accept loop hands over a connection with our ALPN. It belongs to the call whose id its Hello names, if that call is waiting for one.
on_signal
A signal from the peer, already validated as coming from sender.
reject
restart_audio
Reopens the call’s audio, on whatever devices are now the defaults. One at a time: an unplugged headset changes the default input and output together, and two overlapping reopens fight over the devices and the mixer.
set_away
Tell the peer this app is going where the system pauses it, or is back.
set_deafened
Deafen: nothing the call plays is heard, and the microphone goes off with it.
set_muted
Mute or unmute, and remember it for the next call. Unmuting while deafened hears again too.
set_ringer
set_share_audio
The shared screen’s sound goes with it, or stops; it cannot outlive the screen. native asks this platform to capture it itself, for a picker that gave none.
set_share_volume
Listener-side volume for their screen’s sound.
set_video
Start or stop sending one of our pictures. The codec is the first of ours the peer decodes.
set_video_caps
set_video_pause
Our view of their picture is hidden (or shown again): they may stop sending.
set_video_prefs
The user’s quality and frame rate for one of our pictures; None means the ladder decides.
set_volume
Listener-side volume for the call in progress.
snapshot
start