iOS - Recording audio without playing it back breaks HTML5 sound
Bug Report
Problem
Recording audio without playing it back breaks WebView audio playback on iOS
What is expected to happen?
On iOS after recording audio without playing it back it should be possible to play HTML5 video/audio with sound.
What does actually happen?
There is no sound when playing HTML5 video/audio after starting an audio record without playing it back
Information
When you start a record the AVAudioSessionCategory ist set to AVAudioSessionCategoryRecord
When you then try to play a HTML audio/video Element it will not have sound as AVAudioSessionCategoryRecord does not allow audio output.
When the Cordova Media record is played back AVAudioSessionCategoryPlayback ist set and HTML5 audio will work again.
Environment, Platform, Device
iOS
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
I there, I have the same issue while being in an active IOSRTC call, I start a call with someone, I start a recording of my voice, I stop the record, all good I get a proper recording but the communication between the two peers is lost directly after pressing stop. Is there anything related to what @jakob-p is relating ? What can we do to prevent web layer to stop audio?
I tried to playback the current record as well but it doesn't help in my case
Found this patch, trying it right now https://stackoverflow.com/questions/31881565/cordova-media-plugin-breaks-html5-audio-tag-on-ios