@props([ 'video', 'nextVideo' => null, 'previousVideo' => null, 'playlist' => null, 'playlistVideos' => null, ]) @php // Force 16:9 for every video — orientation classes intentionally disabled $orientationClass = ''; $hlsUrl = $video->has_hls ? route('videos.hls', ['video' => $video, 'file' => 'master.m3u8']) : null; $mp4Url = route('videos.stream', $video) . '?v=' . $video->updated_at->timestamp; $nextUrl = $nextVideo && $playlist ? route('videos.show', $nextVideo) .'?playlist='.$playlist->share_token : null; $prevUrl = $previousVideo && $playlist ? route('videos.show', $previousVideo).'?playlist='.$playlist->share_token : null; // Build playlist data for client-side shuffle $plData = null; if ($playlist && $playlistVideos && $playlistVideos->count() > 0) { $plData = [ 'playlistId' => $playlist->share_token, 'currentVideoId' => $video->id, 'videos' => $playlistVideos->map(fn($v) => [ 'id' => $v->id, 'showUrl' => route('videos.show', $v) . '?playlist=' . $playlist->id, ])->values()->all(), ]; } @endphp {{-- ══════════════════════════════════════════════ PLAYER WRAP — theater class toggled by JS ══════════════════════════════════════════════ --}}
{{-- ── Video element ── --}} {{-- ── Slot for type-specific overlays (coach notes, etc.) ── --}} {{ $overlay ?? '' }} {{-- ── Play/pause ripple (double-tap seek feedback) ── --}}
10
10
{{-- ── Spinner ── --}}
{{-- ── Play overlay (shows when paused, hides when playing) ── --}}
{{-- ── Gradient fade at bottom ── --}}
{{-- ════════════════════════════════════════ CONTROLS ════════════════════════════════════════ --}}
{{-- Progress bar --}}
{{-- Chrome bottom row --}}
{{-- Left --}}
{{-- Play / Pause --}} {{-- Prev / Next playlist --}} @if($previousVideo || ($playlist && $playlistVideos && $playlistVideos->count() > 1)) @endif @if($nextVideo || ($playlist && $playlistVideos && $playlistVideos->count() > 1)) @endif {{-- Volume --}}
{{-- Time display --}}
0:00 / 0:00
{{-- /left --}} {{-- Right --}}
{{-- Settings --}}
Playback speed Normal
Playback speed
@foreach([['0.25','0.25'],['0.5','0.5'],['0.75','0.75'],['1','Normal'],['1.25','1.25'],['1.5','1.5'],['1.75','1.75'],['2','2']] as [$val,$label])
{{ $label }}
@endforeach
{{-- Autoplay toggle (playlist only) --}} @if($playlist)
Autoplay On
{{-- Shuffle toggle (playlist with >1 video) --}} @if($playlistVideos && $playlistVideos->count() > 1)
Shuffle Off
@endif @endif
{{-- Loop — outside gear, immediately to its right --}} {{-- Picture-in-Picture --}} {{-- Theater mode --}} {{-- Fullscreen --}}
{{-- /right --}}
{{-- /chrome-controls --}}
{{-- /chrome-bottom --}}
{{-- /ytp --}}
{{-- /ytp-wrap --}} @once @endonce @once @endonce