-
@Stable() public final class ClientState
-
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<User>userprivate final StateFlow<ConnectionState>connectionprivate final StateFlow<Call>ringingCallprivate final StateFlow<Call>activeCallprivate final CallServiceConfigRegistrycallConfigRegistryprivate final BooleanrejectCallWhenBusy
-
Constructor Summary
Constructors Constructor Description ClientState(StreamVideo client)
-
Method Summary
Modifier and Type Method Description final StateFlow<User>getUser()Current user for the client. final StateFlow<ConnectionState>getConnection()Coordinator connection state final StateFlow<Call>getRingingCall()When there is an incoming call, this state will be set. final StateFlow<Call>getActiveCall()When there is an active call, this state will be set, otherwise its null. final CallServiceConfigRegistrygetCallConfigRegistry()final BooleangetRejectCallWhenBusy()final BooleanhasActiveOrRingingCall()Returns true if there is an active or ringing call final TelecomIntegrationTypegetTelecomIntegrationType()Hardcoded to TelecomIntegrationType.JETPACK_TELECOM for now. final UnithandleEvent(VideoEvent event)Handles the events for the client state. final UnithandleError(Error error)final UnitsetActiveCall(Call call)Transition incoming/outgoing call to active on the same service final UnitremoveActiveCall()Use removeActiveCall(call: Call) instead, requires explicit call instance. final UnitaddRingingCall(Call call, RingingState ringingState)final UnitremoveRingingCall()Use removeRingingCall(call: Call) instead, requires explicit call instance.. final UnitremoveRingingCall(Call call)-
-
Constructor Detail
-
ClientState
ClientState(StreamVideo client)
-
-
Method Detail
-
getUser
final StateFlow<User> getUser()
Current user for the client. Sourced from the UserRepository so observers see identity updates (e.g. the server-issued guest user) without a local mirror.
-
getConnection
final StateFlow<ConnectionState> getConnection()
Coordinator connection state
-
getRingingCall
final StateFlow<Call> getRingingCall()
When there is an incoming call, this state will be set.
-
getActiveCall
final StateFlow<Call> getActiveCall()
When there is an active call, this state will be set, otherwise its null.
-
getCallConfigRegistry
final CallServiceConfigRegistry getCallConfigRegistry()
-
getRejectCallWhenBusy
final Boolean getRejectCallWhenBusy()
-
hasActiveOrRingingCall
final Boolean hasActiveOrRingingCall()
Returns true if there is an active or ringing call
-
getTelecomIntegrationType
final TelecomIntegrationType getTelecomIntegrationType()
Hardcoded to TelecomIntegrationType.JETPACK_TELECOM for now. May switch to another later if needed.
-
handleEvent
final Unit handleEvent(VideoEvent event)
Handles the events for the client state. Most event logic happens in the Call instead of the client
-
handleError
final Unit handleError(Error error)
-
setActiveCall
final Unit setActiveCall(Call call)
Transition incoming/outgoing call to active on the same service
-
removeActiveCall
final Unit removeActiveCall()
Use removeActiveCall(call: Call) instead, requires explicit call instance.
-
addRingingCall
final Unit addRingingCall(Call call, RingingState ringingState)
-
removeRingingCall
final Unit removeRingingCall()
Use removeRingingCall(call: Call) instead, requires explicit call instance..
-
removeRingingCall
final Unit removeRingingCall(Call call)
-
-
-
-