Is there a way to detect if headphones are connected to a mobile device (specifically an iPhone) using Ionic? Our Ionic app plays sound normally without headphones, but encounters issues when headphones are plugged in.
When you start the app without headphones and then plug them in, the app produces a constant buzzing noise. On the other hand, if you begin the app with headphones plugged in, everything sounds fine. However, if you unplug the headphones, the sound does not play from the speakers even though the app indicates that it is playing. It's quite perplexing. Any suggestions?