AudioCallContent

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

The AudioOnlyCallContent 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.

The older AudioCallContent component is deprecated. Use AudioOnlyCallContent instead.

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 AudioOnlyCallContent provides the call participants and call timer along with controls to leave the call or mute self. Let's see how to show the AudioOnlyCallContent 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 AudioOnlyCallContent

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

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContent {
        VideoTheme {
            AudioOnlyCallContent(
                call = call,
                isMicrophoneEnabled = true
            )
        }
    }
}

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

AttributeDescription
modifierThe standard Jetpack Compose modifier used to style things like the component size, background, shape and similar.
callThe call includes states and will be rendered with participants.
isMicrophoneEnabledWhether or not the microphone icon will show the mic as enabled or not.
permissionsAndroid permissions that should be requested.
isShowingHeaderIf true, header content is shown.
headerContentContent that overrides the header.
durationPlaceholderContent (text) shown while the duration is not available.
detailsContentContent that overrides the details (the middle part of the screen).
controlsContentContent that allows users to trigger call actions.
onCallActionHandler used when the user triggers a Call Control Action.
onBackPressedHandler used when the user taps on the back button.