问题描述
此功能有效,但现在不起作用
func playCurrentTrack() {
let url = urlLoad[currentPlayIndex]
print("playing \(url)")
do {
self.player = try AVAudioPlayer(contentsOf: url as URL)
player!.delegate = self
player!.preparetoPlay()
player!.volume = 0.5
player!.play()
} catch let error as NSError {
//self.player = nil
print(error.localizedDescription)
} catch {
print("AVAudioPlayer init Failed")
}
}
我不知道这个问题是怎么发生的。请指导我
--编辑现在可以工作,因为我忘记了更改ID令牌--
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)