@remotehq/remote-browser-sdk
The official JavaScript/TypeScript client SDK for embedding and controlling Remote Browser by RemoteHQ.
Installation
npm install --save @remotehq/remote-browser-sdk
yarn add @remotehq/remote-browser-sdk
Usage example
import * as remoteBrowserSdk from "@remotehq/remote-browser-sdk";
const instanceURN = "...";
const rbClient = remoteBrowserSdk.createClient({
instanceURN,
iframeSource: "rhq",
role: "...",
userName: "Jon",
allowFullscreen: true,
disableAudio: false,
logoUrl: "...",
targetOrigin: "https://rooms.remotehq.com",
barLocation: "top-right"
});
rbClient.attach("#remote-browser-container");
rbClient.openInCurrentTab("https://weather.com");
rbClient.openInNewTab("https://weather.com");
function onError (error) { ... }
this.rbClient.on('openInCurrentTab:error', onError);
this.rbClient.off('openInCurrentTab:error', onError);
rbClient.destroy();
Documentation
For full documentation, visit the official RemoteHQ documentation.