@startuml skinparam backgroundColor white actor User participant "Call" as Card participant Microphone as Mic actor Guest opt **""live.microphone.always_connected""** is enabled Card -> Mic : Microphone connection attempted (muted) note over Mic : Connected at card load, before (and independent of) any call Mic --> User : Microphone access granted end alt Outbound call User -> Card : Start a call note over User, Card Via Call menu button or **""call_start""** action. Needs a camera that supports 2-way audio end note else Inbound call Guest -> Card : Rings note over Card Via a **""view.triggers.actions.trigger: call""** trigger, e.g. a doorbell. The card rings (**""live.controls.call.ringtone""**) until answered, rejected, or **""live.controls.call.unanswered_timeout_seconds""** elapses end note User -> Card : Answer the call end opt **""live.microphone.always_connected""** not enabled Card -> Mic : Microphone connection attempted (muted) note over Mic : Stays muted by default (**""live.microphone.auto_unmute""**) Mic --> User : Microphone access granted end note over User, Mic The microphone is connected when the call is answered -- immediately for an outbound call. An inbound call rings without it, so a doorbell can ring even where microphone access needs a tap to be granted end note note over Card The card opens an audio connection to the camera and holds it only while the call is in progress. If the camera has no 2-way audio, or another application is already using it, the call fails with an error end note Card --> User : You hear the caller note over Card Inbound audio unmutes if configured (**""live.auto_unmute""**) Menu, status bar & next/previous hide (**""auto_hide""**) Camera navigation is locked (**""live.controls.call.lock""**) end note User -> Mic : Unmute to talk note over Mic : List 'call' in **""live.microphone.auto_unmute""** to unmute automatically loop Until the call ends User -[#red]> Guest : Talking Guest -[#red]-> User : Responding end User -> Card : End the call note over User, Card Via Hang-up button, **""call_end""** action, or -- when **""live.controls.call.lock""** is disabled -- navigating away end note note over Card : The audio connection to the camera closes, releasing it for other applications Card --> User : Inbound audio mutes (**""live.auto_mute""**) Card -> Mic : Microphone mutes and disconnects note over Mic The browser stops reporting the microphone as in use, unless **""live.microphone.always_connected""** holds it open end note @enduml