Computes a normalized speech audio level (0..1) from a MediaStream's audio
track using the Web Audio API. Use it to drive UI activity indicators.
The monitor is lazy: it only runs the analysis loop while at least one
subscriber is attached. Call dispose when the stream is gone or
the consumer goes away.
Returns the most recent level computed by the monitor (0..1).
Returns number
Methods
dispose
dispose():void
Returns void
subscribe
subscribe(callback:LevelCallback):()=>void
Subscribe for level updates. The callback fires immediately with the
current level, then at AudioLevelMonitorOptions.updateIntervalMs.
Returns an unsubscribe function.
Computes a normalized speech audio level (0..1) from a MediaStream's audio track using the Web Audio API. Use it to drive UI activity indicators.
The monitor is lazy: it only runs the analysis loop while at least one subscriber is attached. Call dispose when the stream is gone or the consumer goes away.