Merge pull request #525 from damencho/sync-mute

Syncs mute/unmute calls.
This commit is contained in:
yanas 2016-03-09 16:17:00 -06:00
commit 3759676770
1 changed files with 20 additions and 4 deletions

View File

@ -88,9 +88,17 @@ function muteLocalAudio (muted) {
}
if (muted) {
localAudio.mute();
localAudio.mute().then(function(value) {},
function(value) {
console.warn('Audio Mute was rejected:', value);
}
);
} else {
localAudio.unmute();
localAudio.unmute().then(function(value) {},
function(value) {
console.warn('Audio unmute was rejected:', value);
}
);
}
}
@ -104,9 +112,17 @@ function muteLocalVideo (muted) {
}
if (muted) {
localVideo.mute();
localVideo.mute().then(function(value) {},
function(value) {
console.warn('Video mute was rejected:', value);
}
);
} else {
localVideo.unmute();
localVideo.unmute().then(function(value) {},
function(value) {
console.warn('Video unmute was rejected:', value);
}
);
}
}