3 ms·
Very, very cool! Little bit of feedback: it only plays when the tab has focus - is that a browser thing, or something could theoretically be overridden? EDIT:
by vanderZwan 8y ago
Very, very cool!
Little bit of feedback: it only plays when the tab has focus - is that a browser thing, or something could theoretically be overridden?
EDIT: Opening the tab in a separate window keeps the sound running even when alt-tabbing away
EDIT2: The interactive cook book environment are missing a previous and next link at the top/end of each chapter, clicking back and finding which chapter is next is a little bit tedious.
- pierrec 8y agoThanks for the feedback! I roughly added some previous and next links as you suggested. As for playing audio from a background tab, I believe browsers actually allow it, but for some reason, audio played though emscripten's APIs seems to stutter or stop when the tab is backgrounded. It might not be hard to fix, but I haven't really looked into it.
- hutzlibu 8y ago" is that a browser thing" Unfortunately and thanks to many misusing auto-playing ads - it is. Sounds can only start playing if the tab is the active one.
- vanderZwan 8y agoAh yes, that does sound like a very valid reason to turn that off. At least the open-in-separate-window trick works around it.
- pierrec 8y agoAs you point out, sounds can only start in foreground tabs, but the glitch here is that already-running audio is getting stopped when the user switches to another tab. So it's a bug in my code!