How to use stanza - 4 common examples

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 iXyles / fortnite-basic-api / src / Communciator / index.js View on Github external
setup() {
    this.stream = createClient({
      server: Endpoints.EPIC_PROD_ENV,
      transports: {
        websocket: `wss://${Endpoints.XMPP_SERVER}`,
        bosh: false,
      },

      credentials: {
        jid: `${this.client.authenticator.accountId}@${Endpoints.EPIC_PROD_ENV}`,
        host: Endpoints.EPIC_PROD_ENV,
        username: this.client.authenticator.accountId,
        password: this.client.authenticator.accessToken,
      },

      resource: this.resource, // to make it seen online INSIDE the game.
    });
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) {
github otalk / otalk-im-client / clientapp / pages / main.js View on Github external
handleJoinMUC: function (e) {
        e.preventDefault();

        var mucjid = this.$('#joinmuc').val();
        me.mucs.add({
            id: mucjid,
            name: mucjid,
            jid: new XMPP.JID(mucjid),
            nick: me.nick,
            autoJoin: false
        });
        me.mucs.get(mucjid).join();
    }
});

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