Post not yet marked as solved
Post marked as unsolved with 0 replies, 380 views
(original question on stack overflow)
Safari requires that a user gesture occurs before the playing of any audio.
However, the user's response to getUserMedia does not appear to count as a user gesture. Or perhaps I have that wrong, maybe there is some way to trigger the playing?
This question ("Why can't JavaScript .play() audio files on iPhone safari?")
details the many attempts to work around the need for a user gesture,
but it seems like Apple has closed most of the loopholes. For whatever
reason, Safari does not consider the IOS acceptance of the camera/mic
usage dialog as a user gesture and there's no way to make camera capture
count as a user gesture.
Is there something I'm missing, is it impossible to play an audio
file after capturing the camera? Or is there someway to respond to the
camera being captured with an audio file?