Skip to content

Commit 1d200fa

Browse files
committed
Merge pull request #364 from paulhovey/master
modified testReadiness to emit readyToCall event if video and audio configurations are set to false
2 parents 7df87c4 + 462d15b commit 1d200fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

simplewebrtc.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,12 @@ SimpleWebRTC.prototype.stopScreenShare = function () {
434434

435435
SimpleWebRTC.prototype.testReadiness = function () {
436436
var self = this;
437-
if (this.webrtc.localStreams.length > 0 && this.sessionReady) {
438-
self.emit('readyToCall', self.connection.getSessionid());
437+
if (this.sessionReady) {
438+
if (!this.config.media.video && !this.config.media.audio) {
439+
self.emit('readyToCall', self.connection.getSessionid());
440+
} else if (this.webrtc.localStreams.length > 0) {
441+
self.emit('readyToCall', self.connection.getSessionid());
442+
}
439443
}
440444
};
441445

0 commit comments

Comments
 (0)