Changeset 71e8fa5 in Klonkt


Ignore:
Timestamp:
06/20/2026 04:28:31 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
e056e56
Parents:
d43ea3f
Message:

fix(player): YT playlist now plays (listType:'playlist')

loadPlaylist/cuePlaylist received no listType → the list loaded the queue/
title but did not start. listType:'playlist' added to both. busters
audio-player.js?v=24, embed-player.js?v=13.

Co-Authored-By: Claude <noreply@…>

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/assets/js/audio-player.js

    rd43ea3f r71e8fa5  
    419419          if (t.ytList) {
    420420            const idx = t.ytIndex || 0;
    421             if (autoplay) p.loadPlaylist({ list: t.ytList, index: idx }); else p.cuePlaylist({ list: t.ytList, index: idx });
     421            // listType:'playlist' is vereist voor de object-vorm; zonder dit laadt
     422            // (en speelt) de afspeellijst niet betrouwbaar.
     423            if (autoplay) p.loadPlaylist({ listType: 'playlist', list: t.ytList, index: idx });
     424            else p.cuePlaylist({ listType: 'playlist', list: t.ytList, index: idx });
    422425          } else {
    423426            if (autoplay) p.loadVideoById(t.yt); else p.cueVideoById(t.yt);
  • src/assets/js/embed-player.js

    rd43ea3f r71e8fa5  
    402402        host: 'https://www.youtube-nocookie.com', playerVars: { playsinline: 1 },
    403403        events: { onReady: () => {
    404           try { p.cuePlaylist({ list: listId }); } catch (e) {}
     404          try { p.cuePlaylist({ listType: 'playlist', list: listId }); } catch (e) {}
    405405          setTimeout(() => { let ids = []; try { ids = p.getPlaylist() || []; } catch (e) {} finish(ids); }, 2500);
    406406        } },
  • src/views/shell.ejs

    rd43ea3f r71e8fa5  
    300300     ?v=N — cache-buster: bump bij elke audio-player.js wijziging zodat
    301301     Cloudflare (max-age=1y) niet de oude versie blijft serveren. -->
    302 <script src="/assets/js/audio-player.js?v=23"></script>
     302<script src="/assets/js/audio-player.js?v=24"></script>
    303303<!-- Eigen custom media-embeds (YouTube/SoundCloud/Spotify) via de echte
    304304     player-API's + gedeelde mutual-exclusion registry met de site-speler. -->
    305 <script src="/assets/js/embed-player.js?v=12" defer></script>
     305<script src="/assets/js/embed-player.js?v=13" defer></script>
    306306<% if (site && site.enable_audio_player && audioTracks && audioTracks.length > 0) { %>
    307307  <script>window.PCMS_SITE_TRACKS = <%- JSON.stringify(audioTracks) %>;</script>
Note: See TracChangeset for help on using the changeset viewer.