Set Audio Volume

Adjusts the volume of the audio file.

Syntax

store.dispatch({ type: "SET_AUDIO_VOLUME", payload: volume });

Parameters

volume

The percentage value ranging from 0 - 1 that determines the volume of the audio file.

Examples

Adjusts the audio volume to half of max volume.

store.dispatch({
  type: "SET_AUDIO_VOLUME",
  payload: 0.5
});