Errors

SoundProof Errors

soundproof.BadSampleRateError ⇐ Error

Extends: Error
Properties

NameTypeDescription
messagestringError message.
namestringError name.

new BadSampleRateError(message)

This error indicates that the recording sample rate at which the browser is recording is not supported by SoundProof. This sample rate is system determined and cannot be controlled or configured by the JavaScript code. The sample rates that are guaranteed to be compatible are 44100 Hz and 48000 Hz.

ParamTypeDescription
messagestringOptional. Human-readable description of the error.

soundproof.BrowserMicError ⇐ Error

Extends: Error
Properties

NameTypeDescription
messagestringError message.
namestringError name.

new BrowserMicError(message)

This error indicates that even if access to the microphone was successful (i.e., MediaDevices.getUserMedia() was called successfully) the browser microphone input was zero, probably because the user has muted the microphone, or due to some other browser-access-to-microphone related problem. You may prompt the user to unmute the microphone. Moreover, sometimes microphone related problems can be resolved by simply restarting the browser, thus you may as well prompt the user to restart his browser and try again.

ParamTypeDescription
messagestringOptional. Human-readable description of the error.

soundproof.GenericSoundProofError ⇐ Error

Extends: Error
Properties

NameTypeDescription
messagestringError message.
namestringError name.

new GenericSoundProofError(message)

This error indicates represents a generic SoundProof error. Check the message property in order to potentially get more information about the nature of the error.

ParamTypeDescription
messagestringOptional. Human-readable description of the error.

soundproof.MediaError ⇐ Error

Extends: Error
Properties

NameTypeDescription
getUserMediaErrorDOMExceptionThe error as returned by MediaDevices.getUserMedia().
messagestringError message.
namestringError name.

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.

ParamTypeDescription
getUserMediaErrorDOMExceptionThe error as returned by MediaDevices.getUserMedia().
messagestringOptional. Human-readable description of the error.

soundproof.MobileAppMicPermissionError ⇐ Error

Extends: Error
Properties

NameTypeDescription
messagestringError message.
namestringError name.

new MobileAppMicPermissionError(message)

This error indicates that the user has not granted the Futurae mobile app access to the microphone, and thus SoundProof cannot be executed. You should prompt the user to grant the Futurae mobile app permission to record on the user’s mobile device.

ParamTypeDescription
messagestringOptional. Human-readable description of the error.

soundproof.MobileAppMicBusyError ⇐ Error

Extends: Error
Properties

NameTypeDescription
messagestringError message.
namestringError name.

new MobileAppMicBusyError(message)

This error indicates that the Futurae mobile app is not able to record audio, because the microphone on the mobile device is busy or unavailable (probably used by another application), and thus SoundProof cannot be executed. If approve combo is used, you should prompt the user to manually approve the login. Otherwise you should fallback to another secondary authentication method.

ParamTypeDescription
messagestringOptional. Human-readable description of the error.

soundproof.NetworkError ⇐ Error

Extends: Error
Properties

NameTypeDescription
messagestringError message.
namestringError name.

new NetworkError(message)

This error indicates that SoundProofJS was unable to connect to the Futurae server (or connection was interrupted), and thus SoundProof cannot be executed successfully. This is often likely due to firewall policies or other restrictive measures that block cross-origin communication. If approve combo is used, you should prompt the user to manually approve the login. Otherwise you should fallback to another secondary authentication method. Note that, because the connection to the server failed you will not be able to receive further updates about the authentication attempt on the client-side.

ParamTypeDescription
messagestringOptional. Human-readable description of the error.

Built-In Errors

Error

The built-in JavaScript Error object.

Kind: global external
See: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Error

DOMException

The built-in web API DOMException interface.

Kind: global external
See: https://developer.mozilla.org/en-US/docs/Web/API/DOMException