Hi, Zeroqode team.
In my Bubble SPA that uses the Advanced Audio Player (AAP) plugin, I can’t clear the first playlist that loads: after the first album (Album A) is opened, every other album page still plays track #1 of Album A. I need a way to reset / overwrite the playlist so each album plays its own songs.
What I want AAP to do
- When the user presses the Play / Pause button on an album page, load that album’s
songs
list into AAP and start from track #1. - If the button is pressed again on the same page, pause / resume playback.
- If the user moves to a different album page and presses Play, the first track of the new album should start (the previous album must not continue).
Issue to solve
Symptom
- Album A (first page loaded) plays correctly.
- On Album B page, pressing Play still starts track #1 of Album A.
- Any subsequent album page also plays track #1 of Album A.
Things I already tried
- Updating
playingAlbum
/playingList
custom states – debugger shows the states DO update. -
Reset data
on the FloatingGroup that contains AAP, adding a small pause (50 ms) – no effect. - Using AAP’s “Audio Ready To Play” trigger – no effect.
- Observed JS console error (
TypeError: Cannot read properties of undefined
) when AAP tries to “Play from index” before any list is loaded.
Example WF configuration
Target element: “Play / Pause” button on the album page (see screenshot)
-
Element Event
2.Button Play / Pause is clicked*
-
Only when
index's playingAlbum is not Parent group's Album
-
Step 1 – Reset
[FloatingGroup] Audio bar
- Step 2 – Add a pause before next action (50 ms)
-
Step 3 – Set states
playingAlbum…
of index -
Step 4 – Set states
playingList…
of index - Step 5 – Load audio Audioplayer A
- Step 6 – Play from index Audioplayer A
From what I can see, the custom states change, but AAP keeps the first playlist in memory.
Is this a caching / reset limitation of the plugin, or something wrong with my SPA workflow?
Any guidance to properly clear / overwrite the playlist—or a confirmed workaround—would be greatly appreciated.