Changeset 71e8fa5 in Klonkt for src/assets


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/assets/js
Files:
2 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        } },
Note: See TracChangeset for help on using the changeset viewer.