WebRTC samples getUserMedia

Warning: if you're not using headphones, pressing play will cause feedback.

Display the video stream from getUserMedia() in a video element.

The MediaStream object stream passed to the getUserMedia() callback is in global scope, so you can inspect it from the console.

View source on GitHub

WebRTC samples Audio stream volume

Measure the volume of a local media stream using WebAudio.

Instant:
Slow:
Clip:

The 'instant' volume changes approximately every 50ms; the 'slow' volume approximates the average volume over about a second.

Note that you will not hear your own voice; use the local audio rendering demo for that.

The audioContext, stream and soundMeter variables are in global scope, so you can inspect them from the console.

View source on GitHub