VolumeCommands

interface VolumeCommands

Known direct subclasses
Volume

API for the Volume trait.


Summary

Public functions

suspend Unit
moveToVolume(volumePercent: UByte)

Move the volume of the device to the specified volume.

suspend Unit

Mutes the device.

suspend Unit

Unmutes the device and sets the volume to the last non-zero volume.

suspend Unit

Incremental step volume.

Public functions

moveToVolume

suspend fun moveToVolume(volumePercent: UByte): Unit

Move the volume of the device to the specified volume.

Parameters
volumePercent: UByte

The desired volume percentage setting in the range of 0 to 100.

mute

suspend fun mute(): Unit

Mutes the device.

unmute

suspend fun unmute(): Unit

Unmutes the device and sets the volume to the last non-zero volume.

volumeStep

suspend fun volumeStep(stepMode: VolumeTrait.VolumeStepModeEnum, step: UByte): Unit

Incremental step volume. If volume + step is greater than 100, the volume is set to 100. If volume + step is less than 0, the volume is set to 0.

Parameters
stepMode: VolumeTrait.VolumeStepModeEnum

Indicates whether to increase or decrease the volume.

step: UByte

Indicates the increment by which to increase or decrease the volume. Valid values are between 0 and 100.