Determining Device Availability

Let’s look at different possible device availability scenarios and write error-handling logic that addresses them. As you’ll see, certain scenarios—like a missing camera, or users denying permission to access a microphone—throw different errors in Firefox, Chrome, and Safari. The sections below provide tables documenting browser-specific behavior and errors under different conditions.

The good news is the code you’ve written over all the previous chapters has avoided tying call-joining logic with media-device permissions and availability: those are separate code paths, and should remain that way. In other words, no app should demand that users grant device access as a pre-condition for joining a call. It’s entirely ...

Get Programming WebRTC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.