Changeset 9b36f45 in Klonkt for src/assets/js/audio-player.js
- Timestamp:
- 06/14/2026 02:40:35 AM (3 months ago)
- Branches:
- main
- Children:
- 942028f
- Parents:
- b5bae24
- File:
-
- 1 edited
-
src/assets/js/audio-player.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/js/audio-player.js
rb5bae24 r9b36f45 323 323 } 324 324 325 // True when the viewport is in the mobile sheet-layout — matches the CSS 326 // breakpoint where .audio-sheet slides up full-width from the bottom 327 // (@media max-width:719.98px). On wider/desktop widths the sheet is a centered 328 // panel, so we do NOT auto-open it there. 329 function isMobileView() { 330 return window.matchMedia('(max-width: 719.98px)').matches; 331 } 332 325 333 function setQueue(tracks, startIdx, opts) { 326 334 queue = Array.isArray(tracks) ? tracks.slice() : []; … … 328 336 if (!queue.length) return; 329 337 loadTrack(typeof startIdx === 'number' ? Math.max(0, Math.min(startIdx, queue.length - 1)) : 0, true); 338 // Mobile: a track press from an album/playlist auto-opens the full 339 // now-playing sheet (Spotify-style) i.p.v. alleen de dunne mini-strip. 340 // Alleen hier (setQueue = een verse, door-de-gebruiker-gestarte queue) — 341 // niet bij next/prev of de site-pre-seed — zodat een sheet die de gebruiker 342 // bewust sloot niet vanzelf terugkomt. 343 if (isMobileView()) openSheet(); 330 344 } 331 345
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)