Adjust volume and mute
Learn how to monitor and respond to volume and mute state changes in the FastPix iOS Player.
The FastPix iOS Player lets you control volume and mute from your own UI, and provides delegate callbacks so a custom UI stays in sync with the player’s audio state.
Control the volume
The player respects the device’s system volume, so changes made with the hardware volume buttons apply during playback with no extra setup. To drive volume from your own UI, such as a slider or gesture, set the player’s volume directly. The range is 0.0 (mute) to 1.0 (maximum), and it applies to the SDK player instance.
Mute and unmute
toggleMute() mutes or unmutes instantly without changing the current volume level, which is useful for a mute button or an accessibility control. Read the current state with isMuted().
Listen to volume changes
Implement the following delegate method to receive notifications when the player’s volume level changes. The volume value ranges from 0.0 (silent) to 1.0 (maximum).
Listen to mute state changes
Implement this delegate method to detect when the player is muted or unmuted:
Use these callbacks to update custom volume sliders, mute icons, or other UI elements so they stay in sync with the player’s audio state.