Table of Contents

onStats()

wrtc.onStats() is called when Chrome browser has collected statistics about received media stream during a call. (Chrome only, never occurs on other browsers.)

You can use this event to display the statistics (mostly used for debug).

Occurs

You must set call.adv.stats_ms to enable wrtc.onStats()

If you have set call.adv.stats_ms=1000 wrtc.onStats() will be called once per second during the duration of the call. (Chrome only)

Arguments

wrtc.onStat(call, arg)

All measurements are of the incoming media stream.

You can use the value audioLevel to detect if the person you are in call with is speaking right now or not. Usually audioLevel>1000 means you are receiving sound.

See Also

call.adv.stats_ms