createMicrophoneAnalyzer
createMicrophoneAnalyzer
ConstcreateMicrophoneAnalyzer(options):Promise<MicrophoneAnalyzer>
Initializes a microphone analyzer. You can use a MicrophoneAnalyzer to track the input audio volume.
To stop the analyzer, call the destroy() method on the returned object.
The returned object emits the following events:
volumeChanged: Instantaneous volume from 0 to 100.destroyed: The object has been destroyed. The parameter describes the reason:null(if you calleddestroy()),"error"(in case of errors), or"disconnected"(if the device was disconnected).
Parameters
options
Either the id of the device to analyze, a MediaStreamConstraints object, or a MediaStream.
Returns
Promise<MicrophoneAnalyzer>