EzDevInfo.com

candy

JavaScript-based multi-user chat client for XMPP. Candy — a JavaScript-based multi-user chat client candy is a simple but powerful multi-user chat client for xmpp (jabber) that's built for your community.

Map like Candy Crush using Cocos2d-x + Marmalade

I have developed a 2D game using Cocos2d-x and Marmalade.

I would like to know what would it be the "better solution", considering performances, memory etc, to create a Scene before playing the game where I can show to the user a Map like that one used in Candy Crush Game, then:

  • zooamble
  • scrollable
  • clickable buttons (levels) at predefined coords etc
  • character moving between buttons (level)

Many thanks in advance

Sergio


Source: (StackOverflow)

Modify css without HTML [closed]

I'm working on a chat application called Candy, based on jQuery/Strophe/mustache. Now I want to modify the CSS-file, but the problem is: How can I do that? I have no HTML-code to see how the CSS-tags are used.

/**
 * Chat CSS
 *
 * @author Michael <michael.weibel@gmail.com>
 * @author Patrick <patrick.stadler@gmail.com>
 * @copyright 2011 Amiado Group AG, All rights reserved.
 */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

#candy {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: #ccc;
    color: #333;
    overflow: hidden;
}

a {
    color: #333;
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#chat-tabs {
    list-style: none;
    margin: 0 200px 0 0;
    padding: 0;
    overflow: auto;
    overflow-y: hidden;
}



#chat-tabs li {
    margin: 0;
    float: left;
    position: relative;
    border-right: 1px solid #aaa;
    white-space: nowrap;
}

#chat-tabs li a {
    background-color: #ddd;
    padding: 6px 50px 4px 10px;
    display: inline-block;
    color: #666;
    height: 20px;
}

#chat-tabs li.active a {
    background-color: white;
    color: black;
}

#chat-tabs li a.transition {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0;
    width: 0px;
    height: 0px;
    background: url(img/tab-transitions.png) repeat-y left;
}

#chat-tabs li a.close {
    background-color: transparent;
    position: absolute;
    top: 0;
    right: 0;
    height: auto;
    padding: 5px;
    margin: 1px 5px 0 2px;
    color: #999;
}

#chat-tabs li.active a.transition {
    color: gray;
    background: url(img/tab-transitions.png) repeat-y -50px;
}

#chat-tabs li a.close:hover, #chat-tabs li.active a.close:hover {
    color: black;
}

#chat-tabs li .unread {
    color: white;
    background-color: #9b1414;
    padding: 2px 4px;
    font-weight: bold;
    font-size: 10px;
    position: absolute;
    top: 6px;
    right: 22px;
    border-radius: 3px;
}

#chat-tabs li.offline a.label {
    text-decoration: line-through;
}

#chat-toolbar {
    position: fixed;
    bottom: 0;
    right: 0;
    font-size: 11px;
    color: #666;
    width: 200px;
    height: 24px;
    padding-top: 7px;
    border-top: 1px solid #aaa;
    background-color: #d9d9d9;
    display: none;
}

#chat-toolbar li {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    float: left;
    display: inline-block;
    cursor: pointer;
    background-position: top left;
    background-repeat: no-repeat;
}

#chat-toolbar #emoticons-icon {
    background-image: url(img/action/emoticons.png);
}

#chat-toolbar .context {
    background-image: url(img/action/settings.png);
    display: none;
}

.role-moderator #chat-toolbar .context, .affiliation-owner #chat-toolbar .context {
    display: inline-block;
}

#chat-sound-control {
    background-image: url(img/action/sound-off.png);
}

#chat-sound-control.checked {
    background-image: url(img/action/sound-on.png);
}

#chat-autoscroll-control {
    background-image: url(img/action/autoscroll-off.png);
}

#chat-autoscroll-control.checked {
    background-image: url(img/action/autoscroll-on.png);
}

#chat-statusmessage-control {
    background: url(img/action/statusmessage-off.png);
}

#chat-statusmessage-control.checked {
    background: url(img/action/statusmessage-on.png);
}

#chat-toolbar .usercount {
    background-image: url(img/action/usercount.png);
    cursor: default;
    padding-left: 20px;
    width: auto;
    margin-right: 5px;
    float: right;
}

.usercount span {
    display: inline-block;
    padding: 1px 3px;
    background-color: #ccc;
    font-weight: bold;
    border-radius: 3px;
}

.room-pane {
    display: none;
}

.roster-pane {
    position: absolute;
    overflow: auto;
    top: 0;
    right: 0;
    bottom: 0;
    width: 200px;
    margin: 30px 0 32px 0;
}

.roster-pane .user {
    cursor: pointer;
    padding: 4px 7px;
    font-size: 12px;
    margin: 0 4px 2px 4px;
    opacity: 0;
    display: none;
    color: #666;
    clear: both;
    height: 15px;
    background-color: #ddd;
}

.roster-pane .user:hover {
    background-color: #eee;
}

.roster-pane .user.status-ignored {
    cursor: default;
}

.roster-pane .user.me {
    font-weight: bold;
    cursor: default;
}

.roster-pane .user.me:hover {
    background-color: #ddd;
}

.roster-pane .label {
    float: left;
    width: 110px;
    overflow: hidden;
    white-space: nowrap;
}

.roster-pane li {
    width: 16px;
    height: 16px;
    float: right;
    display: block;
    margin-left: 3px;
    background-repeat: no-repeat;
    background-position: center;
}

.roster-pane li.role {
    cursor: default;
    display: none;
}

.roster-pane li.role-moderator {
    background-image: url(img/roster/role-moderator.png);
    display: block;
}

.roster-pane li.affiliation-owner {
    background-image: url(img/roster/affiliation-owner.png);
    display: block;
}

.roster-pane li.ignore {
    background-image: url(img/roster/ignore.png);
    display: none;
}

.roster-pane .status-ignored li.ignore {
    display: block;
}

.roster-pane .me li.context {
    display: none;
}

.roster-pane li.context {
    background-image: url(img/action/menu.png);
    cursor: pointer;
}

.roster-pane li.context:hover {
    background-color: #ccc;
    border-radius: 4px;
}

.message-pane-wrapper {
    clear: both;
    overflow: auto;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
    width: auto;
    margin: 30px 200px 32px 0;
    background-color: white;
    font-size: 13px;
}

.message-pane {
    margin: 0;
    padding: 5px 10px 2px 10px;
}

.message-pane dt {
    width: 55px;
    float: left;
    color: #888;
    font-size: 10px;
    text-align: right;
    padding-top: 4px;
}

.message-pane dd {
    overflow: auto;
    padding: 2px 0 1px 130px;
    margin: 0 0 2px 0;
    white-space: -o-pre-wrap; /* Opera */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
}

.message-pane dd .label {
    font-weight: bold;
    white-space: nowrap;
    display: block;
    margin-left: -125px;
    width: 120px;
    float: left;
    overflow: hidden;
}

.message-pane .subject {
    color: #a00;
    font-weight: bold;
}

.message-pane .adminmessage {
    color: #a00;
    font-weight: bold;
}

.message-pane .infomessage {
    color: #888;
    font-style: italic;
    padding-left: 5px;
}

.message-pane .emoticon {
    vertical-align: text-bottom;
    height: 15px;
    width: 15px;
}

.message-form-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    margin-right: 200px;
    border-top: 1px solid #ccc;
    background-color: #f2f2f2;
    height: 31px;
}

.message-form {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-right: 320px;
    padding: 0;
}

.message-form input {
    border: 0 none;
    padding: 5px 10px;
    font-size: 14px;
    width: 100%;
    display: block;
    outline-width: 0;
    background-color: #f2f2f2;
}

.message-form input.submit {
    cursor: pointer;
    background-color: #ccc;
    color: #666;
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 3px 203px 3px 3px;
    padding: 5px 7px;
    width: auto;
    font-size: 12px;
    line-height: 12px;
    height: 25px;
    font-weight: bold;
    border-radius: 10px;
}

#tooltip {
    position: absolute;
    z-index: 10;
    display: none;
    margin: 18px -18px 2px -2px;
    color: white;
    font-size: 11px;
    padding: 5px 0;
    background: url(img/tooltip-arrows.gif) no-repeat left bottom;
}

#tooltip div {
    background-color: black;
    padding: 2px 5px;
    zoom: 1;
}

#context-menu {
    position: absolute;
    z-index: 10;
    display: none;
    padding: 15px 10px;
    margin: 8px -28px -8px -12px;
    background: url(img/context-arrows.gif) no-repeat left bottom;
}

#context-menu ul {
    background-color: black;
    color: white;
    font-size: 12px;
    padding: 2px;
    zoom: 1;
}

#context-menu li {
    padding: 3px 5px 3px 20px;
    line-height: 12px;
    cursor: pointer;
    margin-bottom: 2px;
    background: 1px no-repeat;
    white-space: nowrap;
}

#context-menu li:hover {
    background-color: #666;
}

#context-menu li:last-child {
    margin-bottom: 0;
}

#context-menu .private {
    background-image: url(img/action/private.png);
}

#context-menu .ignore {
    background-image: url(img/action/ignore.png);
}

#context-menu .unignore {
    background-image: url(img/action/unignore.png);
}

#context-menu .kick {
    background-image: url(img/action/kick.png);
}

#context-menu .ban {
    background-image: url(img/action/ban.png);
}

#context-menu .subject {
    background-image: url(img/action/subject.png);
}

#context-menu .emoticons {
    padding-left: 5px;
    width: 85px;
    white-space: normal;
}

#context-menu .emoticons:hover {
    background-color: transparent;
}

#context-menu .emoticons img {
    cursor: pointer;
    margin: 3px;
    height: 15px;
    width: 15px;
}

#chat-modal {
    background: url(img/modal-bg.png);
    width: 300px;
    padding: 20px 5px;
    color: white;
    font-size: 16px;
    position: fixed;
    left: 50%;
    top: 50%;
    margin-left: -155px;
    margin-top: -45px;
    text-align: center;
    display: none;
    z-index: 100;
    border-radius: 5px;
}

#chat-modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background-image: url(img/overlay.png);
}

#chat-modal.modal-login {
    display: block;
    margin-top: -100px;
}

#chat-modal-spinner {
    display: none;
    margin-left: 15px;
}

#chat-modal form {
    margin: 15px 0;
}

#chat-modal label, #chat-modal input, #chat-modal select {
    display: block;
    float: left;
    line-height: 26px;
    font-size: 16px;
    margin: 5px 0;
}

#chat-modal input, #chat-modal select {
    padding: 2px;
    line-height: 16px;
    width: 150px;
}

#chat-modal label {
     text-align: right;
     padding-right: 1em;
     clear: both;
     width: 100px;
}

#chat-modal input.button {
    float: none;
    display: block;
    margin: 5px auto;
    clear: both;
    position: relative;
    top: 10px;
    width: 200px;
}

#chat-modal .close {
    position: absolute;
    right: 0;
    display: none;
    padding: 0 5px;
    margin: -17px 3px 0 0;
    color: white;
    border-radius: 3px;
}

#chat-modal .close:hover {
    background-color: #333;
}

Here's the HTML-code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Chat</title>
    <link rel="shortcut icon" rel='nofollow' href="../res/img/favicon.png" type="image/gif" />
    <link rel="stylesheet" type="text/css" rel='nofollow' href="../res/default.css" />


    <script type="text/javascript" src="libs/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="libs/libs.min.js"></script>
    <script type="text/javascript" src="candy.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            Candy.init('https://123.123.123.123/http-bind/', {
                core: { debug: false, autojoin: ['test@conference.mydomain.com']  },
                view: { resources: '../res/' }
            });

            Candy.Core.connect('example@mydommain.com','123');
        });
    </script>
</head>
<body>
    <div id="candy"></div>
</body>
</html>

Source: (StackOverflow)

Advertisements

zebra/candy/loading bar stripes help

I am building my portfolio but I can`t remember in what coding language I could build such ,vertical or horizontal, animated candy stripes loading bars to showcase my skills. What can I use to build such things?


Source: (StackOverflow)

Where is candy.war?

In the integration of Candy with Openfire it is mentioned to copy candy.war into the <Openfire_root>/plugins directory. I cannot find where this war is.

Can you please tell me where it is?


Source: (StackOverflow)

Asterisk ( with FreePBX ) & Openfire Phone Mappings Configuration

I have some problem understanding the parameter matching between FreePBX configuration and Openfire's ( through the SIP plugin ):

Every server's component is on the same server ( vm.com ), I insert my settings ( 2nd screen ), then the server is still identified as unregistered ( 1st screen )

In the 4th screen there are FreePBX's configurations before I clicked "Apply Config"

If I click the button "test" in the 2nd screen, it remains in a infinite loop state.. And I can't get any confirm from it.

Any advice? Sorry for my english, thanks in advice.

Openfire Openfire

Openfire

FreePBX


Source: (StackOverflow)

Candy chat installation failed

I have installed open fire server and http://domain.com/http-bind is also fine. And strophe is also working fine.Tried to setup using this setup guide: [Candy Setup Guide][1].

I am stucked in Connecting .

Candy Installation Guide[1]: http://candy-chat.github.io/candy/#setup "Candy Setup Guide"

  Strophe is connecting.
  SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind'       to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8'  ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
SENT: <body rid='797907051' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
Strophe is disconnecting.

Above is the display output of strophe, I have changed my domian to example.com

   $(document).ready(function() {
   Candy.init('http://example.com/http-bind/', {
   core: {
   debug: true,
   autojoin: ['example@conference.example.com', 'hrirks@conference.example.com']
   },
   view: { resources: 'res/' }
   });

   Candy.Core.connect();
});

I copied index.html to candy root directory. I got following message in firebug console,Response

  <html>
  <head><title>Openfire HTTP Binding Service</title></head>
  <body><font face="Arial, Helvetica"><b>Openfire <a rel='nofollow' href="http://www.xmpp.org/extensions/xep-0124.html">HTTP Binding</a> Service</b></font></body>
  </html>
 And got this in POST
  <body rid='3334381189' xmlns='http://jabber.org/protocol/httpbind' to='example.com' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

Source: (StackOverflow)

candy/strophe -- using prebind (.attach) results in tight idle loop?

I'm using Candy.js (v1.7.1) and Openfire v3.9.3. Running the sample index.html included in the Candy package, I have no issues using direct authentication (browser prompts for jid/pwd). However, if I change the sample to use Candy.Core.attach (nearly a pass-thru to Strophe.Connection.attach) after performing a server side prebind (uisng MatriX), I seem to get stuck in some sort of idle loop that blasts empty messages to the XMPP server 3x a second.

Any ideas what is causing this looping and why the demo Candy UI doesn't appear when I use Candy.Core.attach?

Modified sample...

$(document).ready(function() {
    var httpbindUrl = 'http://xmpp.mydomain.net:7070/http-bind/';
    var chatRoom = 'testroom@conference.mydomain.net';

    // These values come from a REST call to our services that perform
    // the prebind authentication (using MatriX, obviously)
    var jid = 'someuser@mydomain.net/MatriX';
    var sid = 'b95ffa4';  // must be a string despite what candy's doc say
    var rid = 1983626985;

    Candy.init(httpbindUrl, {
        core: {
            debug: true,
            autojoin: [chatRoom]
        },
        view: { assets: './res/' }
    });

    Candy.Core.attach(jid, sid, rid); // this seems to cause some sort of looping to occur
    // Candy.Core.connect('someuser@mydomain.net', 'password'); // <-- this works as expected
    });

The browser's console log displays...

POST http://xmpp.mydomain.net:7070/http-bind/ [HTTP/1.1 200 OK 895ms]
POST http://xmpp.mydomain.net:7070/http-bind/ [HTTP/1.1 200 OK 491ms]
POST http://xmpp.mydomain.net:7070/http-bind/ [HTTP/1.1 200 OK 483ms]
"RECV: <body xmlns='http://jabber.org/protocol/httpbind' ack='1983626985'/>" candy.bundle.js:159
"LIBS:<1>: no requests during idle cycle, sending blank request" libs.bundle.js:1192
"LIBS:<0>: request id 4.0 posting" libs.bundle.js:1192
"LIBS:<0>: request id 4.0 state changed to 1" libs.bundle.js:1192
"SENT: <body rid='1983626986' xmlns='http://jabber.org/protocol/httpbind' sid='b95ffa4'/>" candy.bundle.js:159
POST http://xmpp.mydomain.net:7070/http-bind/ [HTTP/1.1 200 OK 436ms]
"LIBS:<0>: request id 4.1 state changed to 2" libs.bundle.js:1192
"LIBS:<0>: request id 4.1 state changed to 3" libs.bundle.js:1192
"LIBS:<0>: request id 4.1 state changed to 4" libs.bundle.js:1192
"LIBS:<0>: removing request" libs.bundle.js:1192
"LIBS:<0>: _throttledRequestHandler called with 0 requests" libs.bundle.js:1192
"LIBS:<0>: request id 4 should now be removed" libs.bundle.js:1192
"LIBS:<0>: request id 4.1 got 200" libs.bundle.js:1192
"LIBS:<1>: _dataRecv called" libs.bundle.js:1192
"RECV: <body xmlns='http://jabber.org/protocol/httpbind' ack='1983626986'/>" candy.bundle.js:159
"LIBS:<1>: no requests during idle cycle, sending blank request" libs.bundle.js:1192
"LIBS:<0>: request id 5.0 posting" libs.bundle.js:1192
"LIBS:<0>: request id 5.0 state changed to 1" libs.bundle.js:1192
"SENT: <body rid='1983626987' xmlns='http://jabber.org/protocol/httpbind' sid='b95ffa4'/>" candy.bundle.js:159
...continues in a similar pattern until I close the browser window.

NOTE: Entries prepended with "LIBS:" are from strophe's low-level logging (level, msg). It should also be noted that the candy demo wraps strophe.js into a larger bundle called libs.bundle.js.


Source: (StackOverflow)

Candy Chat Openfire issues

I'm a total noob to this, but I've set up Openfire with Punjab and am attempting to get Candy chat to work. Everything looks to be set up correctly and I've verified that the http-bind URL is working. However, when I attempt to log in I always get something like this:

[Connection] Connecting candy.min.js:1
SENT: <body rid='72211172' xmlns='http://jabber.org/protocol/httpbind' to='gmail' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/> candy.min.js:1
RECV: <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='remote-connection-failed'/> candy.min.js:1
[Connection] Failed (2) candy.min.js:1
[Connection] Disconnected 

I looked in the Twisted log for Punjab, and this is what I see.

2014-12-11 20:22:24-0500 [HTTPChannel,0,50.116.34.43] /usr/local/lib/python2.7/dist-packages/punjab/session.py:85: exception
s.UserWarning: Domain argument to XMPPClientConnector should be bytes, not unicode
2014-12-11 20:22:24-0500 [HTTPChannel,0,50.116.34.43] /etc/resolv.conf changed, reparsing
2014-12-11 20:22:24-0500 [HTTPChannel,0,50.116.34.43] Resolver added ('75.127.97.6', 53) to server list
2014-12-11 20:22:24-0500 [HTTPChannel,0,50.116.34.43] Resolver added ('75.127.97.7', 53) to server list
2014-12-11 20:22:24-0500 [HTTPChannel,0,50.116.34.43] DNSDatagramProtocol starting on 19862
2014-12-11 20:22:24-0500 [HTTPChannel,0,50.116.34.43] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x9
9aefec>
2014-12-11 20:22:24-0500 [-] (UDP Port 19862 Closed)
2014-12-11 20:22:24-0500 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x99aefec>
2014-12-11 20:22:27-0500 [-] DNSDatagramProtocol starting on 24342
2014-12-11 20:22:27-0500 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x99b1c8c>
2014-12-11 20:22:27-0500 [-] (UDP Port 24342 Closed)
2014-12-11 20:22:27-0500 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x99b1c8c>
2014-12-11 20:22:36-0500 [-] DNSDatagramProtocol starting on 21019
2014-12-11 20:22:36-0500 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x99b1f0c>
2014-12-11 20:22:36-0500 [-] (UDP Port 21019 Closed)
2014-12-11 20:22:36-0500 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x99b1f0c>
2014-12-11 20:22:51-0500 [-] 50.116.34.43 - - [12/Dec/2014:01:22:50 +0000] "POST /http-bind/ HTTP/1.1" 200 105 "http://example.com/" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36"

Like I said, I'm a total noob here, so I'm not sure what I could be doing wrong. Any help would be great.


Source: (StackOverflow)

Candy Chat + Prosody after login stay on connecting?

I have Candy Chat plugin on my website, the site is on GetSimple CMS. Running on nginx server that have prosody server inside for the chat plugin. I'm not the one who set this all up but I have a problem. The Candy Chat was working fine and suddenly after few weeks when trying to login on teh wbesite it stays on the "connecting".

The firebug in psot gives me this:

<body rid='1563239593' xmlns='http://jabber.org/protocol/httpbind' to='animalchat.ml' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>

After reseting the server nothing changed. I never used to make servers for multi user chats so I'm green on this stuff.

If someone could help me solve this problem that woudl be much aprishiated!


Source: (StackOverflow)

XMPP chat : Candy won't work with Ejabberd server

I want to setup a web chat client. I decided to use Candy. The XMPP server I'm using is Ejabberd. My Ejabberd server is local. The URL is :

http://localhost:5280/

Users are defined like this :

user@localhost

The thing is I can't connect to this server using Candy out of the box while I can connect to it with simple strophejs functions on my phone.

I compared the packets that were sent to the server and they are exactly the same :

  • On my phone using Wireshark :

enter image description here

  • The console log when I'm connecting with Candy :

enter image description here

The screen is pending on "Connecting..."

What can be the reason that I can't connect to the server ? Is there something I have to configure in ejabberd.cfg ?

Thanks for help


Source: (StackOverflow)

active_support dependencies error when using candy

I am getting the following error when I use Candy in my Rails project. Really a syntax error?

=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': /home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/array.rb:56: syntax error, unexpected ':', expecting kEND (SyntaxError)
...lection.find_and_modify query: {"_id" => @__candy_parent.id}...
                              ^
/home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/array.rb:56: syntax error, unexpected ',', expecting kEND
...{"_id" => @__candy_parent.id}, update: {'$pop' => {@__candy_...
                              ^
/home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/array.rb:56: syntax error, unexpected ',', expecting kEND
... {@__candy_parent_key => -1}}, new: false
                              ^
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
  from /home/waleed/.bundler/ruby/1.8/candy-daa2670a71e3/lib/candy/piece.rb:1

Any ideas why?


Source: (StackOverflow)

Connecting via HTTPS to Prosody

I'm trying to set up prosody to work over https with candy. I've tried configuring SSL and all of the steps listed to get that working but for some reason when I try https://servername.com:5280/http-bind it times out with the following appearing in the prosody log:

server.lua: accepted new client connection from servername:23366 to 5280  
server.lua: accepted new client connection from servername:10667 to 5280  
server.lua: client servername:23366 read error: closed  
server.lua: closed client handler and removed socket from list  

when I try to do the same via http it works: http://servername.com:5280/http-bind results in: "You really don't look like a BOSH client to me... what do you want?"


Source: (StackOverflow)

Candy Chat Ejabberd user login information

i have ejabberd installed and configured on a centos 6.5 server with http_bind enabled auth_method set to anonymous,internal using candy-chat as a client to connect to ejabberd on my server everything works just fine .. my problem comes next

i want to add more information to users logged in based on a certain log-in form .. user supplies his username , age , country and gender

and in candy chat i want to see his nick name as follow

(country-flag as an icon)username(age) ..

so how can i modify ejabberd to work accordingly , are there are any extra modules i can add ? or plugins for candy ? i did some research of course but i couldn't come up with much


Source: (StackOverflow)

Candy/Strophe with Ejabberd http-bind gets 404 on sending messages too quickly without waiting

I was recently working on a web application that uses Strophe.js (http://strophe.im/strophejs/) behind Candy (http://candy-chat.github.com/candy/). The client gets a 404 from ejabberd due to invalid rid issue when it sends messages too fast. The same error occurs at random times as well.

After some research I figured out that this is due to invalid rid issue and it is happening because ideally client-side js should wait for server response before pushing a new stanza while it does not in some cases.

From my point of view this should be ensured by Strophe.js at low level rather than the application programmer. Please tell me how should I proceed to fix this problem? I could not find solution to this problem on Google.


Source: (StackOverflow)

Flash requesting camera access locking up IE < 10

We're building a chatroom using Candy.js, Stophe.js and JQuery (1.10.2). We've been trying to add the ability for a user to stream video using Flash. The problem I'm trying to solve, is that whenever you try to stream - and flash requests camera access. In IE 8 or 9, the browser locks up whenever anything is clicked on in the access request window for Flash. If you have already allowed access by setting Flash to always allow on the settings_manager06.html page, works fine. No problems. When the browser is not responding, it starts throwing "Out of stack space" in various places in the JQuery script after a minute. Also works fine in every other browser I've test with.

If I load the Flash object in a page by itself, works fine. It appears like whenever a click happens in the Flash permissions window, in IE 8/9, while there is other activity in the background, there is something colliding. Note: in order to make Stophe work in IE 8/9, I'm also doing XDomainRequest calls (the jabber server is cross domain). Seems suspiciously like a potential issue.

I'd be grateful for any suggestions/ideas to help solve this.


Source: (StackOverflow)