Changeset 16b0c00 in Klonkt
- Timestamp:
- 06/20/2026 02:52:15 AM (3 months ago)
- Branches:
- main
- Children:
- 2873b30
- Parents:
- 5f47671
- Location:
- src
- Files:
-
- 3 edited
-
assets/js/embed-player.js (modified) (1 diff)
-
server.js (modified) (2 diffs)
-
views/shell.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/js/embed-player.js
r5f47671 r16b0c00 101 101 }; 102 102 loadScript('https://open.spotify.com/embed/iframe-api/v1').catch(reject); 103 setTimeout(() => reject(new Error('Spotify API timeout')), API_TIMEOUT); 103 // Korter dan API_TIMEOUT: Spotify's bundle initialiseert snel óf helemaal 104 // niet (CDN 503 / origin-gating). Niet 8s wachten vóór de iframe-fallback. 105 setTimeout(() => reject(new Error('Spotify API timeout')), 4000); 104 106 }); 105 107 return scripts.sp; -
src/server.js
r5f47671 r16b0c00 93 93 "https://s.ytimg.com", // YouTube player-assets 94 94 "https://w.soundcloud.com", // SoundCloud Widget API (api.js) 95 "https://open.spotify.com", // Spotify iFrame API 95 "https://open.spotify.com", // Spotify iFrame API (loader) 96 "https://*.spotifycdn.com", // Spotify iFrame API (echte bundle: embed-cdn.spotifycdn.com) 96 97 ], 97 98 // Helmet's default zet script-src-attr op 'none', wat ALLE inline event- … … 103 104 styleSrc: ["'self'", "'unsafe-inline'"], 104 105 imgSrc: ["'self'", "data:", "https:"], 105 connectSrc: ["'self'", "wss:", "ws:" ],106 connectSrc: ["'self'", "wss:", "ws:", "https://*.spotifycdn.com", "https://*.scdn.co"], 106 107 // blob: is required for the audio player — it fetch()es track bytes and 107 108 // plays from a blob: object URL (Spotify-style). Without blob: here the -
src/views/shell.ejs
r5f47671 r16b0c00 303 303 <!-- Eigen custom media-embeds (YouTube/SoundCloud/Spotify) via de echte 304 304 player-API's + gedeelde mutual-exclusion registry met de site-speler. --> 305 <script src="/assets/js/embed-player.js?v= 4" defer></script>305 <script src="/assets/js/embed-player.js?v=5" defer></script> 306 306 <% if (site && site.enable_audio_player && audioTracks && audioTracks.length > 0) { %> 307 307 <script>window.PCMS_SITE_TRACKS = <%- JSON.stringify(audioTracks) %>;</script>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)