[E] Music Editor preview can end up playing indefinitely.

Post about any bugs or other issues that you find on AAO.

Moderator: EN - Forum Moderators

Post Reply
User avatar
TimeAxis
Posts: 389
Joined: Fri Jan 01, 2021 8:27 pm
Spoken languages: English
Contact:

[E] Music Editor preview can end up playing indefinitely.

Post by TimeAxis »

User Agent String: Windows 10, tested on Firefox and Chrome
Link: Any trial
What happened?: In the "Music Editor" window, the audio preview can sometimes get stuck playing forever. The only way to stop it is to save or refresh the page. This does not happen with the normal music list's previews, only the one in the Music Editor.
What did you expect to happen?: Closing the music list, even if the mouse isn't moved away from the speaker icon, should stop the preview playback, just like it does in the normal music list.
Can you reproduce the problem?: Yes.
What did you do before the problem showed up?: Mousing over the music preview in the Music Editor and then clicking to close the list without moving your mouse away from the icon should reproduce this problem every time.
Image
Question Arcs (Threads Coming Eventually)
ImageImageImageImage
Gaiden Episodes
Champion of Turnabouts ★
HALLOWEEN HERO
Other
Phoenix Wright: Ace Attornauts
The Curious Case of the Phantom Limousine (Coming Eventually)
The Imposter's Turnabout (Coming Maybe)
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [E] Music Editor preview can end up playing indefinitely.

Post by Unas »

More generally, I think there is a small issue in the updates to use SoundHowler, related to the order of events.
And it's probably been worsened a little bit by the latest bugfixes I just loaded :-P

Typically, what I just noticed while trying out the editor after the update is that if I hover a preview icon, but remove my mouse cursor before the music has actually started, then the music will start even though my mouse is no longer here. And the only way to stop it is to reopen a music selector, go to the same music's preview box, and hover it (causing restart) then unhover it (causing stop).

My understanding is that "mouseover" event causes starting to load, and with the latest changes "load" event causes starting to play... But "mouseout" does not cancel the registered event handler for the "load" event, and the event handler does not perform any check to know if it actually still should start playing.

For this specific case, a simple fix would probably be inside the "load" event handler to check if the container still has the "playing" class. If it no longer has it, then it means the "mouseout" event has already been triggered and the playing should be canceled.


As always, I don't really have time to work on a fix myself, but I figured I'd just give a pointer here :-)

(I'm not completely sure it's the exact same issue you are experiencing though - in my case it does stop fine if I go back to the menu and hover/unhover it again. And it happens in all music lists.)
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
Enthalpy
Community Manager
Posts: 5169
Joined: Wed Jan 04, 2012 4:40 am
Gender: Male
Spoken languages: English, limited Spanish

Re: [E] Music Editor preview can end up playing indefinitely.

Post by Enthalpy »

Thanks for the advice! I'll give this a look and try to upload a fix.

Sadly, this report came to my attention after I emailed you saying we were good to update.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson
Post Reply