Tools like Google Docs include real-time collaboration features that allow multiple users to work on the same document simultaneously. There are also tools for sharing screen, like join.me or Chrome Remote Desktop for example.
But let's look at the code mentioned in the title of this article. You can easily add chat and other real-time collaboration features to the webσελίδα your with the library TogetherJS.
Site Chat is real time
TogetherJS is a project of his Mozilla which will add such collaboration features to the website, with almost no coding required. Once enabled, visitors to your website will be able to interact with each other on your website in real time.
You'll be able to see the other's cursor (like in Google Docs), highlight clicks, and screen content remain synced. Visitors to the site will also be able to chat with text and audio (using WebRTC) with any other visitor currently in your website. All this and more with just one line of code.
Add TogetherJS to your website
To get started, all you have to do is place a JavaScript bar anywhere on your site. There are several configuration parameters available in the widget, but we will use the default settings to make it easy for you.
The above code will add a small widget to your website that will display with its own window to all your visitors. They can click the widget's "+" button to create a unique TogetherJS URL. Anyone who clicks on this URL will be able to interact with each other on your page in real time. It's very simple
Add TogetherJS to any Website
There is something else. You can add TogetherJS features to any web site with the help of a bookmark.
This bookmarklet will load the TogetherJS library on the current web page and you can give your chat a unique name. If someone else runs the bookmarklet on the same page from theirs computer, and type the same session name you will be connected directly.
You can browse together, watch the activities of the other, or chat at the top of the page.