i'm trying to play sound in mobile hybrid app (cordova, ionic, howlerJS v 2), http://ift.tt/1I5DJEb
By this way:
$scope.playSelectedItem = function(index) {
try {
var fileName = $scope.selectedSounds[index].file;
var filePath = "sounds/" +fileName+".mp3";
console.log(filePath);
var sound = new Howl({
src: [filePath]
});
sound.play();
} catch(e) {
$scope.showAlert();
}
};
In Chrome mobile emulator everything works fine, but on device is sound not playing. I checked app permissions in manifest.xml and for sound playing is not required any special permissions.
What i'm doing wrong?
Thanks for any help.
Aucun commentaire:
Enregistrer un commentaire