Huh, Safari continuing to be difficult it seems. I wonder if it could be that the sounds in Kerkerkruip only start after a timer? Does anyone know or any other Glulx games that have autoplaying music?
Transparent beeps at startup.
Maybe this one? Light My Way Home
Iām trying the Safari options on Browserstack, and itās pretty inconsistent:
macOS | Safari version | Kerkerkruip | Transparent |
---|---|---|---|
Sequoia | 18.0 | Sometimes | Yes |
Sonoma | 17.3 | Sometimes | Yes |
Ventura | 16.5 | Usually | Yes |
Monterey | 15.6 | No | No |
Even more concerningly, sometimes after you press play it doesnāt finish loading. But I never saw anything in the JS console. Iām not sure how much of this might be the Browserstack system being quirky.
On Chrome 128.0.6613.138; macOS 10.15 (Catalina)
Kerkerkruip with autoplay:
- (1st time) music plays automatically after selecting ānoā to screenreader
- (subsequent loads) plays only after turning off music and turning it back on
without:
- music plays automatically after clicking the āplayā button
In my testing on Sequoia (15.1.1, Safari 18.1.1) Transparent always works as intended, but Kerkerkruip never does. This seems like some kind of Safari bug that should be reported to Apple.
EDIT: It also seems likely that the long delay until Kerkerkruip starts playing music has something to do with it.
Yeah I bet itās that because the music only plays after 100 timer events that it thinks the music is no longer caused by the player clicking. Itās like how an ad shouldnāt be able to play music just because you interact with another part of the page.
Would it make sense for the interpreter to play a small quiet āfeepā when the player hits the start button? To prime the sound system for later game audio.
I have seen others on the net write about that strategy. I can try it for sure, but on the other hand Iām not sure it would help if the reason the sounds arenāt playing is that Kerkerkruipās music is too disconnected from the play button. I could also try moving the creation of the AudioContext
until after the play button is pressed.
Wouldnāt it help in that exact situation, since pressing the play button causes the first audio to sound?
I tried simply moving when the AudioContext
is created until after the play button, and itās now working in Sonoma and Sequoia!
macOS | Safari version | Kerkerkruip | Transparent |
---|---|---|---|
Sequoia | 18.0 | Yes | Yes |
Sonoma | 17.3 | Yes | Yes |
Ventura | 16.5 | Usually | Yes |
Monterey | 15.6 | No | No |
How in commonly used is Monterey now? The stats I can find say everyone uses Catalina, oh yeah thereās a note saying future versions just say theyāre Catalina, so thatās not much help for us. What Iām asking is should I bother trying the priming approach, or is this good enough?
Well I tried some simple priming, and it sometimes now works in Monterey! (Though weirdly Transparent still doesnāt?) In Browserstack on Monterey it doesnāt always work, but also sometimes it doesnāt start at all, or the animation is super choppy or freezes. If anyone has a real device still on Monterey Iād be interested in hearing how it goes, but I think Iāll call it here. Priming is definitely the way to go, and it seems to work consistently from Ventura onwards now.
macOS | Safari version | Kerkerkruip | Transparent |
---|---|---|---|
Sequoia | 18.0 | Yes | Yes |
Sonoma | 17.3 | Yes | Yes |
Ventura | 16.5 | Yes | Yes |
Monterey | 15.6 | Sometimes | No |
I donāt have a way to test Monterey right now, but I have a machine running macOS Big Sur 11.7.10 and Safari 16.3. For what it is worth, none of the games make any sound on that machine, except that the Kerkerkruip music starts playing if I switch it off and on again.
At least that tells us things used to be worse.
Hmm. So Big Sur is the version before Monterey, but your Safari is newer than Browserstackās Safari on Monterey. I donāt know which would matter more, but Iād expect itās probably the Safari version. Does 16.3 vs 16.5 really make the difference?
Does it at least work on your Sequoia machine? For an issue like this where weāre dealing with hidden heuristics without even any kind of errors to detect (just function calls that have no effect) I think Iām satisfied with fixing it for the newest couple of versions.
Yes, on the Sequoia machine everything works as it should now.
I wouldnāt bet on that the Safari version matters more than the OS. I really donāt know anything about this, but it is entirely possible that Safari is using system-specific Webkit libraries on macOS.
Safari updates with MacOS. Itās not a separate update.
Iāve merged the testing branch into master, and so these updates are now live on iplayif.com! Hello sound support, goodbye Quixe and ZVM (for the moment at least.)
Iāve also uploaded the Inform 7 and single file distributions to the releases page.
Note that audio is not yet ready in the Inform 7 template.