Class: VolumeInterface

VolumeInterface

An interface class for volume transformation.

Constructor

new VolumeInterface()

Source:

Extends

  • EventEmitter

Members

(readonly) volume :number

The current volume of the stream
Type:
  • number
Source:

(readonly) volumeDecibels :number

The current volume of the stream in decibels
Type:
  • number
Source:

(readonly) volumeEditable :boolean

Whether or not the volume of this stream is editable
Type:
  • boolean
Source:

(readonly) volumeLogarithmic :number

The current volume of the stream from a logarithmic scale
Type:
  • number
Source:

Methods

setVolume(volume)

Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.
Parameters:
Name Type Description
volume number The volume that you want to set
Source:

setVolumeDecibels(db)

Sets the volume in decibels.
Parameters:
Name Type Description
db number The decibels
Source:

setVolumeLogarithmic(value)

Sets the volume so that a perceived value of 0.5 is half the perceived volume etc.
Parameters:
Name Type Description
value number The value for the volume
Source:

Events

volumeChange

Emitted when the volume of this interface changes.
Parameters:
Name Type Description
oldVolume number The old volume of this interface
newVolume number The new volume of this interface
Source: