Compartilhar via


VolumeManager class

Smooth audio level changes when volume is modified, or if volume limiting has started/ended.

Constructors

VolumeManager(IMediaPlayer)

Properties

isLimiting

Whether or not volume limiting is currently enabled.

limitLevel

Target level to lower volume to.

limitLevelType

The type of level represented by the limitLevel property.

volume

The selected volume.

volumeChangeDuration

Amount of time, in seconds, it should take to change the volume up or down to the desired level.

Methods

startLimiting()

Limits volume based on limitLevel and limitLevelType properties.

See limitLevel See limitLevelType

stopLimiting()

Disables volume limit.

Constructor Details

VolumeManager(IMediaPlayer)

new VolumeManager(player: IMediaPlayer)

Parameters

player
IMediaPlayer

Property Details

isLimiting

Whether or not volume limiting is currently enabled.

boolean isLimiting

Property Value

boolean

limitLevel

Target level to lower volume to.

number limitLevel

Property Value

number

limitLevelType

The type of level represented by the limitLevel property.

LimitLevelType limitLevelType

Property Value

volume

The selected volume.

number volume

Property Value

number

volumeChangeDuration

Amount of time, in seconds, it should take to change the volume up or down to the desired level.

number volumeChangeDuration

Property Value

number

Method Details

startLimiting()

Limits volume based on limitLevel and limitLevelType properties.

See limitLevel See limitLevelType

function startLimiting()

stopLimiting()

Disables volume limit.

function stopLimiting()