new RawAudioPlayer(streamnon-null, mimetypenon-null)
Implementation of Guacamole.AudioPlayer providing support for raw PCM format
audio. This player 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.InputStream | The Guacamole.InputStream to read audio data from. |
mimetype |
string | The mimetype of the audio data in the provided stream, which must be a "audio/L8" or "audio/L16" mimetype with necessary parameters, such as: "audio/L16;rate=44100,channels=2". |
Extends
Methods
sync()
Notifies this Guacamole.AudioPlayer that all audio up to the current
point in time has been given via the underlying stream, and that any
difference in time between queued audio data and the current time can be
considered latency.
- Overrides:
- Source:
(static) getSupportedTypes() → (non-null) {Array.<string>}
Returns a list of all mimetypes supported by Guacamole.RawAudioPlayer. 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).
Returns:
A list of all mimetypes supported by Guacamole.RawAudioPlayer, excluding
any parameters. If the necessary JavaScript APIs for playing raw audio
are absent, this list will be empty.
- Type
- Array.<string>
(static) isSupportedType(mimetypenon-null) → (non-null) {boolean}
Determines whether the given mimetype is supported by
Guacamole.RawAudioPlayer.
Parameters:
Name | Type | Description |
---|---|---|
mimetype |
string | The mimetype to check. |
Returns:
true if the given mimetype is supported by Guacamole.RawAudioPlayer,
false otherwise.
- Type
- boolean