Hi!
Right now, if you have audio autoplay enabled in Tsurukame, but your iOS system-wide mute switch is on (either via Control Center or physical switch), it will still autoplay voice clips.
It strikes me that a common iOS usecase is "I generally always want to autoplay WK audio clips, but I might be working through flashcards in public, in which case I temporarily don't want audio playing". The way iOS users would typically signal that intent is with the systemwide mute switch, rather than having to manually untoggle audio in Tsurukame / on a per-app basis.
This would be a one-line fix. Switching the AVAudioSession type from .playback to e.g. .ambient at https://github.com/davidsansome/tsurukame/blob/master/ios/Audio.swift#L45 would give the desired behavior (audio plays while either headphones are in or using the built-in speaker with the OS-level mute switch disabled). .playback is intended for media playback apps (e.g. YouTube, Spotify) where using the app without audio simply doesn't make any sense.
I'm more than happy to open a PR, but figured I'd open an Issue first since this is more of a UX question than a strict "bug", even if I personally think this is a cut-and-dry case of "what iOS users expect and what the Apple HIG dictates".
Hi!
Right now, if you have audio autoplay enabled in Tsurukame, but your iOS system-wide mute switch is on (either via Control Center or physical switch), it will still autoplay voice clips.
It strikes me that a common iOS usecase is "I generally always want to autoplay WK audio clips, but I might be working through flashcards in public, in which case I temporarily don't want audio playing". The way iOS users would typically signal that intent is with the systemwide mute switch, rather than having to manually untoggle audio in Tsurukame / on a per-app basis.
This would be a one-line fix. Switching the AVAudioSession type from
.playbackto e.g..ambientat https://github.com/davidsansome/tsurukame/blob/master/ios/Audio.swift#L45 would give the desired behavior (audio plays while either headphones are in or using the built-in speaker with the OS-level mute switch disabled)..playbackis intended for media playback apps (e.g. YouTube, Spotify) where using the app without audio simply doesn't make any sense.I'm more than happy to open a PR, but figured I'd open an Issue first since this is more of a UX question than a strict "bug", even if I personally think this is a cut-and-dry case of "what iOS users expect and what the Apple HIG dictates".