new SessionRecording(tunnel)
A recording of a Guacamole session. Given a Guacamole.Tunnel, the
Guacamole.SessionRecording automatically handles incoming Guacamole
instructions, storing them for playback. Playback of the recording may be
controlled through function calls to the Guacamole.SessionRecording, even
while the recording has not yet finished being created or downloaded.
Parameters:
Name | Type | Description |
---|---|---|
tunnel |
Guacamole.Tunnel | The Guacamole.Tunnel from which the instructions of the recording should be read. |
- Source:
Methods
connect(data)
Connects the underlying tunnel, beginning download of the Guacamole
session. Playback of the Guacamole session cannot occur until at least
one frame worth of instructions has been downloaded.
Parameters:
Name | Type | Description |
---|---|---|
data |
String | The data to send to the tunnel when connecting. |
- Source:
disconnect()
Disconnects the underlying tunnel, stopping further download of the
Guacamole session.
- Source:
getDisplay() → {Guacamole.Display}
Returns the underlying display of the Guacamole.Client used by this
Guacamole.SessionRecording for playback. The display contains an Element
which can be added to the DOM, causing the display (and thus playback of
the recording) to become visible.
- Source:
Returns:
The underlying display of the Guacamole.Client used by this
Guacamole.SessionRecording for playback.
- Type
- Guacamole.Display
getDuration() → {Number}
Returns the duration of this recording, in milliseconds. If the
recording is still being downloaded, this value will gradually increase.
- Source:
Returns:
The duration of this recording, in milliseconds.
- Type
- Number
getPosition() → {Number}
Returns the current playback position within the recording, in
milliseconds, where zero is the start of the recording.
- Source:
Returns:
The current playback position within the recording, in milliseconds.
- Type
- Number
isPlaying() → {Boolean}
Returns whether playback is currently in progress.
- Source:
Returns:
true if playback is currently in progress, false otherwise.
- Type
- Boolean
pause()
Pauses playback of the recording, if playback is currently in progress.
If playback is not in progress, this function has no effect. Playback is
initially paused when a Guacamole.SessionRecording is created, and must
be explicitly started through a call to play().
- Source:
play()
Begins continuous playback of the recording downloaded thus far.
Playback of the recording will continue until pause() is invoked or
until no further frames exist. Playback is initially paused when a
Guacamole.SessionRecording is created, and must be explicitly started
through a call to this function. If playback is already in progress,
this function has no effect.
- Source:
seek(position)
Seeks to the given position within the recording. If the recording is
currently being played back, playback will continue after the seek is
performed. If the recording is currently paused, playback will be
paused after the seek is performed.
Parameters:
Name | Type | Description |
---|---|---|
position |
Number | The position within the recording to seek to, in milliseconds. |
- Source:
Events
onpause
Fired whenever playback of the recording has been paused. This may
happen when playback is explicitly paused with a call to pause(), or
when playback is implicitly paused due to reaching the end of the
recording.
- Source:
onplay
Fired whenever playback of the recording has started.
- Source:
onprogress
Fired when new frames have become available while the recording is
being downloaded.
Parameters:
Name | Type | Description |
---|---|---|
duration |
Number | The new duration of the recording, in milliseconds. |
- Source:
onseek
Fired whenever the playback position within the recording changes.
Parameters:
Name | Type | Description |
---|---|---|
position |
Number | The new position within the recording, in milliseconds. |
- Source: