Skip to content

Commit

Permalink
Added docs on the new primusPath option
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonOehlman committed Aug 13, 2014
1 parent 4216a76 commit 6b34865
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,26 @@ pc.createOffer(
);
```

### loadPrimus(signalhost, callback)
### loadPrimus(signalhost, opts?, callback)

This is a convenience function that is patched into the signaller to assist
with loading the `primus.js` client library from an `rtc-switchboard`
signaling server.

In the case that you wish to load `primus.js` from a location other than
the default location of `{{ signalhost }}/rtc.io/primus.js` you can
provide an options object which allows for the following customizations:

- `primusPath` (default: `/rtc.io/primus.js`)

The path at which the `primus.js` file can be found on the signalhost.

__NOTE:__ The above options are passed through when creating a
signaller object, and thus packages such as
[rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect)
will allow you to make the customisation with it's top level
options also.

### signaller process handling

When a signaller's underling messenger emits a `data` event this is
Expand Down
14 changes: 14 additions & 0 deletions primus-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ var primusUrl = formatter('{{ signalhost }}{{ primusPath }}');
with loading the `primus.js` client library from an `rtc-switchboard`
signaling server.
In the case that you wish to load `primus.js` from a location other than
the default location of `{{ signalhost }}/rtc.io/primus.js` you can
provide an options object which allows for the following customizations:
- `primusPath` (default: `/rtc.io/primus.js`)
The path at which the `primus.js` file can be found on the signalhost.
__NOTE:__ The above options are passed through when creating a
signaller object, and thus packages such as
[rtc-quickconnect](https://github.com/rtc-io/rtc-quickconnect)
will allow you to make the customisation with it's top level
options also.
**/
module.exports = function(signalhost, opts, callback) {
var anchor = document.createElement('a');
Expand Down

0 comments on commit 6b34865

Please sign in to comment.