Comparing version
@@ -59,3 +59,3 @@ # 1.7.x API Reference | ||
- `initiator` - This will always be `false`, as we are the one receiving the initiation request. | ||
- `descriptionTypes` - An array of content description names. | ||
- `applicationTypes` - An array of content application names. | ||
- `transportTypes` - An array of content transport names. | ||
@@ -76,3 +76,3 @@ - `req` - The original session initiation request, in case you need more information than provided in `opts` for selecting a session type. | ||
// create a custom StubSession. | ||
if (opts.descriptionTypes.indexOf('stub') >= 0) { | ||
if (opts.applicationTypes.indexOf('stub') >= 0) { | ||
return new StubSession(opts); | ||
@@ -190,4 +190,4 @@ } | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -194,0 +194,0 @@ ] |
24
index.js
@@ -23,6 +23,6 @@ var util = require('util'); | ||
this.prepareSession = conf.prepareSession || function (opts) { | ||
if (opts.descriptionTypes.indexOf('rtp') >= 0) { | ||
if (opts.applicationTypes.indexOf('rtp') >= 0) { | ||
return new MediaSession(opts); | ||
} | ||
if (opts.descriptionTypes.indexOf('filetransfer') >= 0) { | ||
if (opts.applicationTypes.indexOf('filetransfer') >= 0) { | ||
return new FileSession(opts); | ||
@@ -33,9 +33,9 @@ } | ||
this.performTieBreak = conf.performTieBreak || function (sess, req) { | ||
var descriptionTypes = req.jingle.contents.map(function (content) { | ||
if (content.description) { | ||
return content.description.descType; | ||
var applicationTypes= req.jingle.contents.map(function (content) { | ||
if (content.application) { | ||
return content.application.applicationType; | ||
} | ||
}); | ||
var matching = intersect(sess.pendingDescriptionTypes, descriptionTypes); | ||
var matching = intersect(sess.pendingApplicationTypes, applicationTypes); | ||
@@ -275,5 +275,5 @@ return matching.length > 0; | ||
var descriptionTypes = contents.map(function (content) { | ||
if (content.description) { | ||
return content.description.descType; | ||
var applicationTypes = contents.map(function (content) { | ||
if (content.application) { | ||
return content.application.applicationType; | ||
} | ||
@@ -283,3 +283,3 @@ }); | ||
if (content.transport) { | ||
return content.transport.transType; | ||
return content.transport.transportType; | ||
} | ||
@@ -360,3 +360,3 @@ }); | ||
// a different session with this peer that is using the requested | ||
// content description types. | ||
// content application types. | ||
for (var i = 0, len = this.peers[sender].length; i < len; i++) { | ||
@@ -389,3 +389,3 @@ var sess = this.peers[sender][i]; | ||
parent: this, | ||
descriptionTypes: descriptionTypes, | ||
applicationTypes: applicationTypes, | ||
transportTypes: transportTypes, | ||
@@ -392,0 +392,0 @@ iceServers: this.iceServers, |
{ | ||
"name": "jingle", | ||
"description": "Generic Jingle via WebRTC session manager.", | ||
"version": "1.7.1", | ||
"version": "2.0.0", | ||
"author": "Lance Stout <lance@andyet.net>", | ||
@@ -14,5 +14,5 @@ "bugs": "https://github.com/otalk/jingle.js/issues", | ||
"intersect": "^0.1.0", | ||
"jingle-filetransfer-session": "^1.1.6", | ||
"jingle-media-session": "^1.1.1", | ||
"jingle-session": "^1.0.0", | ||
"jingle-filetransfer-session": "^2.0.0", | ||
"jingle-media-session": "^2.0.0", | ||
"jingle-session": "^2.0.0", | ||
"webrtcsupport": "^1.1.0", | ||
@@ -19,0 +19,0 @@ "wildemitter": "^1.0.1" |
@@ -41,4 +41,4 @@ var test = require('tape'); | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -149,4 +149,4 @@ ] | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -153,0 +153,0 @@ ] |
@@ -158,4 +158,4 @@ var test = require('tape'); | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -248,4 +248,4 @@ ] | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -296,4 +296,4 @@ ] | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -300,0 +300,0 @@ ] |
@@ -56,4 +56,4 @@ var test = require('tape'); | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -114,4 +114,4 @@ ] | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -118,0 +118,0 @@ ] |
@@ -21,4 +21,4 @@ var test = require('tape'); | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -34,4 +34,4 @@ ] | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -92,4 +92,4 @@ ] | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -107,3 +107,3 @@ ] | ||
prepareSession: function (meta) { | ||
if (meta.descriptionTypes.indexOf('stub') >= 0) { | ||
if (meta.applicationTypes.indexOf('stub') >= 0) { | ||
return new StubSession(meta); | ||
@@ -132,4 +132,4 @@ } | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -157,4 +157,4 @@ ] | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -210,4 +210,4 @@ ] | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -237,3 +237,3 @@ ] | ||
prepareSession: function (meta) { | ||
if (meta.descriptionTypes.indexOf('stub') >= 0) { | ||
if (meta.applicationTypes.indexOf('stub') >= 0) { | ||
return new StubSession(meta); | ||
@@ -283,4 +283,4 @@ } | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -315,4 +315,4 @@ ] | ||
{ | ||
description: {descType: 'stub'}, | ||
transport: {transType: 'stub'} | ||
application: {applicationType: 'stub'}, | ||
transport: {transportType: 'stub'} | ||
} | ||
@@ -319,0 +319,0 @@ ] |
@@ -22,3 +22,3 @@ var test = require('tape'); | ||
sess.state = 'pending'; | ||
sess.pendingDescriptionTypes = ['test']; | ||
sess.pendingApplicationTypes = ['test']; | ||
@@ -48,4 +48,4 @@ jingle.on('send', function (data) { | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -67,3 +67,3 @@ ] | ||
peer: 'peer@example.com', | ||
descriptionTypes: ['othertest'] | ||
applicationTypes: ['othertest'] | ||
}); | ||
@@ -76,3 +76,3 @@ jingle.addSession(sess); | ||
peer: 'peer@example.com', | ||
descriptionTypes: ['test'] | ||
applicationTypes: ['test'] | ||
}); | ||
@@ -106,4 +106,4 @@ jingle.addSession(sess2); | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -158,4 +158,4 @@ ] | ||
{ | ||
description: {descType: 'test'}, | ||
transport: {transType: 'test'} | ||
application: {applicationType: 'test'}, | ||
transport: {transportType: 'test'} | ||
} | ||
@@ -162,0 +162,0 @@ ] |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
71029
0.32%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated