Skip to content

KaleyraVideoSDK Observers

kristiyan-petrov edited this page Nov 22, 2023 · 3 revisions

KaleyraVideo SDK state can be observed as follows:

KaleyraVideo.state.onEach { state ->
   Log.d("KALEYRA VIDEO", "state changed to: $state")
}.launchIn(MainScope())

Additionally synchronization state can be observed as follows:

KaleyraVideo.synchronization.onEach { synchronizationState ->
   Log.d("KALEYRA VIDEO", "state changed to: $synchronizationState")
}.launchIn(MainScope())
Clone this wiki locally