Comparing version 0.4.3 to 0.4.5
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -35,4 +35,5 @@ module.exports = function (grunt) { | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-nsp-package'); | ||
grunt.registerTask('default', ['jshint', 'browserify', 'uglify']); | ||
grunt.registerTask('default', ['jshint', 'browserify', 'uglify', 'validate-package']); | ||
}; |
@@ -44,4 +44,2 @@ var bows = require('bows'); | ||
JingleSession.prototype.process = function (action, changes, cb) { | ||
var self = this; | ||
var method = actionToMethod(action); | ||
@@ -91,3 +89,3 @@ | ||
get: function () { | ||
return this._state == 'starting'; | ||
return this._state === 'starting'; | ||
} | ||
@@ -97,3 +95,3 @@ }); | ||
get: function () { | ||
return this._state == 'pending'; | ||
return this._state === 'pending'; | ||
} | ||
@@ -103,3 +101,3 @@ }); | ||
get: function () { | ||
return this._state == 'active'; | ||
return this._state === 'active'; | ||
} | ||
@@ -109,3 +107,3 @@ }); | ||
get: function () { | ||
return this._state == 'ended'; | ||
return this._state === 'ended'; | ||
} | ||
@@ -112,0 +110,0 @@ }); |
@@ -5,3 +5,2 @@ var _ = require('underscore'); | ||
var webrtc = require('webrtcsupport'); | ||
var mockconsole = require('mockconsole'); | ||
var getUserMedia = require('getusermedia'); | ||
@@ -19,3 +18,2 @@ var WildEmitter = require('wildemitter'); | ||
function Jingle(opts) { | ||
var self = this; | ||
opts = opts || {}; | ||
@@ -25,3 +23,3 @@ var config = this.config = { | ||
peerConnectionConfig: { | ||
iceServers: [{"url": "stun:stun.l.google.com:19302"}] | ||
iceServers: [{'url': 'stun:stun.l.google.com:19302'}] | ||
}, | ||
@@ -115,3 +113,5 @@ peerConnectionConstraints: { | ||
} | ||
if (cb) cb(err, stream); | ||
if (cb) { | ||
return cb(err, stream); | ||
} | ||
}); | ||
@@ -135,3 +135,5 @@ }; | ||
audio.on('speaking', function () { | ||
if (self.hardMuted) return; | ||
if (self.hardMuted) { | ||
return; | ||
} | ||
self.setMicIfEnabled(1); | ||
@@ -142,4 +144,8 @@ self.emit('speaking'); | ||
audio.on('stopped_speaking', function () { | ||
if (self.hardMuted) return; | ||
if (timeout) clearTimeout(timeout); | ||
if (self.hardMuted) { | ||
return; | ||
} | ||
if (timeout) { | ||
clearTimeout(timeout); | ||
} | ||
@@ -154,3 +160,5 @@ timeout = setTimeout(function () { | ||
Jingle.prototype.setMicIfEnabled = function (volume) { | ||
if (!this.config.autoAdjustMic) return; | ||
if (!this.config.autoAdjustMic) { | ||
return; | ||
} | ||
this.gainController.setGain(volume); | ||
@@ -259,3 +267,3 @@ }; | ||
} else if (Object.keys(this.peers[sender] || {}).length) { | ||
// Check if we need to have a tie breaker because we already have | ||
// Check if we need to have a tie breaker because we already have | ||
// a different session that is using the requested content types. | ||
@@ -262,0 +270,0 @@ sids = Object.keys(this.peers[sender]); |
{ | ||
"name": "jingle", | ||
"description": "Generic Jingle via WebRTC session manager.", | ||
"version": "0.4.3", | ||
"version": "0.4.5", | ||
"author": "Lance Stout <lance@andyet.net>", | ||
@@ -12,3 +12,3 @@ "bugs": "https://github.com/legastero/jingle.js/issues", | ||
"dependencies": { | ||
"async": "0.7.x", | ||
"async": "0.8.x", | ||
"bows": "0.x", | ||
@@ -31,3 +31,7 @@ "getusermedia": "0.2.x", | ||
"grunt-contrib-uglify": "0.4.x", | ||
"precommit-hook": "0.4.x" | ||
"grunt-nsp-package": "0.0.x", | ||
"grunt-tape": "0.0.x", | ||
"precommit-hook": "^1.0.0", | ||
"tape": "2.x", | ||
"uglify-js": "2.x" | ||
}, | ||
@@ -45,3 +49,4 @@ "homepage": "https://github.com/legastero/jingle.js", | ||
"url": "https://github.com/legastero/jingle.js.git" | ||
} | ||
}, | ||
"scripts": {} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26121
632
10
+ Addedasync@0.8.0(transitive)
- Removedasync@0.7.0(transitive)
Updatedasync@0.8.x