browseraiOpen the playground

Live view and replay

Both are off unless you turn them on when you open the session.

Live view

liveView: true gives a wss URL with its own view token. Anyone holding it receives the screen as JPEG frames and the action log, read only. Frames are streamed and never stored.

const s = await bai.open({ liveView: true })
const ws = new WebSocket(s.liveViewUrl)
ws.onmessage = (e) => {
  const m = JSON.parse(e.data)   // { type: 'frame', data } | { type: 'log', text } | { type: 'closed' }
}

Replay

replay: true keeps up to two frames a second in memory while the session runs. After it closes they stay available at replayUrl for one hour, then they are deleted. They are never written to disk.