Moderator: disable screen sharing

This commit is contained in:
Luca
2020-05-12 19:04:41 +02:00
parent 2623ef2eaa
commit 5ea482d01f
6 changed files with 96 additions and 2 deletions
+19
View File
@@ -1441,6 +1441,25 @@ class Room extends EventEmitter
break;
}
case 'moderator:stopScreenSharing':
{
if (!this._hasPermission(peer, MODERATE_ROOM))
throw new Error('peer not authorized');
const { peerId } = request.data;
const stopVideoPeer = this._peers[peerId];
if (!stopVideoPeer)
throw new Error(`peer with id "${peerId}" not found`);
this._notification(stopVideoPeer.socket, 'moderator:stopScreenSharing');
cb();
break;
}
case 'moderator:closeMeeting':
{
if (!this._hasPermission(peer, MODERATE_ROOM))