override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
VideoTheme {
AudioCallContent(call = call) // here
}
}
}
AudioCallContent
The AudioCallContent
component is an alternative to the CallContent
if you want to have audio calls only.
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
:
You can customize and gain more control over the component by utilizing its parameters:
Attribute | Description |
---|---|
call | The call includes states and will be rendered with participants. |
modifier | The standard Jetpack Compose modifier used to style things like the component size, background, shape and similar. |
onBackPressed | Handler when the user taps on the back button. |
permissions | Android permissions that should be required to render a video call properly. |
onCallAction | Handler when the user triggers a Call Control Action. |
durationPlaceholder | Placeholder to display if the call timer is not available |
isShowingHeader | If header will be shown or not (like back button etc…) |
headerContent | override the header content |
detailsContent | override the details content of the screen |
controlsContent | Content is shown that allows users to trigger different actions to control a joined call. |