From ca163e13cf48f9623cf7ec89226968d9fba3782d Mon Sep 17 00:00:00 2001 From: dwindown Date: Fri, 16 Jan 2026 14:52:14 +0700 Subject: [PATCH] Fix webinar recording detection to support M3U8 and MP4 from Adilo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue was that MemberAccess.tsx was only checking recording_url (YouTube) and not fetching or checking m3u8_url, mp4_url, or video_host fields. Changes: - Added m3u8_url, mp4_url, video_host, and event_start to product queries - Updated UserAccess interface to include these fields - Changed webinar recording check to support all recording types - Now properly detects Adilo recordings as available 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/pages/member/MemberAccess.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/pages/member/MemberAccess.tsx b/src/pages/member/MemberAccess.tsx index 539f7c0..f21d0b6 100644 --- a/src/pages/member/MemberAccess.tsx +++ b/src/pages/member/MemberAccess.tsx @@ -23,6 +23,10 @@ interface UserAccess { type: string; meeting_link: string | null; recording_url: string | null; + m3u8_url: string | null; + mp4_url: string | null; + video_host: 'youtube' | 'adilo' | 'unknown' | null; + event_start: string | null; description: string; }; } @@ -55,7 +59,7 @@ export default function MemberAccess() { // Get direct user_access supabase .from('user_access') - .select(`id, granted_at, expires_at, product:products (id, title, slug, type, meeting_link, recording_url, description)`) + .select(`id, granted_at, expires_at, product:products (id, title, slug, type, meeting_link, recording_url, m3u8_url, mp4_url, video_host, event_start, description)`) .eq('user_id', user!.id), // Get products from paid orders (via order_items) supabase @@ -63,7 +67,7 @@ export default function MemberAccess() { .select( ` order_items ( - product:products (id, title, slug, type, meeting_link, recording_url, description) + product:products (id, title, slug, type, meeting_link, recording_url, m3u8_url, mp4_url, video_host, event_start, description) ) `, ) @@ -151,8 +155,11 @@ export default function MemberAccess() { // Check if webinar has ended const webinarEnded = item.product.event_start && new Date(item.product.event_start) <= new Date(); + // Check if any recording exists (YouTube, M3U8, or MP4) + const hasRecording = item.product.recording_url || item.product.m3u8_url || item.product.mp4_url; + // If recording exists, show it - if (item.product.recording_url) { + if (hasRecording) { return (