Changeset 33886fb in Klonkt for src/views/shell.ejs


Ignore:
Timestamp:
06/15/2026 03:56:37 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
6117035
Parents:
1f01b99
Message:

fix: site player now also pauses fallback embeds (mutual exclusion both ways)

The registry already handled mutual exclusion for custom players (API loaded),
but fallback iframes (ad-blocker blocks the API) didn't register themselves:
the site player couldn't stop them -> double audio. A cross-origin iframe
can't be paused via API, so we now register the fallback in the registry with
a pause() that reloads the iframe WITHOUT autoplay (= stops it, remains
restartable). Result: starting an embed pauses the site player, and starting
the site player stops the embed. embed-player.js v=3 -> v=4.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/shell.ejs

    r1f01b99 r33886fb  
    314314<!-- Eigen custom media-embeds (YouTube/SoundCloud/Spotify) via de echte
    315315     player-API's + gedeelde mutual-exclusion registry met de site-speler. -->
    316 <script src="/assets/js/embed-player.js?v=3" defer></script>
     316<script src="/assets/js/embed-player.js?v=4" defer></script>
    317317<% if (site && site.enable_audio_player && audioTracks && audioTracks.length > 0) { %>
    318318  <script>window.PCMS_SITE_TRACKS = <%- JSON.stringify(audioTracks) %>;</script>
Note: See TracChangeset for help on using the changeset viewer.