API
Audio Gain
An overview on requesting and tracking audio gain changes.
Requesting
Section titled RequestingThe player will use the GainNode
interface on the HTMLMediaElement
to apply a
gain to audio output. The gain value is a float that represents the amount of gain to apply. The
default is 1
, setting it to 1.5
will increase volume by 50%
, 2
will increase volume by
100%
, and so on.
You can request audio gain changes by using the audio gain slider, remote control, or via methods on the player instance.
Remote Control
Section titled Remote ControlThe media remote provides methods for dispatching media-audio-gain-change-request
request events like so:
Methods
Section titled MethodsThe setAudioGain()
method is available on the player component instance for requesting changes:
State
Section titled StateThe following audio gain properties are available on the media store:
canSetAudioGain
: Whether audio gain is supported by the current browser and provider.audioGain
: The current audio gain.
Events
Section titled EventsThe following events are available for detecting audio gain changes: