Small fix to microphone access.

master
Håvar Aambø Fosstveit 2019-04-05 22:11:23 +02:00
parent 19ce7c7a4d
commit 0cd1909af0
1 changed files with 8 additions and 3 deletions

View File

@ -551,7 +551,7 @@ export default class RoomClient
this.muteMic();
}
muteMic()
async muteMic()
{
logger.debug('muteMic()');
@ -567,13 +567,18 @@ export default class RoomClient
}
}
unmuteMic()
async unmuteMic()
{
logger.debug('unmuteMic()');
try
{
this._micProducer.resume();
if (this._micProducer)
this._micProducer.resume();
else if (this._room.canSend('audio'))
await this._setMicProducer();
else
throw new Error('cannot send audio');
}
catch (error)
{