Moderator: disable screen sharing

This commit is contained in:
Luca
2020-05-12 19:04:41 +02:00
committed by Mészáros Mihály
parent 651fb4578d
commit ff096f993d
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))