aboutsummaryrefslogtreecommitdiff
path: root/view
diff options
context:
space:
mode:
authorMaZderMind2018-05-12 02:06:16 +0200
committerMaZderMind2018-05-12 02:06:16 +0200
commit622b1f030c5c931704b7e997918dad2dcfd48551 (patch)
tree8688ac2112062252ed77961ed9289065c929041d /view
parent91a653392c0e66f1941036e2b17d8fa6b162cde0 (diff)
expose current & next talk in json-api
Diffstat (limited to 'view')
-rw-r--r--view/streams-json-v2.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/view/streams-json-v2.php b/view/streams-json-v2.php
index 114e73e..591e309 100644
--- a/view/streams-json-v2.php
+++ b/view/streams-json-v2.php
@@ -2,9 +2,11 @@
header('Content-Type: application/json');
+$basetime = time();
$struct = [];
foreach (Conferences::getActiveConferences() as $conference)
{
+ $now = $conference->getSchedule()->getScheduleDisplayTime($basetime);
$overview = $conference->getOverview();
$groupstruct = array();
@@ -91,6 +93,10 @@ foreach (Conferences::getActiveConferences() as $conference)
'link' => forceslash(baseurl()).$room->getLink(),
'display' => $room->getDisplay(),
'stream' => $room->getStream(),
+ 'talks' => [
+ 'current' => $room->getCurrentTalk($now),
+ 'next' => $room->getNextTalk($now),
+ ],
'streams' => $streams,
);
}