11-19-2014 01:41 AM
Hi
Just getting going using Jabber in a web browser with MUCs, am working through the demo app (very good).
Problem I have at present is how to smoothly 'resume' if the user hits F5 on their browser.
The user will be in a room when they may hit F5, all I want to do is 'reconnect' to that room.
However - using the demo app it complains when you try to enter the room, complaining of a conflict.
I'm guessing the conflict is that an active nickname already exists in the room to which the user is trying to reconnect.
Any ideas?
Regards,
Mark.
11-19-2014 07:06 PM
I'm facing this issue before eithor.
The situation is not exactly same.
When my app refresh the browser, 'client', 'entity', 'entitySet', etc objects are reset.
Run your service in the background would be OK.
Try Node.js?
I wanna Jabber Web SDK works under Node.js. I know cwic.js is highly rely on the browser addons.
So it would be a client, not a server. A client built by Node.js.
But the JS libs (cwic.js and jabberwerx.js) are not up to the 'CommonJS' standard.
So Node.js? Get real.
For example, although 'jQuery' is rarely used under Node.js.
But Can you consider 'jQuery' MUST run on the client as it's just a DOM selector?
I wish cisco team value this.
Thanks Jeff
11-20-2014 12:58 AM
Thanks - that's a good idea - put it server side.
It was certainly the nickname that was the issue, and I'm not sure what the correct approach would be (if there is indeed one).
I worked around the issue though, I found I could tag on a unique number to the nickname each time, and prettify them later at render time (I use the current time in MS).
Each time you refresh you get a new presence in the room though, however not a big deal because the system seems to kill off the old ones pretty quick when not connected (that's good!).
So for example I might sign in with nick_58934789572
This guarantees me the means to circumvent the nickname conflict.
I can revert the nickname back to what it is supposed to be in code.
I can even eliminate duplicates of nicknames when displaying occupants.
Not brilliant but it works and I have no better solution at this present time.
Still open to ideas!
Mark.
11-20-2014 01:53 AM
Hi Mark,
For the MUC, hope the link below helped.
Run the code in the server side/background wouldn't work.
I'v been working on it for more than 1 weeks and nothing came of the ideas...
Thanks
Jeff
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide