The MediaStream API
Explore how to use the MediaStream API to capture and manipulate audio and video streams from webcams and microphones in Progressive Web Applications. Understand how to request permissions, apply settings like resolution and frame rate, display streams in video and canvas elements, and record media. This lesson helps you integrate real-time media features such as video chat, QR scanning, and audio analysis while considering user privacy.
Introduction
The MediaStream API provides access to audio and video streams from webcams and microphones. It allows capturing, recording, and manipulating these streams in real time.
This API can be useful in the following ways:
- Capturing pictures
- Scanning QR codes
- Video chatting
- Real-time video effects
- Audio-video recording
Capturing media streams
We capture a media stream by calling the ...