diff --git a/resources/views/components/video-player.blade.php b/resources/views/components/video-player.blade.php index 4c5cd9f..db4c46b 100644 --- a/resources/views/components/video-player.blade.php +++ b/resources/views/components/video-player.blade.php @@ -1175,6 +1175,7 @@ function navigatePrev() { const url = shuffleOn ? getShuffledPrevUrl() : PREV_URL; if (url) window.location.href = url; } +window._ytpNav = { next: navigateNext, prev: navigatePrev }; video.addEventListener('ended', () => { updatePlayIcon(); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index d243084..69aa1d2 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -789,6 +789,39 @@ border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2); } + + /* ── Playlist controls bar (sidebar, all video types) ── */ + .pl-controls-bar { + display: flex; + align-items: center; + gap: 4px; + margin-bottom: 10px; + padding: 6px 8px; + background: var(--bg-secondary); + border-radius: 8px; + border: 1px solid var(--border-color); + flex-shrink: 0; + } + .pl-ctrl-btn { + display: flex; + align-items: center; + gap: 5px; + background: none; + border: none; + color: var(--text-secondary); + cursor: pointer; + padding: 5px 8px; + border-radius: 6px; + font-size: 15px; + transition: color .15s, background .15s; + white-space: nowrap; + } + .pl-ctrl-btn:hover:not(:disabled) { color: var(--text-primary); background: rgba(255,255,255,.07); } + .pl-ctrl-btn:disabled { opacity: .35; cursor: default; } + .pl-ctrl-btn.pl-ctrl-active { color: var(--brand-red); } + .pl-ctrl-divider { width: 1px; height: 18px; background: var(--border-color); margin: 0 2px; flex-shrink: 0; } + .pl-ctrl-autoplay { margin-left: auto; } + .pl-autoplay-label { font-size: 12px; font-weight: 500; } @yield('extra_styles') diff --git a/resources/views/videos/partials/audio-player.blade.php b/resources/views/videos/partials/audio-player.blade.php index b51c295..e49170d 100644 --- a/resources/views/videos/partials/audio-player.blade.php +++ b/resources/views/videos/partials/audio-player.blade.php @@ -558,7 +558,7 @@ audio.addEventListener('seeked', () => { }); audio.addEventListener('timeupdate', updateProgress); audio.addEventListener('durationchange', () => { timeDur.textContent = fmt(audio.duration); }); -audio.addEventListener('ended', () => { releaseWakeLock(); if (NEXT_URL) window.location.href = NEXT_URL; }); +audio.addEventListener('ended', () => { releaseWakeLock(); if (window._plOnTrackEnd) { window._plOnTrackEnd(); } else if (NEXT_URL) { window.location.href = NEXT_URL; } }); audio.addEventListener('volumechange', updateVolumeIcon); // ── Loop ───────────────────────────────────────────────────── diff --git a/resources/views/videos/types/generic.blade.php b/resources/views/videos/types/generic.blade.php index 8693756..2746ecd 100644 --- a/resources/views/videos/types/generic.blade.php +++ b/resources/views/videos/types/generic.blade.php @@ -441,13 +441,57 @@