[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Pause visualiser when window is hidden

Kasper (Oct 3, 2025, 1:45 AM +0200) 61cf6ca7 66931ede

+17 -1
+17 -1
src/lib/visualizer/Visualizer.svelte
··· 306 306 schedule_resize(next_vis, true) 307 307 } 308 308 next_vis.toy.set_buffer_a({ source: shaders[new_shader_index].shader }) 309 - next_vis.toy.play() 309 + if (!document.hidden) { 310 + next_vis.toy.play() 311 + } 310 312 311 313 const duration = auto ? 2000 : 300 312 314 ··· 411 413 on:resize={() => { 412 414 for (const vis of visualisers) { 413 415 schedule_resize(vis) 416 + } 417 + }} 418 + /> 419 + 420 + <svelte:document 421 + on:visibilitychange={() => { 422 + if (document.hidden) { 423 + next_vis.toy?.pause() 424 + main_vis.toy?.pause() 425 + } else { 426 + main_vis.toy?.play() 427 + if (transition) { 428 + next_vis.toy?.play() 429 + } 414 430 } 415 431 }} 416 432 />