diff options
author | dedeibel | 2018-12-19 22:50:32 +0100 |
---|---|---|
committer | dedeibel | 2018-12-19 22:50:32 +0100 |
commit | 3e5464f2e3c56c6860d9939b719173f81d829056 (patch) | |
tree | 2c84f6f142e947f4a68a97f53ceca84780fc0d67 /view | |
parent | 30be19cd2a5f4cc0dc54159daa3e63d0e1304ab6 (diff) |
api: set isCurrentlyStreaming true only when a talk is actually running
Diffstat (limited to 'view')
-rw-r--r-- | view/streams-json-v2.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/view/streams-json-v2.php b/view/streams-json-v2.php index 5302e16..7f070dd 100644 --- a/view/streams-json-v2.php +++ b/view/streams-json-v2.php @@ -9,14 +9,17 @@ foreach (Conferences::getActiveConferences() as $conference) $now = $conference->getSchedule()->getScheduleDisplayTime($basetime); $overview = $conference->getOverview(); - $isInDayChange = false; + $isCurrentlyStreaming = false; foreach($conference->getRooms() as $room) { $currentTalk = $room->getCurrentTalk($now); - if($currentTalk && isset($currentTalk['special']) && $currentTalk['special'] == 'daychange') { - $isInDayChange = true; - break; + if ($currentTalk) { + $isCurrentlyStreaming = true; + if (isset($currentTalk['special']) && $currentTalk['special'] == 'daychange') { + $isCurrentlyStreaming = true; + break; + } } } @@ -126,7 +129,7 @@ foreach (Conferences::getActiveConferences() as $conference) 'schedule' => $conference->getSchedule()->getScheduleUrl(), 'startsAt' => $conference->startsAt() ? $conference->startsAt()->format(DateTime::ISO8601) : null, 'endsAt' => $conference->endsAt() ? $conference->endsAt()->format(DateTime::ISO8601) : null, - 'isCurrentlyStreaming' => !$isInDayChange, + 'isCurrentlyStreaming' => $isCurrentlyStreaming, 'groups' => $groupstruct, ); } |