bindView

fun CallAppBarView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner, onBackPressed: () -> Unit = { }, onParticipantsPressed: () -> Unit = { })

Binds CallView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing CallView. Usually an Activity or Fragment.

onBackPressed

Handler that notifies when the back button has been pressed.

onParticipantsPressed

Notifies when the participants button has been pressed.


fun CallContainerView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner, fetchCallMediaState: (CallDeviceState, Boolean) -> List<CallControlItem> = { mediaState, isScreenSharingActive -> defaultControlList(mediaState, isScreenSharingActive) }, onParticipantsPressed: () -> Unit = { }, onBackPressed: () -> Unit = { }, onIdle: () -> Unit = { })

Binds CallContainerView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing CallContainerView. Usually an Activity or Fragment.

fetchCallMediaState

Handler used to fetch the new state of the call controls buttons when the media state changes.

onCallAction

Handler that listens to interactions with call media controls.

onBackPressed

Handler that notifies when the back button has been pressed.

onIdle

Handler that notifies when the call has entered the idle state, notifies about end of the call.


fun CallControlsView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner, fetchCallMediaState: (CallDeviceState, Boolean) -> List<CallControlItem> = { mediaState, isScreenSharingActive -> defaultControlList(mediaState, isScreenSharingActive) })

Binds CallControlsView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing CallControlsView. Usually an Activity or Fragment.

fetchCallMediaState

Handler used to fetch the new state of the call controls buttons when the media state changes.

onCallAction

Handler that listens to interactions with call media controls.


fun CallView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner, fetchCallMediaState: (CallDeviceState, Boolean) -> List<CallControlItem> = { mediaState, isScreenSharingActive -> defaultControlList(mediaState, isScreenSharingActive) })

Binds CallView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing CallView. Usually an Activity or Fragment.

fetchCallMediaState

Handler used to fetch the new state of the call controls buttons when the media state changes.

onCallAction

Handler that listens to interactions with call media controls.


Binds FloatingParticipantView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing FloatingParticipantView. Usually an Activity or Fragment.


fun IncomingCallView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner)

Binds IncomingCallView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing IncomingCallView. Usually an Activity or Fragment.

onCallAction

Handler that listens to interactions with call media controls.


fun OutgoingCallView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner)

Binds OutgoingCallView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing OutgoingCallView. Usually an Activity or Fragment.

onCallAction

Handler that listens to interactions with call media controls.


Binds PictureInPictureView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing PictureInPictureView. Usually an Activity or Fragment.


fun ScreenShareView.bindView(viewModel: CallViewModel, lifecycleOwner: LifecycleOwner)

Binds ScreenShareView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.

This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.

Parameters

viewModel

CallViewModel for observing data and running actions.

lifecycleOwner

The lifecycle owner, root component containing ScreenShareView. Usually an Activity or Fragment.