Video SDKException
Thrown when an action is refused or fails — by the suspending methods on Room, Participant and RTCStream, and by the VideoSDK methods whose docs list it.
It is unchecked, so catching it is opt-in. Branch on code against the VideoSDKError catalogue rather than on the message text, which the server can override:
lifecycleScope.launch {
try {
room.unmuteMic()
} catch (e: VideoSDKException) {
when (e.error) {
VideoSDKError.ERROR_OPERATION_IN_PROGRESS -> Unit // a mic toggle is already running
VideoSDKError.ERROR_MICROPHONE_ACCESS_DENIED_OR_DISMISSED -> requestMicPermission()
else -> showError(e.message)
}
}
}Content copied to clipboard
Most failures are also announced on RoomEventListener.onError; see VideoSDKError for the ones that are only thrown.
Constructors
Link copied to clipboard
Wraps a VideoSDKError, keeping its message.
Properties
Link copied to clipboard
the numeric VideoSDKError code, for example 3055.
Link copied to clipboard
This failure as a VideoSDKError, carrying this exception's message.