Javascript
Move past screen sharing and add a new dimension of Interactivity in your web apps with Sariska’s multi-user SDK for a collaborative world
With our SDK, you can create a co-browsing experience for any web page with a 95% smaller payload than screen sharing, allowing for multiple cursors. Co-browsing annotates both parties' cursors as you navigate the website together with your team.
Note: Please checkout Setup Section to get our chrome extension.
Generate API Key
In order to get started with using the Co-Browsing SDK, you will need your API key which you generated in console.sariska.io. For more details, follow this link.
Integration
In order to integrate Sariska's Co-Browsing SDK into your website, you can either import the SDK from the npm registry or get the bundled file from our CDN. Both methods are described below.
NPM:
If you are facing dependency conflict related issues, add --legacy-peer-deps as follows: $ npm i sariska-cobrowsing --legacy-peer-deps
CDN:
You could also install the Sariska Co-Browsing library by adding the following script to your website's HTML head tag. Now you can access Co-Browsing API through the CoBrowse global object. This enables you to use the SDK from the browser. The script needs to be added at the bottom of your index.html file in order to work.
Import SDK
To import the SDK, add the following command to your code.
Pass your API key or JWT Token through Window Object:
To initiate co-browsing, you need to provide either your API Key or JWT Token. Please provide different JWT tokens as Sariska utilizes JWT ID tokens for user authentication and verification.
Start CoBrowsing
In order to start co-browsing, call its startCoBrowsing method as shown below. Following parameters can be passed.
Please ensure that the sessionName or roomName consists of alphanumeric characters without using hyphens."
Stop CoBrowsing
In order to stop co-browsing, call its stopCoBrowsing method as shown below.
Using the SDK from your Browser
In order to quickly test the SDK on your website, you can add the bundle file into your html head tab from our CDN. Once your website is running on a local or remote server, you can do the following to start co-browsing.
Open the console on your browser and write the following command
"user1" is the name of the first user and "room" is the room name for them to co-browse together. You'd see the following response in your console.
On a second tab or window, do the same operation again, for a second user.
"user2" is the name of the first user and "room" is the room name for them to co-browse together. You'd see the following response in your console.
Once both sessions are connected, you'd be able to see both mouse pointers on your webpage as shown.
Refer to sample apps
With CDN: https://github.com/SariskaIO/sariska-co-browsing-sample-app-with-cdn
With NPM: https://github.com/SariskaIO/sariska-co-browsing-sample-app-with-npm
Hosted Demo: https://cobrowse.sariska.io/
Last updated