Skip to main content

Audio Control

This page describes how to control the audio within the Bambuser player, including muting and unmuting the audio.

Mute and Unmute Audio​

Use the mute and unmute invoke functions to control the audio output of the player.

fun muteAudio() {
lifecycleScope.launch {
viewActions.invoke(function = "mute", arguments = "")
}
}

fun unmuteAudio() {
lifecycleScope.launch {
viewActions.invoke(function = "unmute", arguments = "")
}
}

Configuration​

You can control the visibility of the volume button using the ui.hideVolumeButton configuration flag. By default, the volume button is visible.

Config KeyTypeDefaultDescription
ui.hideVolumeButtonbooleanfalseHides the volume control button.
val videoConfiguration = BambuserVideoConfiguration(
events = listOf("*"),
configuration = mapOf(
"ui" to mapOf(
"hideVolumeButton" to true
)
),
videoType = BambuserVideoAsset.Live(showId)
)

For the full configuration reference, see Configuration and Functions.