From d5ea0f332bf8e5f0745e2c0e592ee895423a70ad Mon Sep 17 00:00:00 2001 From: jade (winter) Date: Mon, 20 Jul 2026 13:35:01 +0100 Subject: add live playback support --- lib/bbcnext.php | 20 +++++++++++++++++++- lib/mediaselector.php | 20 ++++++++++++++++---- lib/sounds-auth.php | 15 +++++++++++++++ 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 lib/sounds-auth.php (limited to 'lib') diff --git a/lib/bbcnext.php b/lib/bbcnext.php index ed58a4f..f4ad4ec 100644 --- a/lib/bbcnext.php +++ b/lib/bbcnext.php @@ -3,8 +3,22 @@ require_once __DIR__ . '/rms.php'; require_once __DIR__ . '/mediaselector.php'; +const INCLUDE_RMS_DATA = false; + function next_renderFromRms(string $path) { - next_renderExperience(rms_fetch($path)->data); + $resp = rms_fetch($path); + try { + next_renderExperience($resp->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) { @@ -38,6 +52,10 @@ function next_renderModule(stdClass $module) { $url = mediaselector_findHls($module->data[0]->id); echo '