aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--model/Conference.php7
-rw-r--r--model/Conferences.php2
-rw-r--r--model/Room.php6
-rw-r--r--model/Schedule.php24
4 files changed, 31 insertions, 8 deletions
diff --git a/model/Conference.php b/model/Conference.php
index 8d387a0..0ce0a55 100644
--- a/model/Conference.php
+++ b/model/Conference.php
@@ -225,4 +225,11 @@ class Conference extends ModelBase
public function getExtraFiles() {
return $this->get('EXTRA_FILES', []);
}
+
+ public function hasAdditionalHtml() {
+ return $this->has('CONFERENCE.ADDITIONAL_HTML');
+ }
+ public function getAdditionalHtml() {
+ return $this->get('CONFERENCE.ADDITIONAL_HTML');
+ }
}
diff --git a/model/Conferences.php b/model/Conferences.php
index f930e32..f7276ac 100644
--- a/model/Conferences.php
+++ b/model/Conferences.php
@@ -48,7 +48,7 @@ class Conferences
$sorted = Conferences::getConferences();
usort($sorted, function($a, $b) {
- return $b->startsAt() > $a->endsAt() ? 1 : -1;
+ return $b->startsAt() > $a->startsAt() ? 1 : -1;
});
return $sorted;
diff --git a/model/Room.php b/model/Room.php
index ecab17e..4b251cd 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -163,8 +163,12 @@ class Room
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.DASH');
}
+ public function getHLSPlaylistUrl() {
+ return proto().'://cdn.c3voc.de/hls/'.rawurlencode($this->getSlug().'_'.$this->getStream()).'.m3u8';
+ }
+
public function getDashManifestUrl() {
- return proto().'://dekan.cch.c3voc.de/dash/'.rawurlencode($this->getStream()).'/manifest.mpd';
+ return proto().'://live.dus.c3voc.de/dash/'.rawurlencode($this->getSlug().'_'.$this->getStream()).'.mpd';
}
public function getDashTech() {
diff --git a/model/Schedule.php b/model/Schedule.php
index 4c0a802..ec4ddc7 100644
--- a/model/Schedule.php
+++ b/model/Schedule.php
@@ -34,6 +34,16 @@ class Schedule
return floatval($this->getConference()->get('SCHEDULE.SCALE', 7));
}
+ public function isRoomMapped($scheduleRoom) {
+ $mapping = $this->getScheduleToRoomSlugMapping();
+ return isset( $mapping[$scheduleRoom] );
+ }
+
+ public function getMappedRoom($scheduleRoom) {
+ $mapping = $this->getScheduleToRoomSlugMapping();
+ return $this->getConference()->getRoomIfExists( @$mapping[$scheduleRoom] );
+ }
+
private function fetchSchedule()
{
$schedule = @file_get_contents($this->getScheduleCache());
@@ -54,7 +64,6 @@ class Schedule
if(!$schedule)
return [];
- $mapping = $this->getScheduleToRoomSlugMapping();
$program = array();
// re-calculate day-ends
@@ -115,8 +124,6 @@ class Schedule
if($this->isRoomFiltered($name))
continue;
- $room_known = isset($mapping[$name]);
-
$eventsSorted = [];
foreach($room->event as $event)
{
@@ -150,7 +157,7 @@ class Schedule
'start' => $lastend,
'end' => $start,
'duration' => $pauseduration,
- 'room_known' => $room_known,
+ 'room_known' => $this->isRoomMapped($name),
);
}
else if(!$lastend && $daystart < $start)
@@ -164,7 +171,7 @@ class Schedule
'start' => $daystart,
'end' => $start,
'duration' => $start - $daystart,
- 'room_known' => $room_known,
+ 'room_known' => $this->isRoomMapped($name),
);
}
@@ -182,7 +189,7 @@ class Schedule
'start' => $start,
'end' => $end,
'duration' => $duration,
- 'room_known' => $room_known,
+ 'room_known' => $this->isRoomMapped($name),
);
$lastend = $end;
@@ -219,6 +226,7 @@ class Schedule
}
+ $mapping = $this->getScheduleToRoomSlugMapping();
if($this->getConference()->has('SCHEDULE.ROOMFILTER'))
{
// sort by roomfilter
@@ -277,6 +285,10 @@ class Schedule
{
if(isset($room['SCHEDULE_NAME']))
$mapping[ $room['SCHEDULE_NAME'] ] = $slug;
+ else if(isset($room['DISPLAY']))
+ $mapping[ $room['DISPLAY'] ] = $slug;
+ else
+ $mapping[ $slug ] = $slug;
}
return $mapping;