aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2018-05-12 13:54:00 +0200
committerMaZderMind2018-05-12 13:54:00 +0200
commitda0cb4737b70340adee47c6cb283fa96d7ba103e (patch)
tree558da431a6716208ad3922c731bca6eed5f46823
parent59f7c88ac3c8454eb0812dcb044e2854d9241001 (diff)
expose a flag indicating, if this conference is currently streaming content or not
-rw-r--r--view/streams-json-v2.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/view/streams-json-v2.php b/view/streams-json-v2.php
index 591e309..5302e16 100644
--- a/view/streams-json-v2.php
+++ b/view/streams-json-v2.php
@@ -9,6 +9,17 @@ foreach (Conferences::getActiveConferences() as $conference)
$now = $conference->getSchedule()->getScheduleDisplayTime($basetime);
$overview = $conference->getOverview();
+ $isInDayChange = false;
+
+ foreach($conference->getRooms() as $room) {
+ $currentTalk = $room->getCurrentTalk($now);
+
+ if($currentTalk && isset($currentTalk['special']) && $currentTalk['special'] == 'daychange') {
+ $isInDayChange = true;
+ break;
+ }
+ }
+
$groupstruct = array();
foreach($overview->getGroups() as $group => $rooms)
{
@@ -115,6 +126,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,
'groups' => $groupstruct,
);
}