MediaStream.setVolume

Sets the volume of the audio stream.

This function call will work even if the stream is muted.

The given @volume should range from 0.0 for silence to 1.0 for as loud as possible. Values outside of this range will be clamped to the nearest value.

If the stream has no audio or is muted, calling this function will still work but it will not have an immediate audible effect. When the stream is unmuted, the new volume setting will take effect.

class MediaStream
void
setVolume
(
double volume
)

Parameters

volume double

New volume of the stream from 0.0 to 1.0

Meta