I’m having some difficulty getting the HTML5 Audio Tag working on Android. The code below works fine when I run ‘ionic serve.’ However, when I try the same thing on andoid (ionic run android) no audio plays. The only change that allows audio to play on android is if I link to an external link rather than fetch the audio locally.
Now im building music app too… In my app i tryed to use this solution too but and its worked fine. But none of controls are working so i now looking for solution may be ng-media module can help for us.
have a look at GITHUB
Please if you can make it work create a pen at codepen i will appriciate it.
Thank you!
Thanks for getting back @mhartington. My android version is 4.4.4.
What’s odd is that it doesn’t work when I just do ‘ionic run android’, but if I do it with the livereload option on android, it works fine. Any idea of whats going on?
Just curious, any reason why you can’t tried using the Cordova media plugin? I’ve had a lot better luck with that than I have any html5 audio. I feel like I’ve got a greater control and you won’t have to worry about mark down.
@mhartington Just tried that. The path is working fine / it is finding the actual audio file. When the path isn’t working I’m not even able to press the play button. But when the path is working, I can press the play button and it turns into the pause button (indicating that the the audio is supposed to be playing). But nothing plays. Oddly it works when we have the --livereload option. (Image attached)