StreamVideoBuilder

class StreamVideoBuilder @JvmOverloads constructor(context: Context, apiKey: ApiKey, geo: GEO = GEO.GlobalEdgeNetwork, user: User = User.anonymous(), token: UserToken = "", legacyTokenProvider: suspend (error: Throwable?) -> String? = null, tokenProvider: TokenProvider = legacyTokenProvider?.let { legacy -> object : TokenProvider { override suspend fun loadToken(): String = legacy.invoke(null) } } ?: ConstantTokenProvider(token), loggingLevel: LoggingLevel = LoggingLevel(), notificationConfig: NotificationConfig = NotificationConfig(), ringNotification: (call: Call) -> Notification?? = null, connectionTimeoutInMs: Long = 10000, ensureSingleInstance: Boolean = true, videoDomain: String = "video.stream-io-api.com", runForegroundServiceForCalls: Boolean = true, callServiceConfig: CallServiceConfig? = null, localSfuAddress: String? = null, sounds: Sounds = defaultResourcesRingingConfig(context).toSounds(), crashOnMissingPermission: Boolean = false, permissionCheck: StreamPermissionCheck = DefaultStreamPermissionCheck(), audioUsage: Int = defaultAudioUsage, appName: String? = null, audioProcessing: ManagedAudioProcessingFactory? = null, leaveAfterDisconnectSeconds: Long = 30)

The StreamVideoBuilder is used to create a new instance of the StreamVideo client. This is the most essential class to connect to the Stream server and initialize everything you need to implement audio/video calls.

val client = StreamVideoBuilder(
context = context,
apiKey = apiKey,
geo = GEO.GlobalEdgeNetwork,
user = user,
token = token,
loggingLevel = LoggingLevel.BODY,
// ...
).build()

See also

Constructors

Link copied to clipboard
constructor(context: Context, apiKey: ApiKey, geo: GEO = GEO.GlobalEdgeNetwork, user: User = User.anonymous(), token: UserToken = "", legacyTokenProvider: suspend (error: Throwable?) -> String? = null, tokenProvider: TokenProvider = legacyTokenProvider?.let { legacy -> object : TokenProvider { override suspend fun loadToken(): String = legacy.invoke(null) } } ?: ConstantTokenProvider(token), loggingLevel: LoggingLevel = LoggingLevel(), notificationConfig: NotificationConfig = NotificationConfig(), ringNotification: (call: Call) -> Notification?? = null, connectionTimeoutInMs: Long = 10000, ensureSingleInstance: Boolean = true, videoDomain: String = "video.stream-io-api.com", runForegroundServiceForCalls: Boolean = true, callServiceConfig: CallServiceConfig? = null, localSfuAddress: String? = null, sounds: Sounds = defaultResourcesRingingConfig(context).toSounds(), crashOnMissingPermission: Boolean = false, permissionCheck: StreamPermissionCheck = DefaultStreamPermissionCheck(), audioUsage: Int = defaultAudioUsage, appName: String? = null, audioProcessing: ManagedAudioProcessingFactory? = null, leaveAfterDisconnectSeconds: Long = 30)

Functions

Link copied to clipboard

Builds the StreamVideo client.