How to play audio file dyamically using ionic?


Hi All,

Please help me to,how to play audio file dynamically using ionic.I tried with html5 it’s not working dynamically.If we hardcoded the source then it’s working.So please help me to play dynamically.



Have you tried the Media class?


Hi vicmota,

I tried like this and also it;s not working.

Play from file system

$scope.playFile = function() {
var src = “http://ipaddress/uploads/audiofile.mp3”;
var media = new Media(src);


Have you tried instead of $; ?