Multiuser, show other user's mouse pointers in realtime (not logged in, on the same page)

Hey Forum,

I had a quick fun idea for a sketch, I am giving an online presentation but want to show the presence of other people while I am doing the presentation.

I found the following packages

which allow you to show the amount of users. is there a way to share realtime data in memory without writing to Mongo?

I know there might be a better solution like simple socks js but I would love to demo it in meteor.

I would love to show each user’s mouse pointer and for example fire a random emoticon when they click on the page.

We did something similar a while back, sending data from a browser extension to everyone who was using a Meteor app, without being logged in. Back then, we used this:

Even if it hasn’t been maintained, as with most Meteor.js stuff, it should work without any (or with very few) modifications.

1 Like

why even go through the server? I would look into WebRTC to pass messages right between the involved browsers

Wouldn’t that require knowing the ID to connect to (e.g. like with this On the other hand Meteor Streams would simply broadcast to the entire audience.

I’m not that familiar with WebRTC, but I would expect a one-to-many WebRTC broadcast to require some form of media server.

Meteor could be used to share the ID between the clients, I guess? And as far as I understand WebRTC supports many-to-many.

All of this is highly theoretical and I have not implemented this anywhere, I was just wondering out loud if the latency incurred with a round-trip through the server might not be the right approach to share mouse pointers in real time

@illustreets @jamgold thanks for the suggestions and links. I’ll check streams, seems interesting either way (damn 2013 is it that long ago ;-))

I agree, latency would become an issue if it goes via server. It sounds like it could be a candidate for WebRTC, particularly if security is not a big issue and all that is needed is disseminating IDs to participants. Interesting to hear about the outcome if @thomastraum gets to implement it.

Yeah, the solutions discussed in this thread are relevant here as well

Though for even lower latency, WebRTC is king. I found it a pain in the arse to set up and use, so went with broadcasting messages over the existing websocket.

@coagmano thanks lots of cool info in there. I’ll report back once I have some more code

1 Like

posting this here as an archive. I made a super simple demo using meteor streams (which still works)


This is very interesting. Unfortunately I can not find the source for highland:meteor-streams, do you have a link for that?

I revisited this for a new app I was making and created a new version of this idea which seems to work now.