Skip to content

rewindtty/browser_player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rewindtty logo

RewindTTY Browser Player

A modern web-based player for RewindTTY terminal session recordings with advanced playback controls and interactive features.

player screenshot

Features

  • Terminal Playback: View recorded terminal sessions with authentic terminal rendering using xterm.js
  • Playback Controls: Play, pause, restart, and variable speed playback (0.5x - 3x)
  • Interactive Timeline: Click to seek, drag to scrub, mouse wheel to fine-tune position
  • Command Markers: Visual markers on timeline showing when each command was executed
  • Bookmarks: Add named bookmarks to quickly jump to specific moments
  • Command Sidebar: Browse and jump to any command in the session
  • Keyboard Shortcuts: Space (play/pause), R (restart), B (add bookmark)
  • Responsive Design: Works on desktop and mobile devices

Installation

  1. Clone the repository:
git clone <repository-url>
cd rewindtty-browser-player
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Build for production:
npm run build

Usage

Loading Sessions

Option 1: File Upload

  1. Open the application in your browser
  2. Select a RewindTTY JSON file using the file picker

Option 2: URL-based Playback

  • Navigate directly to /play/:id where :id is the session identifier
  • Example: https://play.rewindtty.dev/play/session123
  • The application will automatically load the session from the configured upload URL

Playback Controls

Use the playback controls to navigate through the session:

  • Play/Pause: Click the play button or press Space
  • Restart: Click restart button or press R
  • Speed Control: Click speed button to cycle through speeds
  • Timeline: Click anywhere to seek, drag to scrub
  • Bookmarks: Press B to add bookmark, click bookmarks to jump
  • Commands: Click command list button to view all commands

JSON Format

The player expects RewindTTY JSON files with the following structure:

[
  {
    "command": "ls -la",
    "start_time": 1234567890,
    "end_time": 1234567895,
    "duration": 5.0,
    "chunks": [
      {
        "time": 0.1,
        "size": 1024,
        "data": "terminal output data"
      }
    ]
  }
]

Technical Details

  • Framework: Vanilla TypeScript with Vite
  • Terminal: xterm.js with fit addon for responsive terminals
  • Styling: Custom CSS with modern design
  • Storage: LocalStorage for bookmark persistence

Keyboard Shortcuts

  • Space: Toggle play/pause
  • R: Restart playback
  • B: Add bookmark at current position

Browser Compatibility

  • Modern browsers with ES6+ support
  • Chrome 60+, Firefox 55+, Safari 12+, Edge 79+

Development

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

License

[Add your license information here]