capnmidnight/Primrose

chat room example

Closed this issue · 7 comments

javl commented

This isn't an issue with Primrose itself, so feel free to close it as being off-topic, but I was wondering if the chatroom example that is on the website is available somewhere, as it's not in the repo.

It's been a while since I've touched that code, so it runs on an old version of Primrose, but I might be able to get it updated pretty quickly. Let me take a little bit to "pick the towels up off the floor", so to speak, and I'll send you the link.

javl commented

That would be great, thanks.
Even the old version would be great, just getting a peek at the modules used would already save me a lot of time.

This is it: https://github.com/capnmidnight/Plume

While things aren't majorly different in the latest version, I think the differences are significant. Getting a new Primrose project setup is significantly easier than what is done here.

As for your purpose to check out the modules, I actually don't have the package.json setup correctly. For some reason, I have Primrose as a devDependency here, which is silly.

javl commented

Thanks. That does seem quite complex for what it is doing ;) I'm not that great at Node (yet) as I've only used it for simpler tasks up to now, so I might actually just combine a Primrose example with EasyRTC for the audio.

I cleaned up the chat room quite a bit. Unfortunately, I think I also broke the server configuration. And now I need to leave to go for a weekend of camping, but the code should be a little easier to follow now.

javl commented

Thanks again.
Turns out ios does not support webRTC so using it for the audio is a no-go (which is too bad because easyRTC lets you set up the audio (or even video) part in a really simple way.

I'll check the code again. Have fun camping!

oh, yeah, Apple hates the open web. Sorry, just so used to them breaking the web like they think they're Microsoft or somethimg that I don't think to warn anyone anymore.

So one thing you're going to find with easyRTC is that the publically available STUN servers are crap and there aren't any public TURN servers. If you want anything WebRTC to be reliable, you're going to have to buy time with a dedicatied STUN/TURN service.

That's why I have TokBox here. They're probably the only decent such service available. But TokBox doesn't provide a way to just use their STUN/TURN. So this code I have here lets OpenTok manage the whole pairing process, and then I just hijack the audio streams.