From 7ad9c672ca769fa65452bde8d4325d71a49d7eea Mon Sep 17 00:00:00 2001 From: Ty Clifford Date: Wed, 24 Jun 2026 13:25:44 -0400 Subject: [PATCH] - Fixed the thumbnail loading issue on paginated pretty URLs. The bug was relative media paths like media/thumbs/... resolving under routes such as /v/?page=2 or /search/?page=2. I added public_media_url() in [includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php) and updated public thumbnails, posters, and local player sources in [index.php](/Users/tyemeclifford/Documents/GH/mediaplayer/index.php), [catalogue.php](/Users/tyemeclifford/Documents/GH/mediaplayer/catalogue.php), and [embed.php](/Users/tyemeclifford/Documents/GH/mediaplayer/embed.php) to use root/base-aware URLs. --- catalogue.php | 2 +- embed.php | 4 ++-- includes/db.php | 6 ++++++ index.php | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/catalogue.php b/catalogue.php index bc57d69..5880cd2 100644 --- a/catalogue.php +++ b/catalogue.php @@ -127,7 +127,7 @@ render_head('Videos — TyClifford.com', '
- <?= h($vtitle) ?> + <?= h($vtitle) ?>
NO THUMBNAIL
diff --git a/embed.php b/embed.php index 7bcf824..c12919a 100644 --- a/embed.php +++ b/embed.php @@ -21,7 +21,7 @@ $base_url = $scheme . '://' . $host . $script . '/'; // e.g. https://tyclifford $player_sources = []; if ($video && !empty($video['sources'])) { foreach ($video['sources'] as $source) { - $player_source = source_player_data($source, $base_url . MEDIA_URL); + $player_source = source_player_data($source, public_absolute_url(public_media_url())); if ($player_source) $player_sources[] = $player_source; } } @@ -216,7 +216,7 @@ header('Content-Security-Policy: frame-ancestors *'); class="video-js vjs-default-skin vjs-big-play-centered" controls preload="metadata" - poster="" + poster="" > - poster="" + poster="" data-setup='{"fluid":false,"responsive":true,"playbackRates":[0.5,1,1.25,1.5,2]}'> @@ -348,7 +348,7 @@ render_head('Media — TyClifford.com', '
- <?= h($vtitle) ?> + <?= h($vtitle) ?>
NO THUMB