AudioContext mock to be used during the test.
AudioRecorder mock to be used during the test.
Whether or not to log debug statements to the console.
The device ID to try to get a MediaStream from using getUserMedia.
Duration of time to run the test in ms.
Whether the test should record the audio input or not. If set to true, AudioInputTest.Report.recordingUrl will be available for audio playback. Your application should revoke this URL if it is no longer needed.
Example:
const audioInputTest: AudioInputTest = testAudioInputDevice({ enableRecording: true });
audioInputTest.on(AudioInputTest.Events.End, (report: AudioInputTest.Report) => {
const audioEl = new Audio();
audioEl.src = report.recordingUrl;
audioEl.play();
// Revoke the url if no longer needed
URL.revokeObjectURL(report.recordingUrl);
});
Used to mock the call to enumerateDevices
.
Used to mock calls to getUserMedia
.
The interval between emissions of volume events in milliseconds.
Generated using TypeDoc
Options passed to AudioInputTest constructor.