SoundIndicator

If you’re looking to build a way for users to know if a person is muted or unmuted, you can use our SoundIndicator component.

It’s very simple and represents a few states:

  • Muted: shows a muted microphone icon to indicate that the user has turned off their audio.
  • Unmuted: shows a regular microphone icon to indicate that the user has turned their microphone on.

Usage

To add the SoundIndicator component to your layout, you can use the SoundIndicator view like this:

SoundIndicator(participant: participant)

The participant is of type CallParticipant and it represents one participant in the call.

The view is very simple and it allows only changing its microphone icons.

To do that, you need to provide your own values in the Images class and inject it in the Appearance object:

let images = Images()
images.micTurnOn = Image("custom_mic_turn_on_icon")
images.micTurnOff = Image("custom_mic_turn_off_icon")
let appearance = Appearance(images: images)
streamVideoUI = StreamVideoUI(streamVideo: streamVideo, appearance: appearance)
© Getstream.io, Inc. All Rights Reserved.