ConverseJS with ejabberd

So now I will going to develop chatting app using converseJs with ejabberd.

First thing download Converse.js for javascript

Now create HTML file and this code in your Javascript script file.

    require([‘converse’], function (converse) {
        (function () {
            var $ = converse.env.jQuery;
            $.extend( $.easing, {
                easeInOutExpo: function (x, t, b, c, d) {
                    if (t==0) return b;
                    if (t==d) return b+c;
                    if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t – 1)) + b;
                    return c/2 * (-Math.pow(2, -10 * –t) + 2) + b;
                },
            });

            $(window).scroll(function() {
                if ($(“.navbar”).offset().top > 50) {
                    $(“.navbar-fixed-top”).addClass(“top-nav-collapse”);
                } else {
                    $(“.navbar-fixed-top”).removeClass(“top-nav-collapse”);
                }
            });
            $(‘.page-scroll a’).bind(‘click’, function(event) {
                var $anchor = $(this);
                $(‘html, body’).stop().animate({

        converse.initialize({
            bosh_service_url: ‘https://yourHostName/http-bind/&#8217;,
            keepalive: true,
            message_carbons: true,
            play_sounds: true,
            roster_groups: true,
            show_controlbox_by_default: true,
        });
    });

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s