Tools like Google Docs περιλαμβάνουν δυνατότητες συνεργασίας σε πραγματικό χρόνο που επιτρέπουν σε πολλούς χρήστες να εργάζονται πάνω στο ίδιο έγγραφο ταυτόχρονα. Υπάρχουν και εργαλεία για κοινή χρήση οθόνης, όπως το join.me ή το Chrome Remote Desktop για παράδειγμα.
But let's look at the code we mention in the title of this article. You can easily add chat and other real-time collaboration opportunities to your library website TogetherJS.
Chat Website in real time
TogetherJS is a Mozilla project that will add such collaboration capabilities to the web, almost without any codification. 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.
Ο παραπάνω κώδικας θα προσθέσει μια μικρή widget στην ιστοσελίδα σας που θα εμφανίζεται με ένα δικό του παράθυρο σε όλους τους επισκέπτες σας. Μπορούν να κάνουν κλικ στο κουμπί "+" του widget για να δημιουργήσουν ένα μοναδικό ΤogetherJS URL. Όποιος κάνει κλικ σε αυτό το URL θα είναι σε θέση να αλληλεπιδράσουν μεταξύ τους στη σελίδα σας σε πραγματικό χρόνο. Είναι πάρα πολύ απλό
Add TogetherJS to any Website
There is one more thing. You can add TogetherJS characteristics to any web page on the internet 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.