Class Call
-
- All Implemented Interfaces:
public final class CallThe call class gives you access to all call level API calls
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCall.Debug
-
Field Summary
Fields Modifier and Type Field Description private final CallStatestateprivate final StringsessionIdprivate final CameraManagercameraprivate final MicrophoneManagermicrophoneprivate final SpeakerManagerspeakerprivate final Stringcidprivate final CallHealthMonitormonitorprivate final StateFlow<Float>localMicrophoneAudioLevelprivate final Call.Debugdebugprivate final Stringtypeprivate final Stringidprivate final Useruser
-
Constructor Summary
Constructors Constructor Description Call(StreamVideo client, String type, String id, User user)
-
Method Summary
Modifier and Type Method Description final CallStategetState()The call state contains all state such as the participant list, reactions etc final StringgetSessionId()final CameraManagergetCamera()Camera gives you access to the local camera final MicrophoneManagergetMicrophone()final SpeakerManagergetSpeaker()final StringgetCid()The cid is type:id final CallHealthMonitorgetMonitor()final StateFlow<Float>getLocalMicrophoneAudioLevel()This returns the local microphone volume level. final Call.DebuggetDebug()final StringgetType()final StringgetId()final UsergetUser()final Result<GetCallResponse>get()Basic crud operations final Result<GetOrCreateCallResponse>create(List<String> memberIds, List<MemberRequest> members, Map<String, Object> custom, CallSettingsRequest settings, OffsetDateTime startsAt, String team, Boolean ring, Boolean notify)Create a call. final Result<UpdateCallResponse>update(Map<String, Object> custom, CallSettingsRequest settingsOverride, OffsetDateTime startsAt)Update a call final Result<RtcSession>join(Boolean create, CreateCallOptions createOptions, Boolean ring, Boolean notify)final UnitsendStats(Map<String, Object> data)final UnitswitchSfu(Boolean forceSwitch)final UnitreconnectOrSwitchSfu()final Unitleave()Leave the call, but don't end it for other users final Result<Unit>end()ends the call for yourself as well as other users final Result<SendReactionResponse>sendReaction(String type, String emoji, Map<String, Object> custom)final Result<QueryMembersResponse>queryMembers(Map<String, Object> filter, List<SortField> sort, Integer limit)final Result<MuteUsersResponse>muteAllUsers(Boolean audio, Boolean video, Boolean screenShare)final Unit,java.lang.Boolean)>setVisibility(String sessionId, <Error class: unknown class> trackType, Boolean visible)final Unit,kotlin.jvm.functions.Function1)>initRenderer(VideoTextureViewRenderer videoRenderer, String sessionId, <Error class: unknown class> trackType, Function1<View, Unit> onRendered)Perhaps it would be nicer to have an interface. final Result<GoLiveResponse>goLive()final Result<StopLiveResponse>stopLive()final Result<SendEventResponse>sendCustomEvent(Map<String, Object> data)final Result<Unit>requestPermissions(String permission)Permissions final Result<Object>startRecording()final Result<Object>stopRecording()final Result<Object>startHLS()final Result<Object>stopHLS()final EventSubscriptionsubscribeFor(Class<out VideoEvent> eventTypes, VideoEventListener<VideoEvent> listener)final EventSubscriptionsubscribe(VideoEventListener<VideoEvent> listener)final Result<BlockUserResponse>blockUser(String userId)final Result<UpdateCallMembersResponse>removeMembers(List<String> userIds)final Result<UpdateUserPermissionsResponse>grantPermissions(String userId, List<String> permissions)final Result<UpdateUserPermissionsResponse>revokePermissions(String userId, List<String> permissions)final Result<UpdateCallMembersResponse>updateMembers(List<MemberRequest> memberRequests)final UnitfireEvent(VideoEvent event)final Result<ListRecordingsResponse>listRecordings()final Result<MuteUsersResponse>muteUser(String userId, Boolean audio, Boolean video, Boolean screenShare)final Result<MuteUsersResponse>muteUsers(List<String> userIds, Boolean audio, Boolean video, Boolean screenShare)final Unitcleanup()final Result<GetCallResponse>ring()final Result<GetCallResponse>notify()final Result<AcceptCallResponse>accept()final Result<RejectCallResponse>reject()final UnitprocessAudioSample(JavaAudioDeviceModule.AudioSamples audioSample)-
-
Constructor Detail
-
Call
Call(StreamVideo client, String type, String id, User user)
-
-
Method Detail
-
getState
final CallState getState()
The call state contains all state such as the participant list, reactions etc
-
getSessionId
final String getSessionId()
-
getCamera
final CameraManager getCamera()
Camera gives you access to the local camera
-
getMicrophone
final MicrophoneManager getMicrophone()
-
getSpeaker
final SpeakerManager getSpeaker()
-
getMonitor
final CallHealthMonitor getMonitor()
-
getLocalMicrophoneAudioLevel
final StateFlow<Float> getLocalMicrophoneAudioLevel()
This returns the local microphone volume level. The audio volume is a linear value between 0 (no sound) and 1 (maximum volume). This is not a raw output - it is a smoothed-out volume level that gradually goes to the highest measured level and will then gradually over 250ms return back to 0 or next measured value. This value can be used directly in your UI for displaying a volume/speaking indicator for the local participant. Note: Doesn't return any values until the session is established!
-
getDebug
final Call.Debug getDebug()
-
getUser
final User getUser()
-
get
final Result<GetCallResponse> get()
Basic crud operations
-
create
final Result<GetOrCreateCallResponse> create(List<String> memberIds, List<MemberRequest> members, Map<String, Object> custom, CallSettingsRequest settings, OffsetDateTime startsAt, String team, Boolean ring, Boolean notify)
Create a call. You can create a call client side, many apps prefer to do this server side though
-
update
final Result<UpdateCallResponse> update(Map<String, Object> custom, CallSettingsRequest settingsOverride, OffsetDateTime startsAt)
Update a call
-
join
final Result<RtcSession> join(Boolean create, CreateCallOptions createOptions, Boolean ring, Boolean notify)
-
reconnectOrSwitchSfu
final Unit reconnectOrSwitchSfu()
-
sendReaction
final Result<SendReactionResponse> sendReaction(String type, String emoji, Map<String, Object> custom)
-
queryMembers
final Result<QueryMembersResponse> queryMembers(Map<String, Object> filter, List<SortField> sort, Integer limit)
-
muteAllUsers
final Result<MuteUsersResponse> muteAllUsers(Boolean audio, Boolean video, Boolean screenShare)
-
setVisibility
final Unit ,java.lang.Boolean)>setVisibility(String sessionId, <Error class: unknown class> trackType, Boolean visible)
-
initRenderer
final Unit ,kotlin.jvm.functions.Function1)>initRenderer(VideoTextureViewRenderer videoRenderer, String sessionId, <Error class: unknown class> trackType, Function1<View, Unit> onRendered)
Perhaps it would be nicer to have an interface. Any UI elements that renders video should implement it
And call a callback for
visible/hidden
resolution changes
-
goLive
final Result<GoLiveResponse> goLive()
-
stopLive
final Result<StopLiveResponse> stopLive()
-
sendCustomEvent
final Result<SendEventResponse> sendCustomEvent(Map<String, Object> data)
-
requestPermissions
final Result<Unit> requestPermissions(String permission)
Permissions
-
startRecording
final Result<Object> startRecording()
-
stopRecording
final Result<Object> stopRecording()
-
subscribeFor
final EventSubscription subscribeFor(Class<out VideoEvent> eventTypes, VideoEventListener<VideoEvent> listener)
-
subscribe
final EventSubscription subscribe(VideoEventListener<VideoEvent> listener)
-
blockUser
final Result<BlockUserResponse> blockUser(String userId)
-
removeMembers
final Result<UpdateCallMembersResponse> removeMembers(List<String> userIds)
-
grantPermissions
final Result<UpdateUserPermissionsResponse> grantPermissions(String userId, List<String> permissions)
-
revokePermissions
final Result<UpdateUserPermissionsResponse> revokePermissions(String userId, List<String> permissions)
-
updateMembers
final Result<UpdateCallMembersResponse> updateMembers(List<MemberRequest> memberRequests)
-
fireEvent
final Unit fireEvent(VideoEvent event)
-
listRecordings
final Result<ListRecordingsResponse> listRecordings()
-
muteUser
final Result<MuteUsersResponse> muteUser(String userId, Boolean audio, Boolean video, Boolean screenShare)
-
muteUsers
final Result<MuteUsersResponse> muteUsers(List<String> userIds, Boolean audio, Boolean video, Boolean screenShare)
-
ring
final Result<GetCallResponse> ring()
-
notify
final Result<GetCallResponse> notify()
-
accept
final Result<AcceptCallResponse> accept()
-
reject
final Result<RejectCallResponse> reject()
-
processAudioSample
final Unit processAudioSample(JavaAudioDeviceModule.AudioSamples audioSample)
-
-
-
-