diff options
author | Joas Schilling <coding@schilljs.com> | 2021-09-28 14:57:29 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-07 19:18:31 +0300 |
commit | 118a6d2ded963942baee339d24b67dd3506ed12e (patch) | |
tree | bcbc9c5f78dec0db4e76e1f7469cae53fc84acb0 /lib/Signaling/BackendNotifier.php | |
parent | e115e96d7daa11b70fb270f59825894535f10c7c (diff) |
Split publishing media into audio and video after clarifying with the HPB
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Signaling/BackendNotifier.php')
-rw-r--r-- | lib/Signaling/BackendNotifier.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php index 3a02e3f46..310be8ec3 100644 --- a/lib/Signaling/BackendNotifier.php +++ b/lib/Signaling/BackendNotifier.php @@ -312,15 +312,16 @@ class BackendNotifier { if (\in_array($session->getSessionId(), $sessionIds, true)) { $data['permissions'] = []; - // TODO split into two permissions? - if ($participant->getPermissions() & (Attendee::PERMISSIONS_PUBLISH_AUDIO | Attendee::PERMISSIONS_PUBLISH_VIDEO)) { - $data['permissions'][] = 'publish-media'; + if ($participant->getPermissions() & Attendee::PERMISSIONS_PUBLISH_AUDIO) { + $data['permissions'][] = 'publish-audio'; + } + if ($participant->getPermissions() & Attendee::PERMISSIONS_PUBLISH_VIDEO) { + $data['permissions'][] = 'publish-video'; } if ($participant->getPermissions() & Attendee::PERMISSIONS_PUBLISH_SCREEN) { $data['permissions'][] = 'publish-screen'; } - if ($attendee->getParticipantType() === Participant::OWNER || - $attendee->getParticipantType() === Participant::MODERATOR) { + if ($participant->hasModeratorPermissions(false)) { $data['permissions'][] = 'control'; } $changed[] = $data; |