webrtc-troubleshoot
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "webrtc-troubleshoot", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "A way to add webrtc troubleshooting to your app", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,3 +47,3 @@ import Test from '../utils/Test'; | ||
}); | ||
return this._promise.promise; | ||
return this.deferred.promise; | ||
} | ||
@@ -50,0 +50,0 @@ |
@@ -28,3 +28,3 @@ // adapted from https://github.com/webrtc/testrtc | ||
this.logger.log(`Advanced Camera Test with resolutions: ${JSON.stringify(settings.resolutions)} and duration ${JSON.stringify(settings.duration)}`); | ||
return this.startGetUserMedia(this.resolutions[this.currentResolution]); | ||
return this.startGetUserMedia(this.resolutions[this.currentResolution]).then(this.resolve.bind(this), this.reject.bind(this)); | ||
} | ||
@@ -31,0 +31,0 @@ |
@@ -102,3 +102,3 @@ import Test from '../utils/Test'; | ||
this.pc1.offer(); | ||
return this._promise.promise; | ||
return this.deferred.promise; | ||
} | ||
@@ -105,0 +105,0 @@ |
@@ -48,3 +48,3 @@ import WebrtcCall from '../utils/WebrtcCall'; | ||
} | ||
return this._promise.promise; | ||
return this.defrred.promise; | ||
} | ||
@@ -51,0 +51,0 @@ |
@@ -82,3 +82,3 @@ // adapted from https://github.com/webrtc/testrtc/blob/master/src/js/bandwidth_test.js | ||
console.warn('rejecting2', this); | ||
this.reject(error); | ||
return this.reject(error); | ||
}); | ||
@@ -85,0 +85,0 @@ } |
import Test from '../utils/Test'; | ||
const LocalMedia = require('localMedia'); | ||
class VideoTest extends Test { | ||
export default class VideoTest extends Test { | ||
constructor() { | ||
@@ -36,3 +36,3 @@ super(...arguments); | ||
}); | ||
return this._promise.promise; | ||
return this.defrred.promise; | ||
} | ||
@@ -45,3 +45,1 @@ | ||
} | ||
export default VideoTest; |
@@ -5,6 +5,6 @@ export default class Test { | ||
this.logger = this.options.logger || console; | ||
this.deferred = Promise.defer(); | ||
} | ||
start () { | ||
this._promise = Promise.defer(); | ||
this.timeout = window.setTimeout(() => { | ||
@@ -16,9 +16,9 @@ this.reject(new Error('Test Timeout')); | ||
resolve () { | ||
this._promise.resolve(); | ||
return this._promise.promise; | ||
this.deferred.resolve(); | ||
return this.deferred.promise; | ||
} | ||
reject (err) { | ||
this._promise.reject(err); | ||
return this._promise.promise; | ||
this.deferred.reject(err); | ||
return this.deferred.promise; | ||
} | ||
@@ -25,0 +25,0 @@ |
Sorry, the diff of this file is too big to display
330527
8369