diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-03-05 22:41:29 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-03-06 16:53:24 +0300 |
commit | c0c73d1e4998aef30ed93431afd1f526acb18d9e (patch) | |
tree | 92fe57934475a6252bc3cdeb5eece9059ffc64af /lib/Signaling/BackendNotifier.php | |
parent | 29e192164c5bde68115b5d2923b97e0831452ae1 (diff) |
Send participant permissions to the external signaling server
In order to filter control messages the external signaling server needs
to know the permissions of each participant. Those permissions need to
be set when the participant joins the room or if the participant type is
changed.
All participants should have permissions to publish media and screen,
but only logged in moderators should have permission to send control
messages.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/Signaling/BackendNotifier.php')
-rw-r--r-- | lib/Signaling/BackendNotifier.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php index 5750e0d14..59bb62d52 100644 --- a/lib/Signaling/BackendNotifier.php +++ b/lib/Signaling/BackendNotifier.php @@ -229,6 +229,11 @@ class BackendNotifier { $participant['userId'] = $userId; $users[] = $participant; if (\in_array($participant['sessionId'], $sessionIds, true)) { + $participant['permissions'] = ['publish-media', 'publish-screen']; + if ($participant['participantType'] === Participant::OWNER || + $participant['participantType'] === Participant::MODERATOR) { + $participant['permissions'][] = 'control'; + } $changed[] = $participant; } } @@ -238,6 +243,7 @@ class BackendNotifier { } $users[] = $participant; if (\in_array($participant['sessionId'], $sessionIds, true)) { + $participant['permissions'] = ['publish-media', 'publish-screen']; $changed[] = $participant; } } |