From 173fe3917e33d76894ee2fe8924921b3e1144333 Mon Sep 17 00:00:00 2001 From: Ty Clifford Date: Thu, 25 Jun 2026 08:29:13 -0400 Subject: [PATCH] =?UTF-8?q?-=20Added=20shared=20Open=20Graph/Twitter/canon?= =?UTF-8?q?ical=20metadata=20rendering=20in=20[includes/layout.php](/Users?= =?UTF-8?q?/tyemeclifford/Documents/GH/mediaplayer/includes/layout.php).?= =?UTF-8?q?=20The=20main=20video=20page=20now=20uses=20the=20active=20vide?= =?UTF-8?q?o=E2=80=99s:title=20description=20canonical=20/v/=20URL?= =?UTF-8?q?=20thumbnail=20as=20og:image=20/=20twitter:image=20image=20dime?= =?UTF-8?q?nsions=20when=20available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The standalone embed page also now emits social metadata using the video thumbnail. --- embed.php | 26 ++++++++++++++++++++++++++ includes/layout.php | 42 +++++++++++++++++++++++++++++++++++++++++- index.php | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 98 insertions(+), 3 deletions(-) diff --git a/embed.php b/embed.php index de8bc13..b37bfbb 100644 --- a/embed.php +++ b/embed.php @@ -34,6 +34,13 @@ foreach ($player_sources as $player_source) { if (($player_source['kind'] ?? '') !== 'iframe') $native_player_sources[] = $player_source; } +$meta_title = $video ? $video['title'] . ' — TyClifford.com' : 'Video Player'; +$meta_description = $video && trim($video['description'] ?? '') !== '' ? trim($video['description']) : 'TyClifford.com media player'; +$meta_url = $video + ? public_absolute_url('embed.php?v=' . rawurlencode($video['slug'])) + : public_absolute_url('embed.php'); +$meta_image = ($video && !empty($video['thumbnail'])) ? public_absolute_url(public_media_url($video['thumbnail'])) : ''; + // X-Frame-Options: allow embedding from any origin. // If you want to restrict, change ALLOWALL to SAMEORIGIN or remove for CSP header instead. header('X-Frame-Options: ALLOWALL'); @@ -45,6 +52,25 @@ header('Content-Security-Policy: frame-ancestors *'); <?= $video ? htmlspecialchars($video['title'], ENT_QUOTES) . ' — TyClifford.com' : 'Video Player' ?> + + + + + + + + + + + + + + + + + + +