# Collaboration Server Updated

**URL:** <https://forum.techsoft3d.com/t/collaboration-server-updated/1514>\
**Category:** HOOPS Visualize Web\
**Tags:** code, webviewer\
**Created:** [January 29, 2023, 1:10pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514 "2023-01-29T13:10:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![guido](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/guido/32/115_2.png) [@guido](https://forum.techsoft3d.com/u/guido)\
**Post date:** [January 29, 2023, 1:10pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/1 "2023-01-29T13:10:18Z")

</div>

![camcollab](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/1X/9e9b8958eed2eda3dbaf199a4a360790d804ce25.gif)

A few months ago, we have released a [node library](https://forum.techsoft3d.com/t/add-collaboration-to-any-hoops-communicator-based-application/1085) to easily add real-time collaboration to any HOOPS Communicator based application. Since then quite a few new features have been added to the Collaboration server:

- A new plugin architecture that makes it easier to extend the functionality of the library
- Support for Persistent Room Data
- More robust support for geometry creation
- Ability to disable syncing for cameras and selection
- Two plugins for displaying user-avatars (see above GIF) and support for the new [textbox class](https://forum.techsoft3d.com/t/new-textbox-markup-released/1276).

You can download the library and learn more here:

> **[GitHub - techsoft3d/ts3d-hc-collabServer](https://github.com/techsoft3d/ts3d-hc-collabServer)**
>
> Contribute to techsoft3d/ts3d-hc-collabServer development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [December 30, 2024, 9:15am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/2 "2024-12-30T09:15:50Z")

</div>

I am unable to open the demo url in the readme file. Is there a video or other way to view it live demo of the this library?

After I run it, the following interface appears. How can I operate it to achieve collaboration?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/9/9184d1f648da1aeedacdc89a7a68821c268996f9.png)

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [December 30, 2024, 12:08pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/3 "2024-12-30T12:08:24Z")

</div>

Hello @619944680,

The collaborator demo is effectively a screen mirroring application so you will need two screens (or two browser tabs) viewing the same model. You can also check out the [Collaborator Demo](https://labs.techsoft3d.com/project/collaborator-demo) as part of our cloud demo suite.

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [December 30, 2024, 2:02pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/4 "2024-12-30T14:02:19Z")

</div>

Hello,Tino.

I want to download the code package from the GitHub connection in [Collaborator Demo](https://labs.techsoft3d.com/project/collaborator-demo/), but GitHub has been unable to open it. Excuse me, is the link invalid? It is also possible that I am unable to access foreign websites. If the link has not expired, please let me know.

Thanks.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [December 30, 2024, 2:40pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/5 "2024-12-30T14:40:14Z")

</div>

Are you getting an error when you click on _Download ZIP_ in the GitHub repo:

> **[GitHub - techsoft3d/Collaborator](https://github.com/techsoft3d/Collaborator)**
>
> Contribute to techsoft3d/Collaborator development by creating an account on GitHub.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/2/2e49edd2ccc5260bbd91cdd66c1c47af5dca8559.png)

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [December 31, 2024, 12:57am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/6 "2024-12-31T00:57:15Z")

</div>

Yes, it may be that my network here cannot access GitHub. I asked my colleague to help me download it.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [December 31, 2024, 7:28am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/7 "2024-12-31T07:28:44Z")

</div>

Hi,Tino,

I followed the steps in the compressed readme file and finally executed ‘npm’. The error is as follows:

 ![0abcf91fc244bf553a455e13cbc9c86](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/5/5d9eb4ded11068158d31d20cefe8bbbb06fc041e.png)

I will follow the prompts to install Express again,but it still reports an error,  
The error message after installing Express is as follows:

 ![921162a67723e92d32824b60f1234e5](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/d/ddecb696610190747d628ae33ae5c98af5a698f1.png)

Is there anything else I need to configure to run this code package?

Thanks.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [December 31, 2024, 12:33pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/8 "2024-12-31T12:33:37Z")

</div>

The version _techsoft3d/Collaborator_ is an older version and has largely been superseded by _techsoft3d/ts3d-hc-collabServer_. Besides the core mirroring feature, the latter version includes camera synchronization and basic chat functionality — in addition to a more robust and familiar model browser.

It looks like based on your screenshot, you were able to get _ts3d-hc-collabServer_ up and running. Is this not the case?

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 2, 2025, 1:00am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/9 "2025-01-02T01:00:53Z")

</div>

> [@tino](#):
>
> ts3d-hc-collabServer

At first, I was running ts3d hc collabServer.  
Later, when I saw the GitHub link in [Collaborator Demo](https://labs.techsoft3d.com/project/collaborator-demo/), I thought techsoft3d/Collaborator was the latest.Then I can run normally.

Thanks.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 3, 2025, 2:45am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/10 "2025-01-03T02:45:42Z")

</div>

Hello, Tino.

I want to set a user as the owner of a room, and the room owner can set which users to collaborate with. Can it be achieved?

Thanks.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [January 3, 2025, 12:00pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/11 "2025-01-03T12:00:10Z")

</div>

Yes, this should be possible. The collaboration demo is using a 3rd party application called [Socket.IO](https://socket.io/) for the communicaton features of the room. You will have to do the necessary research to implement the desired functionalities.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 11, 2025, 3:03am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/12 "2025-01-11T03:03:44Z")

</div>

I am trying to use the collaboration library and SocketIo has successfully connected,  
and the following code has been added,

`hcCollab.initialize(hwv, null, 'http://192.270.1.25:5655/') hcCollab.registerMessageReceivedCallback(hcCollabMessageReceived) hcCollab.connect('default', 'User' + Math.floor(Math.random() * 9999))`

there are no errors reported,  
But the two scenes are not synchronized.  
What could be the possible reason？

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [January 11, 2025, 2:56pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/13 "2025-01-11T14:56:08Z")

</div>

@619944680,

When viewing the model, are you able to see the users:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/e/e2c6fc2a12bd209061495d3ebd71ec31c2fec811.png)

If not, the URL may not be correct. On that note, the octet `270` seems to be out of range as I believe in an IPv4 address, the values are range-bound to 0 to 255.

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 13, 2025, 12:59am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/14 "2025-01-13T00:59:52Z")

</div>

Yes,I can see the users,users can also send messages to each other.  
It’s just that the model scene cannot be mirrored.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [January 13, 2025, 1:11am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/15 "2025-01-13T01:11:43Z")

</div>

If there have been no other changes to the code, I would expect mirroring to work given that different users are being displayed in the viewer.

One follow-up question is regarding the IPv4 address you provided ([http://192.270.1.25:5655](http://192.270.1.25:5655)). Is this correct? The octet `270` is beyond the range of 0 to 255.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 13, 2025, 3:10am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/16 "2025-01-13T03:10:30Z")

</div>

> [@tino](#):
>
> IPv4 address

The IPv4 address was randomly written by me in the post, and in my code, it is the address where I run the SoketIo service.This demo is actually running locally on my computer.

I recorded a short video in the compressed file, and in the video, I can see the users. Users can send and receive messages, but the model scene cannot be mirrored, and the browser console does not report any errors. May I ask which part of the code the mirroring depends on for execution? I would like to check if I have made any changes to the code that executes the mirroring .  
[20250113\_110707.zip](https://forum.techsoft3d.com/uploads/short-url/AnRFD9xnmdMeGbwVwVZJ8YxR817.zip) (566.3 KB)

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [January 13, 2025, 3:26am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/17 "2025-01-13T03:26:47Z")

</div>

Please see the function `handleMessage(message)` in hcCollab.js. Also, please review the notes/README section of the [GitHub post](https://github.com/techsoft3d/ts3d-hc-collabServer) for additional context that may be relevant to your application.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 14, 2025, 9:17am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/18 "2025-01-14T09:17:34Z")

</div>

> [@tino](#):
>
> handleMessage

I found that the if judgment in the function `handleMessage(message)` method keeps returning.

 ![1736845789308](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/b/b64b0a3a135f1e19b7641b9d542f9c0138c641cf.png)

Causing the code of the subsequent to fail to execute.Here is the code I used to establish a connection with the collaboration server.

 ![1736846023749](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/f/fa3827e499503c7bd7fab37744abaa5e6c5745c3.png)  
Is the function `hcCollabmessageReceived` written incorrectly?

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [January 14, 2025, 1:08pm UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/19 "2025-01-14T13:08:11Z")

</div>

Given that you’ve identified that the `if` statement is returning early, perhaps take a look at this function for clues:

```auto
async function processCallbacks(message,send =false) {
    for (let i=0; i<messageReceivedCallbacks.length; i++) {
        let callback = messageReceivedCallbacks[i];
       if (!await callback(message,send)) {
            return false;
        }
    }
    return true;
}

```

Also, the function `hcCollabMessageReceived` looks markedly different than the original so that could be having an effect. It’s curious that in your implementation, `case "initialState":` is empty.

On that note, if your objective is to fully customize the hcCollab project, we recommend the approach of starting with the base hcCollab project and then start introducing changes more gradually. This will make it easier to debug — moreso than sharing screenshots of code snippets.

---

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [January 15, 2025, 5:58am UTC](https://forum.techsoft3d.com/t/collaboration-server-updated/1514/20 "2025-01-15T05:58:45Z")

</div>

Okay, maybe I overlooked some code during the process of customizing the hcCollab project. I will try as you suggested.  
Thanks,Tino. 😉
