How to use the stanza.io.createClient function in stanza

To help you get started, we’ve selected a few stanza examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BroadSoft-Xtended / Project-WebRTC-Widget / lib / models / xmpp.js View on Github external
self.login = function(jid, password) {
    client = XMPP.createClient({
      jid: jid,
      password: password,

      // If you have a .well-known/host-meta.json file for your 
      // domain, the connection transport config can be skipped. 

      transport: 'bosh',
      boshURL: 'http://ums.ihs.broadsoft.com:5280'
        // (or `boshURL` if using 'bosh' as the transport) 
    });
    return client;
  };
github otalk / otalk-im-client / clientapp / app.js View on Github external
function (cb) {
                app.state = new AppState();
                app.me = window.me = new MeModel(profile);

                window.onbeforeunload = function () {
                    if (app.api.sessionStarted) {
                        app.api.disconnect();
                    }
                };

                self.api = window.client = StanzaIO.createClient(config);
                client.use(pushNotifications);
                xmppEventHandlers(self.api, self);

                self.api.once('session:started', function () {
                    app.state.hasConnected = true;
                    cb();
                });
                self.api.connect();
            },
            function (cb) {

stanza

Modern XMPP in the browser, with a JSON API

MIT
Latest version published 9 months ago

Package Health Score

68 / 100
Full package analysis