Moderator: disable screen sharing

This commit is contained in:
Luca committed 2020-05-12 19:04:41 +02:00
1 parent 2623ef2eaa
commit 5ea482d01f
6 files changed
+96 -2

No files matched your search

+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))