Exemplo n.º 1
0
header('Content-Type: application/json');
$conferences = Conferences::getActiveConferences();
$struct = array();
if (isset($GLOBALS['CONFIG'])) {
    $saved_config = $GLOBALS['CONFIG'];
}
foreach ($conferences as $conference) {
    /*
      ok. das ist so hacky. EIGENTLICH müsste man aus ModelBase
      das $GLOBALS tilgen und von der api ne v2 releasen, welche
      conferences als eigenes Objekt betrachtet
    */
    $GLOBALS['CONFIG'] = $conference['CONFIG'];
    $GLOBALS['MANDATOR'] = $conference['slug'];
    $overview = new Overview();
    foreach ($overview->getGroups() as $group => $rooms) {
        $roomstruct = array();
        foreach ($rooms as $room) {
            $streams = array();
            foreach ($room->getStreams() as $stream) {
                $key = $stream->getSelection() . '-' . $stream->getLanguage();
                $urls = array();
                switch ($stream->getPlayerType()) {
                    case 'video':
                        foreach ($stream->getVideoProtos() as $proto => $display) {
                            $urls[$proto] = array('display' => $display, 'tech' => $stream->getVideoTech($proto), 'url' => $stream->getVideoUrl($proto));
                        }
                        break;
                    case 'slides':
                        foreach ($stream->getSlidesProtos() as $proto => $display) {
                            $urls[$proto] = array('display' => $display, 'tech' => $stream->getSlidesTech($proto), 'url' => $stream->getSlidesUrl($proto));