fade
audio.fade()
Smoothly transitions the current volume to the desired new volume.
audio.fade(audio, Volume, Time, Steps)
audio
HtmlAudioElement
Audio object created with audio.newAudio(path)
. This object is used to control playback, volume, position, etc.
Volume
Number
Audio volume. Ranges from 0
(silent) to 1
(maximum). Used to directly set the volume.
Time
Number
Total time in seconds the volume fade will take from the current level to the target volume.
Steps
Number
Steps that the fade transition will take to reach the desired volume.