Class: MediaError

soundproof. MediaError


new MediaError(getUserMediaError, message)

This error encapsulates an error returned by MediaDevices.getUserMedia(), which is the function used in order to get access to the microphone. The `getUserMediaError` property contains the error object as returned by getUserMedia(). Please refer to the respective documentation in order to find information about the returned errors and how to react respectively. For example, if the user does not grant access to the microphone, a NotAllowedError will be returned and you can choose to explain to the user why he should enable access to the microphone and instructions on how to do it. Alternatively, you might choose to immediately fallback to another secondary authentication method.
Parameters:
Name Type Description
getUserMediaError external:DOMException The error as returned by MediaDevices.getUserMedia().
message string Optional. Human-readable description of the error.
Properties:
Name Type Description
getUserMediaError external:DOMException The error as returned by MediaDevices.getUserMedia().
message string Error message.
name string Error name.

Extends