From 5f301e85b24f3a219c3020a8e24113c31a2a1058 Mon Sep 17 00:00:00 2001 From: jade (winter) Date: Sun, 19 Jul 2026 17:51:11 +0100 Subject: fix so much stuff + add hls player --- index.php | 49 ++++--- lib/bbcnext.php | 183 ++++++++++++------------ lib/mediaselector.php | 27 ++++ lib/rms.php | 2 +- search.php | 2 +- static/hls-player.js | 9 ++ static/hls.light.min.js | 2 + theme/Brutalist/main.css | 298 +++++++++++++++++++-------------------- theme/Default/main.css | 358 ++++++++++++++++++++++++----------------------- 9 files changed, 489 insertions(+), 441 deletions(-) create mode 100644 lib/mediaselector.php create mode 100644 static/hls-player.js create mode 100644 static/hls.light.min.js diff --git a/index.php b/index.php index b4a98e7..2e367b5 100644 --- a/index.php +++ b/index.php @@ -2,35 +2,34 @@ require_once __DIR__ . '/lib/bbcnext.php'; stream_context_set_default(['http' => [ - 'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', + 'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', ]]); ?> - - - - - - - - + + + + sounds-retro + + + + + - -
- RMS Frontend -
- - -
-
+ +
+ RMS Frontend +
+ + +
+
-
- -
- +
+ +
+ diff --git a/lib/bbcnext.php b/lib/bbcnext.php index 988d248..ed58a4f 100644 --- a/lib/bbcnext.php +++ b/lib/bbcnext.php @@ -1,109 +1,116 @@ data); + next_renderExperience(rms_fetch($path)->data); } function next_renderExperience(array $modules) { - foreach ($modules as $m) { - next_renderModule($m); - } + 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 ""; + $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 '