class Volume extends LimitedEffectQualifier

Controls the volume of an audio or video file.

Learn more: Adjust the audio volume

Methods

__construct(mixed $volume = null)

Volume constructor.

volume(mixed $volume)

Named Volume constructor.

byDecibels(int $dBOffset)

Increases or decreases the volume by the specified number of decibels.

byPercent(int $level)

Increases or decreases the volume by a percentage of the current volume.

mute()

Mutes the volume.

Details

__construct(mixed $volume = null)

Volume constructor.

Parameters

Name Type Description
$volume mixed

static Volume volume(mixed $volume)

Named Volume constructor.

Parameters

Name Type Description
$volume mixed

Return Value

Volume

static Volume byDecibels(int $dBOffset)

Increases or decreases the volume by the specified number of decibels.

Parameters

Name Type Description
$dBOffset int The offset in dB.

Return Value

Volume

static Volume byPercent(int $level)

Increases or decreases the volume by a percentage of the current volume.

Parameters

Name Type Description
$level int The percentage change of volume (Range: -100 to 400).

Return Value

Volume

static Volume mute()

Mutes the volume.

You can use this on the base video to deliver a video without sound, or with a video overlay to ensure that only the sound from the base video plays.

Return Value

Volume

Constants

MUTE