Adjust volume and mute
Learn how to control volume and mute state in the FastPix Android Player.
Set volume
Set the player volume on a scale from 0.0 (silent) to 1.0 (maximum). Values are clamped to this range.
Mute and unmute
mute() stores the current non-zero volume level. unmute() restores it, or defaults to 1.0 if no previous volume was saved.
Listen for volume changes
The SDK monitors system volume while at least one playback listener is attached. It fires callbacks for both programmatic and hardware button volume changes:
Use these callbacks to keep custom volume sliders and mute icons synchronized with the player’s audio state.