MuteButton and VolumeSlider components.
Import
Usage
- React
- HTML
State
Current volume level from
0 (silent) to 1 (maximum).Whether audio is currently muted.
Whether volume control is supported on this platform. iOS Safari does not allow programmatic volume control.Possible values:
'available' | 'unavailable' | 'unsupported'Actions
Set the volume level. The value is clamped to the range
0–1. Automatically unmutes when raised above zero.Toggle mute on or off. Restores volume to
0.25 when unmuting at zero.Selector
UseselectVolume to subscribe to only the volume slice of state. Returns undefined if the volume feature is not configured.
- React
- HTML
Required by:
MuteButton, VolumeSlider