Used for functionality that we might add to the Pusher core JS library. Done in a way so the actual Pusher JS library doesn't have to be modified (potentially a bit hacky!)
JavaScript PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

The Pusher JS Ext library

This library is used as a playground for functionality that might be considered to be added to the Pusher core JavaScript library.

Functionality will be made available without the need to modify any other library. This should include the Pusher core JavaScript library and any server libraries.


This library is intended to be used with version 1.12 of pusher-js.


The PusherExt object inherits from the Pusher object so you can use it as you do the Pusher object.

How to use the library

  1. Include the standard Pusher library

  2. Include the PusherExt library

     <script src=""></script>
     <script src="some_path/PusherExt.js"></script>
       var options = {/* options */};
       var pusherExt = new PusherExt('APP_KEY', options);
  3. Since the PusherExt object extends the Pusher object you can use it as you do the Pusher object.

Alpha Functionality in library

The functionality that must be considered as pre-Alpha that is present within this library is:

The ability to subscribe to multiple subscriptions within a single call

var pusherExt = new PusherExt('YOUR_APP_KEY', {
  multiPreAuthEndPoint: 'php/multiPreAuth.php'
var channels = pusherExt.multiSubscribe(['channel', 'private-channel', 'presence-channel']);
var publicChannel = channels['channel'];
var privateChannel = channels['private-channel'];
var presenceChannel = channels['presence-channel'];

For additional usage see the acceptance tests in: acceptance_tests/PusherExtTests.js

The code for the server authentication can be seen in: acceptance_tests/multiPreAuth.php

The JSON response from the authentication endpoint should look the same as a standard authentication response but the auth for each channel should be identified within a hash:



  1. Subscriptions can only be made once the connection is in a 'connected' state because the pusher.connection.socket_id hasn't been set. Need to have pending subscriptions.
  2. If connection is lost each subscription will be subscribed to individually.

The ability to send additional parameters to the server with the subscription authentication AJAX call

This functionality was removed as it is now present in 1.12 of the official pusher-js