sugarcube-3
sugarcube-3 copied to clipboard
Audio subsystem should be stateful
The audio subsystem—the SimpleAudio
API and backing browser APIs—currently integrate neither the current audio configuration nor current playback state into play sessions—meaning neither page reloads nor save loads may restore the audio state.
This requires authors to either accept that audio may briefly stop playing after a page/save load or add extra code to ensure their audio is restored after such.
It would be better if the audio subsystem could handle this automatically for authors.
Issues
- How navigating the history should affect playback state is not entirely clear.
- It's possible to use the
SimpleAudio
API to create state that cannot be serialized correctly. Unfortunately, nothing can be done about this save noting the instances within the documentation—that no one will read. - Not an issue for v3. ~~There is the potential to break existing code—likelihood in cases where authors have added their own restoration code.~~