0PricingLogin
Real-Time Streaming Systems (WebRTC + Live Data) · Lesson

Accessing User Media Devices

Discover how to use `navigator.mediaDevices.getUserMedia()` to access a user's camera and microphone in a web browser.

Get User's Camera & Mic

Welcome! In this lesson, we'll learn how to access a user's camera and microphone directly from their web browser. This is the first step for any real-time video or audio application.

We'll use a powerful Web API called navigator.mediaDevices.getUserMedia().

Why getUserMedia?

getUserMedia() is a core WebRTC feature. It allows your web application to:

  • Capture audio from a microphone.
  • Capture video from a camera.
  • Access these streams as MediaStream objects.

These streams can then be displayed, recorded, or sent to other peers.

All lessons in this course

  1. Accessing User Media Devices
  2. Adding and Removing Media Tracks
  3. Displaying Remote Audio/Video
  4. Controlling Media Quality and Constraints
← Back to Real-Time Streaming Systems (WebRTC + Live Data)