Open Majea opened 1 year ago
Actually, I wonder if it's not linked to another usability issue. Let's say I have Mood X setup on Scenes A and B. I activate A and mood X starts. If I change to Scene B, X still plays. All good. But then I decide to start mood Y (eg. a battle version of X). When I switch back to Scene A, it's still Y playing although I would expect X to start.
to summarise: Scene A: Mood X Scene B: Mood X
user activities:
That one was intended behaviour.
During module initialization the SyrinControl does not know if there is already playing mood or not, or if already playing mood has been initiated by the module before refresh. Therefore always it "grabs the control" over Syrinscape by clearing its state.
Now, technically I could just make an API request to Syrinscape during initialization "Hey, what is currently playing?". But even tho I get the response "Mood XYZ is currently playing" I lack the context - Was it because a token is in Ambient Sound field of effect, or perhaps GM clicked "Play mood" manually?
That sounds silly but current design is based on the idea, that Ambient Sounds have higher priority over the Playlist moods. Otherwise I'm not sure how I can proceed. But that means, I need to know if currently playing mood is Ambient or not. And that information is currently lost during F5.
So that gives us another solution - what if I simply store in local storage current state and preserve it during the F5? That could work, right?
Well, yes - but only if we assume that between one session (before F5) and a new one (after F5), you didn't change the mood by using other control panels, for example, native syrinscape app.
That however, could be a good compromise. Persist storage, then fetch new state from API - if the state is equal what was playing the last time - do nothing, just use saved state, otherwise assume its not Ambient Sound but playlist, and show new currently playing mood on sidebar.
For now, I will remove the bug
label and make it an enhancement since it was designed to stop the mood.
Describe the bug
In Syrinscape control 0.4.0-beta2, when you refresh a page where a scene plays a syrinscape mood is being played, the mood stops playing.
To Reproduce
Expected behavior
The syrinscape mood keeps playing.
Logs