Table of Contents

adv.volumeMeter()

wrtc.adv.volumeMeter() is used to measure local microphone volume.

Once started volume information will be reported using wrtc.onVolume() events.

Audio volume is only measured during calls. To measure volume without any ongoing calls see wrtc.adv.createLoopBackCall()

Measuring audio volume is only implemented in Chrome and Firefox browsers. wrtc.adv.volumeMeter() will fail silently on other browsers and no wrtc.onVolume() events will occur.

Measuring audio volume results in several wrtc.onVolume() events per second that can be very processor intensive to handle. Use wrtc.adv.volumeMeter() only if absolutely necessary.

The number of wrtc.onVolume() events per second is determined by call.adv.stats_ms

Usage

wrtc.adv.volumeMeter(true) - start microphone volume measurement.

wrtc.adv.volumeMeter(false) - stop all microphone volume measurements.

wrtc.adv.volumeMeter(call) - start microphone volume measurement using outgoing media stream of specified call.

Returns

Nothing.

Events

wrtc.onVolume() events reporting current audio volume.

See Also

wrtc.adv.createLoopBackCall()