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: https://arunoda.github.io/meteor-streams/
Even if it hasn’t been maintained, as with most Meteor.js stuff, it should work without any (or with very few) modifications.
Wouldn’t that require knowing the ID to connect to (e.g. like with this https://peerjs.com/)? 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
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.