Class: RawAudioRecorder

Guacamole.RawAudioRecorder

new RawAudioRecorder(stream, mimetype)

Implementation of Guacamole.AudioRecorder providing support for raw PCM format audio. This recorder relies only on the Web Audio API and does not require any browser-level support for its audio formats.
Parameters:
Name Type Description
stream Guacamole.OutputStream The Guacamole.OutputStream to write audio data to.
mimetype String The mimetype of the audio data to send along the provided stream, which must be a "audio/L8" or "audio/L16" mimetype with necessary parameters, such as: "audio/L16;rate=44100,channels=2".
Source:

Extends

Members

(inner) getUserMedia :function

A function which directly invokes the browser's implementation of navigator.getUserMedia() with all provided parameters.
Type:
  • function
Source:

(inner) mediaStream :MediaStream

The audio stream provided by the browser, if allowed. If no stream has yet been received, this will be null.
Type:
  • MediaStream
Source:

Methods

(static) getSupportedTypes() → {Array.<String>}

Returns a list of all mimetypes supported by Guacamole.RawAudioRecorder. Only the core mimetypes themselves will be listed. Any mimetype parameters, even required ones, will not be included in the list. For example, "audio/L8" is a raw audio mimetype that may be supported, but it is invalid without additional parameters. Something like "audio/L8;rate=44100" would be valid, however (see https://tools.ietf.org/html/rfc4856).
Source:
Returns:
A list of all mimetypes supported by Guacamole.RawAudioRecorder, excluding any parameters. If the necessary JavaScript APIs for recording raw audio are absent, this list will be empty.
Type
Array.<String>

(static) isSupportedType(mimetype) → {Boolean}

Determines whether the given mimetype is supported by Guacamole.RawAudioRecorder.
Parameters:
Name Type Description
mimetype String The mimetype to check.
Source:
Returns:
true if the given mimetype is supported by Guacamole.RawAudioRecorder, false otherwise.
Type
Boolean

Events

onclose

Callback which is invoked when the audio recording process has stopped and the underlying Guacamole stream has been closed normally. Audio will only resume recording if a new Guacamole.AudioRecorder is started. This Guacamole.AudioRecorder instance MAY NOT be reused.
Inherited From:
Source:

onerror

Callback which is invoked when the audio recording process cannot continue due to an error, if it has started at all. The underlying Guacamole stream is automatically closed. Future attempts to record audio should not be made, and this Guacamole.AudioRecorder instance MAY NOT be reused.
Inherited From:
Source: