0eee2eedf31d64395185e8e01e974f9438da4e9a
The boolean flag was set by onended before goto() resolved, causing the still-mounted outgoing chapter's AudioPlayer $effect to fire and call startPlayback() for the wrong (old) chapter — restarting it from scratch. Replace with autoStartChapter (number | null): the AudioPlayer only acts when its own chapter prop === autoStartChapter, so the outgoing component never matches and the incoming one fires exactly once on mount.
Description
No description provided