Skip to main content

AudioCallContent

The AudioCallContent component is an alternative to the CallContent if you want to have audio calls only.

note

The AudioCallContent by itself does not make the call audio only. In order to have true audio only call you must update the capabilities of the call type and disable video via the Stream dashboard. The call can still stream video if this is allowed by the call configuration. See call types for more details.

This component renders a call UI similar to the ringing calls UI and has parameters (without the videoRenderer etc..) similar to CallContent component. Based on the call state, the AudioCallContent provides the call participants and call timer along with controls to leave the call or mute self. Let's see how to show the AudioCallContent UI.

Note: If you want to learn more about our component types, make sure to read through our Compose Components Overview.

Build a Call Screen With AudioCallContent

To use the bound AudioCallContent, add it to your UI within VideoTheme:

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
VideoTheme {
AudioCallContent(call = call) // here
}
}
}

You can customize and gain more control over the component by utilizing its parameters:

AttributeDescription
callThe call includes states and will be rendered with participants.
modifierThe standard Jetpack Compose modifier used to style things like the component size, background, shape and similar.
onBackPressedHandler when the user taps on the back button.
permissionsAndroid permissions that should be required to render a video call properly.
onCallActionHandler when the user triggers a Call Control Action.
durationPlaceholderPlaceholder to display if the call timer is not available
isShowingHeaderIf header will be shown or not (like back button etc...)
headerContentoverride the header content
detailsContentoverride the details content of the screen
controlsContentContent is shown that allows users to trigger different actions to control a joined call.

Did you find this page helpful?