I’m in the process of building an Ionic app that plays a Shoutcast stream for a radio station. I’m using an HTML 5 audio player to play the stream which is working great pretty much everywhere except on an actual iOS device. When I build the app to an iPhone, I cannot hear any audio from the player.
The audio works fine in Chrome, Safari, Android phones, and even Xcode simulator, but when I build to an iPhone I can’t hear any audio. Is there any secret for getting an HTML 5 audio player to stream on an iPhone? Below is how I’m declaring the player in the controller.
var vm = this;
vm.player = new Audio(‘http://xxxxxxxxxxx:8598/;stream.mp3’);
I wanted to make sure that it wasn’t something else in my app that was stopping the audio from playing, so I built a bare-bones Ionic app with just the player and one button. I was still able to hear the audio everywhere else except the iPhone device, so I’m pretty sure that it’s an issue with the player itself. I also checked the volume on the iPhone and tested on more than one device. Any help is appreciated!