data); } catch (Exception|TypeError $e) { echo '' . htmlspecialchars($e->getMessage()) . ''; } if (INCLUDE_RMS_DATA) { echo '
Raw data from RMS
';
        echo json_encode($resp, JSON_PRETTY_PRINT);
        echo '
'; } } function next_renderExperience(array $modules) { foreach ($modules as $m) { next_renderModule($m); } } function next_renderModule(stdClass $module) { $type = strtr($module->type, '_', '-'); $titleTag = $type == 'inline-header-module' ? 'h1' : 'h2'; echo "<$type id=\"$module->id\" module-style=\"$module->style\">"; echo "<$titleTag>" . htmlspecialchars($module->title ?? '[no title]') . ""; if (isset($module->description)) { echo '' . htmlspecialchars($module->description) . ''; } echo ''; if (!is_array($module->data)) { next_renderItem($module->data); } else { foreach ($module->data as $item) { next_renderItem($item); } } echo ""; if ($module->id == 'aod_play_area') { $url = mediaselector_findHls($module->data[0]->id); echo '