The Playback Plugin


playback.js - The client-side portion of Gate One's Playback plugin.


Adds the session playback controls to Gate One's element (GateOne.prefs.goDiv).


Will not add playback controls if they're already present.


Hides the playback controls.


Adds the playback controls to Gate One and adds some GUI elements to the Tools & Info panel. Also attaches the following events/functions:

// Add our callback that adds an extra newline to all terminals
GateOne.Events.on("terminal:new_terminal", GateOne.Playback.newTerminalCallback);
// This makes sure our playback frames get added to the terminal object whenever the screen is updated
GateOne.Events.on("terminal:term_updated", GateOne.Playback.pushPlaybackFrame);
// This makes sure our prefs get saved along with everything else
GateOne.Events.on("go:save_prefs", GateOne.Playback.savePrefsCallback)
// Hide the playback controls when in grid view
GateOne.Events.on("go:grid_view:open", GateOne.Playback.hideControls);
// Show the playback controls when no longer in grid view
GateOne.Events.on("go:grid_view:close", GateOne.Playback.showControls);
GateOne.Playback.newTerminalCallback(term, calledTwice)

This gets added to the 'terminal:new_terminal' event to ensure that there's some extra space at the bottom of each terminal to make room for the playback controls.

It also calls GateOne.Playback.addControls() to make sure they're present only after a new terminal is open.


Toggles play/pause inside the current terminal. Meant to be attached to the Play/Pause icon's onclick event.


Plays back the given terminal's session one frame at a time. Meant to be used inside of an interval timer.


Adds the current screen of term to GateOne.Terminal.terminals[term].playbackFrames.


Called when the user clicks the "Save" button in the prefs panel. Makes sure the 'playbackFrames' setting gets updated according to what the user entered into the form.


Saves the session playback recording by sending the given term's 'playbackFrames' to the server to have them rendered.

When the server is done rendering the recording it will be sent back to the client via the 'save_file' WebSocket action.

GateOne.Playback.selectFrame(term, ms)

For the given term, returns the last frame # with a 'time' less than the first frame's time + ms.


Shows the playback controls again after they've been hidden via GateOne.Playback.hideControls().


Plays back the given terminal's session in real-time.


Called whenever Gate One switches to a new workspace; checks whether or not this workspace is home to a terminal and if so, shows the playback controls.

If no terminal is present in the current workspace the playback controls will be removed.


Updates the clock with the time in the given dateObj.

If no dateObj is given, the clock will be updated with the current local time.

Python - A plugin for Gate One that adds support for saving and playing back session recordings.


Yes this only contains one function and it is exposed to clients through a WebSocket hook.


This Python plugin file implements the following hooks:

hooks = {
    'WebSocket': {
        'playback_save_recording': save_recording,



Returns the rendered 256-color CSS.

playback.save_recording(self, settings)[source]

Handles uploads of session recordings and returns them to the client in a self-contained HTML file that will auto-start playback.

..note:: The real crux of the code that handles this is in the template.