Live View

Hyperbrowser Live View

Hyperbrowser's Live View feature allows you to observe and interact with your browser sessions in real-time. You can use Live View to:

  • Debug and troubleshoot your scripts

  • Monitor the progress of long-running automations

  • Provide a way for end-users to interact with the browser

How it Works

Live View works by providing a secure, authenticated URL that embeds a live stream of the browser session. The URL can be accessed in any modern web browser.

Whenever you create a new session or get the details of an existing session, Hyperbrowser returns a liveUrl field with a unique URL tied to that specific session. The URL remains valid as long as the session is active and the token in the URL hasn't expired (Securing Live View).

const session = await hbClient.sessions.create();
const liveUrl = session.liveUrl;

The returned liveUrl will look something like:

https://app.hyperbrowser.ai/live?token=<TOKEN>&keepAlive=true

You can now open this URL in a web browser to view the live session.

Embedding Live View

You can embed a Live View into your own web application using an iframe:

<iframe src="<LIVE_URL>"></iframe>

This is useful for providing a seamless experience to your end-users. For example, you could use an embedded Live View to:

  • Show the progress of a web scraping job

  • Allow users to complete a complex workflow that requires manual intervention

  • Provide a preview of an automated process before committing it

Securing Live View

Live View URLs are secured with authentication and encryption. Only users with the correct URL can access the Live View.

However, anyone with the URL can view (and potentially interact with) the session. Be sure to protect Live View URLs as sensitive secrets, especially if you're embedding them in a public web page.

The token in the liveUrl will expire after 12 hours. In this case, you can simply call the GET request for the Sessions API to get the details for the given session id which will also return a new liveUrl with a refreshed token.

Last updated