Browsing index pages (3 articles)
↧
AVAudioPlayer not playing the MP3
I need to reproduce an MP3 file and I'm using this code:import AVFoundationvar player: AVAudioPlayer?@IBAction func playSound(sender: UIButton) { //Making the phone vibrate...
View ArticleAnswer by Masoud Dadashi for AVAudioPlayer not playing the MP3
this piece of code worked for me finefunc playAudio(){ let audioUrl = URL(fileURLWithPath: value, relativeTo: someBasePath) do{ try...
View ArticleAnswer by Francesco for AVAudioPlayer not playing the MP3
I've solved.Everything was not working just because I was reproducing this code in a background queue.Moving it to the main queue just solved the problem.
View Article
Browsing index pages (3 articles)