Overview
Among other things, the Hyperbeam client-side JavaScript SDK allows you to:
- Connect to a virtual browser
- Control the virtual browser navigation programmatically
- Query the virtual browser state and listen to events
- Manage user control permissions
- Resize the browser
- Set local virtual browser volume
The library is published on npm as @hyperbeam/web.
Installation
Using npm:
Using UNPKG:
SDK Reference
Initializing the SDK
Create an instance of the HyperbeamClient object.
The HyperbeamClient Object
Control the virtual browser, manage user permissions, and debug connection issues.
Examples
Loading a virtual browser
How to create an instance of the HyperbeamClient object.
Destroying the embed
How to tear down network connections and browser events.
Setting video volume
How to set the local volume for the virtual browser.
Getting user ID
How to get the client’s user ID.
Pausing video stream
How to pause/resume the local virtual browser video stream.
Setting admin token
How to set the client’s admin token.
Setting permissions
How to set user permissions based on a user’s ID.
Manual reconnection
How to manually reconnect.
Resizing the browser
How to resize the virtual browser to a specific width and height.
Send events programmatically
How to send keyboard, mouse, and wheel events to the virtual browser.
Tighter control over keyboard events
How to customize keyboard events sent the virtual browser.
Control tabs programmatically
How to use Hyperbeam’s tab API.
Listen to tab events
How to listen to tab events.
Optimize server location
How to create a session with the optimal server location.