I have some audio files which are in amr format, which I cant convert to any other format, Is there any way to play this files in IOS using swift(AVFoundation)?
I tried this code
var audioPlaying = AVAudioPlayer()
audioPlaying = AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath:
NSBundle.mainBundle().pathForResource("music", ofType: "mp3")!), error: nil)
audioPlaying.play()
but when I use the "amr" in ofType:, getting an error which file not exist.
Aucun commentaire:
Enregistrer un commentaire