aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hubel2019-10-24 09:57:01 +0200
committerAndreas Hubel2019-10-24 11:01:42 +0200
commitdcbba6e1b0d00216b046b7b2a833e98b6890b06e (patch)
tree34ba83f0c57b21333ccca5e98077537617f0ab3e
parentdef2ad740d16d56a8b5f5dc4c429a3ab6ce0e505 (diff)
API: set isCurrentlyStreaming flag only when there is something other than a daychange event
Diffstat (limited to '')
-rw-r--r--view/streams-json-v2.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/view/streams-json-v2.php b/view/streams-json-v2.php
index 7f070dd..dacd2a1 100644
--- a/view/streams-json-v2.php
+++ b/view/streams-json-v2.php
@@ -11,12 +11,13 @@ foreach (Conferences::getActiveConferences() as $conference)
$isCurrentlyStreaming = false;
+ // iterate through all rooms and only activate flag if there is something other than a daychange event
foreach($conference->getRooms() as $room) {
$currentTalk = $room->getCurrentTalk($now);
if ($currentTalk) {
- $isCurrentlyStreaming = true;
- if (isset($currentTalk['special']) && $currentTalk['special'] == 'daychange') {
+ // if current event is a daychange ignore room, but only if the next talk does not start in 30 minutes
+ if ( !(isset($currentTalk['special']) && $currentTalk['special'] == 'daychange' && $currentTalk['end'] - $basetime > 30*60 )) {
$isCurrentlyStreaming = true;
break;
}