Readonly onEmits a changed fading state.
kind of fading operation that is currently ongoing
Readonly onEmits a changed muted state.
the changed muted state
Readonly onEmits a changed soloed state.
the changed soloed state
Readonly onEmits a changed master volume state.
the changed master volume
Whether to apply an additional seek offset before fade-in operations, to compensate the fading duration.
Gets the overall solo state in a multitrack context.
When any is soloed, but not this track, this is effectively muted.
Sets the overall solo state in a multitrack context.
When any is soloed, but not this track, this is effectively muted.
Gets the fade-in duration in [milliseconds].
Gets the fade-out duration in [milliseconds].
Gets the fading state, which is true for any kind of fading.
Gets whether fading is currently enabled.
Fading is expected to be enabled by default.
Sets whether fading is currently enabled.
Fading is generally enabled by default, but may get disabled generally or on some events
Gets the muted state.
Sets the muted state.
Gets the soloed state.
Sets the soloed state.
Returns a fade-in promise for the currently playing track
Optional immediate: booleanWhen set to true, the fade operation is done with duration zero.
The sound is faded to the master volume audio level. A pre-fade offset is applied, when configured An actual fade operation is only started when
Returns a fade-out promise for the currently playing track
Optional immediate: booleanWhen set to true, the fade operation is done with duration zero.
The sound is faded to the minimum audio level. An actual fade operation is only started when
Sets the master audio volume.
A value between 0 (zero, will get limited to the minimum level) and 1 (representing full scale)
The new, possibly limited, master audio volume
The new value is only applied if it actually changes, after limitation. The 'onMasterVolumeChange' is also only emitted on actual changes.
Updates the current settings.
The fade-in duration. Default is 1000 (1 second)
The fade-out duration. Default is 500 (500 milliseconds)
Whether to apply an additional seek offset before fade-in operations, to compensate the fading duration. (Default: true)
The settings will be used for the next fade. However, when the new duration is zero (no fade), the cancel operation is immediately called, resetting the volume to the initial value for this case.
Defines an audio fader with fade-in/out operations, for use during playback, including a muted and soloed state. Soloing only works in a multitrack context. This fader supports two concepts:
Remarks
The goal is to free the actual player from fading handling. Using this promise-based approach especially frees the using code from using timers for calling delayed stop or pause operations after a fade operation. Newly attempted fade operations are prevented during already ongoing fade operations. The ongoing fade operation is however cancelled (and subsequently fades to min). Fading is only actually executed for non-zero fading durations. For zero fading durations, the call immediately returns with a resolved promise, without any call to a fade operation. This can be used as a convenient way to skip fadings. NOTE: Visual fading indication like progress bars or brightness changes must be implemented elsewhere, but can use the provided onFadingChanged event.