Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Bauch <bauch@struktur.de>2018-05-23 11:09:53 +0300
committerJoachim Bauch <mail@joachim-bauch.de>2018-08-24 11:52:20 +0300
commitd4929b7525f506a7a0a10bac5c499045751bc696 (patch)
tree8b1a9d953a13ab70552b96e49a069a3589262b83 /lib/Signaling
parente20c8f0aacf902f0a05850f7c76cbf5a61ee291f (diff)
Change "inCall" state to contain bit flags
The flags encode if a user is in the call and whether he is publishing audio and/or video. Signed-off-by: Joachim Bauch <bauch@struktur.de>
Diffstat (limited to 'lib/Signaling')
-rw-r--r--lib/Signaling/BackendNotifier.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php
index d0bff9c00..f6c6db8bc 100644
--- a/lib/Signaling/BackendNotifier.php
+++ b/lib/Signaling/BackendNotifier.php
@@ -276,18 +276,18 @@ class BackendNotifier{
* The "in-call" status of the given session ids has changed..
*
* @param Room $room
- * @param bool $inCall
+ * @param int $flags
* @param array $sessionids
* @throws \Exception
*/
- public function roomInCallChanged($room, $inCall, $sessionIds) {
- $this->logger->info('Room in-call status changed: ' . $room->getToken() . ' ' . $inCall . ' ' . print_r($sessionIds, true), ['app' => 'spreed']);
+ public function roomInCallChanged($room, $flags, $sessionIds) {
+ $this->logger->info('Room in-call status changed: ' . $room->getToken() . ' ' . $flags . ' ' . print_r($sessionIds, true), ['app' => 'spreed']);
$changed = [];
$users = [];
$participants = $room->getParticipants();
foreach ($participants['users'] as $userId => $participant) {
$participant['userId'] = $userId;
- if ($participant['inCall']) {
+ if ($participant['inCall'] !== 0) {
$users[] = $participant;
}
if (in_array($participant['sessionId'], $sessionIds)) {
@@ -298,7 +298,7 @@ class BackendNotifier{
if (!isset($participant['participantType'])) {
$participant['participantType'] = Participant::GUEST;
}
- if ($participant['inCall']) {
+ if ($participant['inCall'] !== 0) {
$users[] = $participant;
}
if (in_array($participant['sessionId'], $sessionIds)) {
@@ -309,7 +309,7 @@ class BackendNotifier{
$this->backendRequest('/api/v1/room/' . $room->getToken(), [
'type' => 'incall',
'incall' => [
- 'incall' => $inCall,
+ 'incall' => $flags,
'changed' => $changed,
'users' => $users
],