Listening to speckle stream and loading all objects with Javascript

Hi there! I am trying to create a web-app that allows visitors to edit speckle objects. I am quite early in the project and am currently stuck at making my local browser listen to updates from a stream. I tried to load the URL of the stream but it gives an error as it is not the proper format for loading an object url. May I know if there is a way to automatically listen to updates and load all the objects from a Speckle stream?

1 Like

Hey @Biffly

It sounds like a few things are in play here.

Event observability
In terms of stream activity responsiveness, there are a couple of options. How closely is your web app following the Speckle-Server frontend packages?

A good starting point can be to look at the Viewer Sandbox project to get a handle on what interactions you can build on. Beyond that, the codes for our own viewer/frontend are available.

If you’ve experimented with the speckle.xyz at all, you’ll see there is an observer event triggered by new commits to a Stream.

Depending on what you want to build as a stack, an alternative is to harness the Webhook events. Still, these would likely notify any backend to your web app needing you to work out how that interaction communicated to the front end.

Stream Loading error
Can you say more about the object loading errors you are seeing? Which viewer method are you using that is failing with which URLs? It could be an incorrect URL format, a non-public stream that requires an auth token, etc.


Speckle object generation sounds very interesting. Care to share any more on what your objectives/needs are?

1 Like