@php /** * Single-video slide renderer for the product gallery. * * Inputs: * $video array { url, provider: 'video'|'youtube'|'vimeo'|'iframe', thumbnail?: string } * $product \Botble\Ecommerce\Models\Product (used for poster/alt fallback) * * Mirrors plugins/ecommerce/resources/views/themes/includes/product-gallery-video.blade.php * but scoped to ONE video at a time so it slots into a swiper-slide. */ use Illuminate\Support\Facades\File; if (empty($video) || empty($video['url'] ?? null)) { return; } $provider = $video['provider'] ?? 'iframe'; // Theme supports first-party providers only. TikTok/Twitter require external // widget scripts hosted on third-party CDNs (rejected by Envato review). if (in_array($provider, ['tiktok', 'twitter'], true)) { return; } $url = $video['url']; $poster = $video['thumbnail'] ?? null; @endphp