Class Call
-
-
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 ScreenShareManagerscreenShareprivate final Stringcidprivate VideoFiltervideoFilterprivate AudioFilteraudioFilterprivate final CallHealthMonitormonitorprivate final StateFlow<Float>localMicrophoneAudioLevelprivate final MutableStateFlow<CallStatsReport>statsReportprivate final MutableStateFlow<List<Integer>>statLatencyHistoryprivate 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 ScreenShareManagergetScreenShare()final StringgetCid()The cid is type:id final VideoFiltergetVideoFilter()Set a custom VideoFilter that will be applied to the video stream coming from your device. final UnitsetVideoFilter(VideoFilter videoFilter)Set a custom VideoFilter that will be applied to the video stream coming from your device. final AudioFiltergetAudioFilter()Set a custom AudioFilter that will be applied to the audio stream recorded on your device. final UnitsetAudioFilter(AudioFilter audioFilter)Set a custom AudioFilter that will be applied to the audio stream recorded on your device. final CallHealthMonitorgetMonitor()final StateFlow<Float>getLocalMicrophoneAudioLevel()This returns the local microphone volume level. final MutableStateFlow<CallStatsReport>getStatsReport()Contains stats events for observation. final MutableStateFlow<List<Integer>>getStatLatencyHistory()Contains stats history. 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 UnitswitchSfu()final Unitreconnect(Boolean forceRestart)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<PinResponse>pinForEveryone(String sessionId, String userId)final Result<UnpinResponse>unpinForEveryone(String sessionId, String userId)final Result<SendReactionResponse>sendReaction(String type, String emoji, Map<String, Object> custom)final Result<QueriedMembers>queryMembers(Map<String, Object> filter, List<SortField> sort, Integer limit, String prev, String next)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 UnithandleEvent(VideoEvent event)final Unit,kotlin.jvm.functions.Function1)>initRenderer(VideoTextureViewRenderer videoRenderer, String sessionId, <Error class: unknown class> trackType, Function1<VideoTextureViewRenderer, Unit> onRendered)Perhaps it would be nicer to have an interface. final Result<GoLiveResponse>goLive(Boolean startHls, Boolean startRecording, Boolean startTranscription)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 UnitstartScreenSharing(Intent mediaProjectionPermissionResultData)User needs to have OwnCapability.Screenshare capability in order to start screen sharing. final UnitstopScreenSharing()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(String sessionId)List the recordings for this call. 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)final BitmaptakeScreenshot(VideoTrack track)final BooleanisPinnedParticipant(String sessionId)final BooleanisServerPin(String sessionId)final BooleanisLocalPin(String sessionId)final BooleanhasCapability(OwnCapability capability)-
-
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()
-
getScreenShare
final ScreenShareManager getScreenShare()
-
getVideoFilter
final VideoFilter getVideoFilter()
Set a custom VideoFilter that will be applied to the video stream coming from your device.
-
setVideoFilter
final Unit setVideoFilter(VideoFilter videoFilter)
Set a custom VideoFilter that will be applied to the video stream coming from your device.
-
getAudioFilter
final AudioFilter getAudioFilter()
Set a custom AudioFilter that will be applied to the audio stream recorded on your device.
-
setAudioFilter
final Unit setAudioFilter(AudioFilter audioFilter)
Set a custom AudioFilter that will be applied to the audio stream recorded on your device.
-
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!
-
getStatsReport
final MutableStateFlow<CallStatsReport> getStatsReport()
Contains stats events for observation.
-
getStatLatencyHistory
final MutableStateFlow<List<Integer>> getStatLatencyHistory()
Contains stats history.
-
getDebug
final Call.Debug getDebug()
-
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)
-
pinForEveryone
final Result<PinResponse> pinForEveryone(String sessionId, String userId)
-
unpinForEveryone
final Result<UnpinResponse> unpinForEveryone(String sessionId, String userId)
-
sendReaction
final Result<SendReactionResponse> sendReaction(String type, String emoji, Map<String, Object> custom)
-
queryMembers
final Result<QueriedMembers> queryMembers(Map<String, Object> filter, List<SortField> sort, Integer limit, String prev, String next)
-
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)
-
handleEvent
final Unit handleEvent(VideoEvent event)
-
initRenderer
final Unit ,kotlin.jvm.functions.Function1)>initRenderer(VideoTextureViewRenderer videoRenderer, String sessionId, <Error class: unknown class> trackType, Function1<VideoTextureViewRenderer, 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(Boolean startHls, Boolean startRecording, Boolean startTranscription)
-
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()
-
startScreenSharing
final Unit startScreenSharing(Intent mediaProjectionPermissionResultData)
User needs to have OwnCapability.Screenshare capability in order to start screen sharing.
- Parameters:
mediaProjectionPermissionResultData-intent data returned from the activity result after asking for screen sharing permission by launching MediaProjectionManager.createScreenCaptureIntent(). See https://developer.android.com/guide/topics/large-screens/media-projection#recommended_approach
-
stopScreenSharing
final Unit stopScreenSharing()
-
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(String sessionId)
List the recordings for this call.
- Parameters:
sessionId-if session ID is supplied, only recordings for that session will be loaded.
-
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)
-
takeScreenshot
final Bitmap takeScreenshot(VideoTrack track)
-
isPinnedParticipant
final Boolean isPinnedParticipant(String sessionId)
-
isServerPin
final Boolean isServerPin(String sessionId)
-
isLocalPin
final Boolean isLocalPin(String sessionId)
-
hasCapability
final Boolean hasCapability(OwnCapability capability)
-
-
-
-