StreamVideo

The main interface to control the Video calls. StreamVideoClient implements this interface.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val context: Context

Represents the default call config when starting a call.

Link copied to clipboard
abstract val state: ClientState
Link copied to clipboard
abstract val user: User
Link copied to clipboard
abstract val userId: String

Functions

Link copied to clipboard
abstract fun call(type: String, id: String = ""): Call

Create a call with the given type and id.

Link copied to clipboard
abstract fun cleanup()
Link copied to clipboard
abstract suspend fun connectAsync(): Deferred<Result<Long>>
Link copied to clipboard
abstract suspend fun connectIfNotAlreadyConnected()
Link copied to clipboard
abstract suspend fun createDevice(pushDevice: PushDevice): Result<Device>

Create a device that will be used to receive push notifications.

Link copied to clipboard
abstract suspend fun deleteDevice(device: Device): Result<Unit>

Remove a device used to receive push notifications.

Link copied to clipboard
abstract suspend fun getEdges(): Result<List<EdgeData>>

Returns a list of all the edges available on the network.

Link copied to clipboard
abstract fun logOut()

Clears the internal user state, removes push notification devices and clears the call state.

Link copied to clipboard
abstract suspend fun queryCalls(    filters: Map<String, Any>,     sort: List<SortField> = listOf(SortField.Asc(DEFAULT_QUERY_CALLS_SORT)),     limit: Int = DEFAULT_QUERY_CALLS_LIMIT,     prev: String? = null,     next: String? = null,     watch: Boolean = false): Result<QueriedCalls>

Queries calls with a given filter predicate and pagination.

Link copied to clipboard
abstract suspend fun queryMembers(    type: String,     id: String,     filter: Map<String, Any>? = null,     sort: List<SortField> = mutableListOf(SortField.Desc("created_at")),     prev: String? = null,     next: String? = null,     limit: Int = 25): Result<QueriedMembers>

Queries calls with a given filter predicate and pagination.

Link copied to clipboard

Subscribe to all events

Link copied to clipboard
abstract fun subscribeFor(vararg eventTypes: Class<out VideoEvent>, listener: VideoEventListener<VideoEvent>): EventSubscription

Subscribe for a specific list of events

Inherited functions

Link copied to clipboard
abstract fun getIncomingCallNotification(    fullScreenPendingIntent: PendingIntent,     acceptCallPendingIntent: PendingIntent,     rejectCallPendingIntent: PendingIntent,     callerName: String?,     shouldHaveContentIntent: Boolean): Notification?

Customize the notification when you receive a push notification for ringing call with type RingingState.Incoming

Link copied to clipboard
abstract fun getNotificationUpdates(coroutineScope: CoroutineScope, call: Call, localUser: User, onUpdate: (Notification) -> Unit)

Get subsequent updates to notifications. Initially, notifications are posted by one of the other methods, and then this method can be used to re-post them with updated content.

Link copied to clipboard
abstract fun getOngoingCallNotification(    callId: StreamCallId,     callDisplayName: String? = null,     isOutgoingCall: Boolean = false,     remoteParticipantCount: Int = 0): Notification?

Customize the notification when you receive a push notification for ringing call with type RingingState.Outgoing and RingingState.Active

Link copied to clipboard
abstract fun getRingingCallNotification(    ringingState: RingingState,     callId: StreamCallId,     callDisplayName: String? = null,     shouldHaveContentIntent: Boolean = true): Notification?

Customize the notification when you receive a push notification for ringing call

Link copied to clipboard
Link copied to clipboard
abstract fun onLiveCall(callId: StreamCallId, callDisplayName: String)

Customize the notification when you receive a push notification for Live Call

Link copied to clipboard
abstract fun onMissedCall(callId: StreamCallId, callDisplayName: String)

Customize the notification when you receive a push notification for Missed Call

Link copied to clipboard
abstract fun onNotification(callId: StreamCallId, callDisplayName: String)

Customize the notification when you receive a push notification for general usage

Link copied to clipboard
abstract fun onPermissionDenied()
Link copied to clipboard
abstract fun onPermissionGranted()
Link copied to clipboard
abstract fun onPermissionRationale()
Link copied to clipboard
abstract fun onPermissionRequested()
Link copied to clipboard
abstract fun onRingingCall(callId: StreamCallId, callDisplayName: String)

Customize the notification when you receive a push notification for ringing call, which has further two types RingingState.Incoming and RingingState.Outgoing

Link copied to clipboard

Extension function that makes it easy to use on kotlin, but keeps Java usable as well