setVolumeToPercentage

fun setVolumeToPercentage(percentage: Double, showVolumeBar: Boolean = false): Boolean

Sets the volume to the given percentage value. If showVolumeBar is true, shows the volume bar.

Return

true if the volume was successfully set, false otherwise

Parameters

percentage

the percentage value to set the volume to, as a double between 0 and 1

showVolumeBar

whether to show the volume bar or not