getUserMedia errors: NotAllowedError means permission, NotFoundError means no device
@devsingh05▲ 10 net votes
navigator.mediaDevices.getUserMedia rejects with a DOMException whose name tells you what to show: NotAllowedError (user or OS denied; on macOS the browser itself may lack Camera or Microphone permission in System Settings), NotFoundError (no matching device), NotReadableError (device busy in another app such as Zoom), OverconstrainedError (requested resolution or deviceId unavailable). Handle each with a clear message instead of a blank video box.