Class Index | File Index

Classes


Class Guacamole.AudioChannel


Defined in: AudioChannel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Abstract audio channel which queues and plays arbitrary audio data.
Field Summary
Field Attributes Field Name and Description
<inner>  
The last time that sync() was called, in milliseconds.
Method Summary
Method Attributes Method Name and Description
<static>  
Guacamole.AudioChannel.getTimestamp()
Returns a base timestamp which can be used for scheduling future audio playback.
 
play(mimetype, duration, data)
Queues up the given data for playing by this channel once all previously queued data has been played.
 
sync()
Notifies this Guacamole.AudioChannel that all audio up to the current point in time has been given via play(), and that any difference in time between queued audio packets and the current time can be considered latency.
Class Detail
Guacamole.AudioChannel()
Abstract audio channel which queues and plays arbitrary audio data.
Field Detail
<inner> {Number} lastSync
The last time that sync() was called, in milliseconds. If sync() has never been called, this will be the time the Guacamole.AudioChannel was created.
Method Detail
<static> {Number} Guacamole.AudioChannel.getTimestamp()
Returns a base timestamp which can be used for scheduling future audio playback. Scheduling playback for the value returned by this function plus N will cause the associated audio to be played back N milliseconds after the function is called.
Returns:
{Number} An arbitrary channel-relative timestamp, in milliseconds.

play(mimetype, duration, data)
Queues up the given data for playing by this channel once all previously queued data has been played. If no data has been queued, the data will play immediately.
Parameters:
{String} mimetype
The mimetype of the audio data provided.
{Number} duration
The duration of the data provided, in milliseconds.
{Blob} data
The blob of audio data to play.

sync()
Notifies this Guacamole.AudioChannel that all audio up to the current point in time has been given via play(), and that any difference in time between queued audio packets and the current time can be considered latency.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Sep 08 2015 22:31:29 GMT-0700 (PDT)