mattdiamond / Recorderjs

A plugin for recording/exporting the output of Web Audio API nodes
4.18k stars 1.46k forks source link

After using microphone, <audio> playback is not emitted through the loudspeaker on iOS Safari #203

Open cjsio opened 4 years ago

cjsio commented 4 years ago

The recording process works as intended on iOS 12 and iOS 13, but when playing an mp3 or wav from an <audio> (or even playing a file with a <video> element), the iPhone's internal speaker is used for speaker playback instead of the loudspeaker. This only happens after initiating/using getUserMedia(), and if the microphone is not initiated/used, then the audio playback properly uses the loudspeaker located on the front of the phone. Does anyone know why this occurs and/or how it can be circumvented to allow speaker playback through the front-facing loudspeaker after calling getUserMedia() instead of being limited to the forced bottom-facing internal speaker?