Skip to content

Commit

Permalink
added webrtc patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordin committed Sep 26, 2014
1 parent 6196d0a commit d29b8a6
Show file tree
Hide file tree
Showing 3 changed files with 800 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function(grunt){

concat: {
dist: {
src: ['src/wrap_header.js', 'src/base64.js', 'src/sha1.js', 'src/md5.js', 'src/polyfills.js', 'src/core.js', 'src/bosh.js', 'src/websocket.js', 'src/wrap_footer.js'],
src: ['src/wrap_header.js', 'src/base64.js', 'src/sha1.js', 'src/md5.js', 'src/polyfills.js', 'src/core.js', 'src/bosh.js', 'src/websocket.js', 'src/webrtc.js', 'src/wrap_footer.js'],
dest: '<%= pkg.name %>'
},
options: {
Expand Down
4 changes: 4 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,10 @@ Strophe.Connection = function (service, options)
if (service.indexOf("ws:") === 0 || service.indexOf("wss:") === 0 ||
proto.indexOf("ws") === 0) {
this._proto = new Strophe.Websocket(this);
} else if (service.indexOf("p2p") === 0) {
this._proto = new Strophe.WebRTC(this, options);
} else if (service.indexOf("lo") === 0) {
this._proto = new Strophe.Loopback(this);
} else {
this._proto = new Strophe.Bosh(this);
}
Expand Down
Loading

0 comments on commit d29b8a6

Please sign in to comment.