问题描述
我需要实时更改媒体播放器队列,因为我使用了执行队列事务方法,但在某些情况下,即使出现错误,它也不会调用其完成处理程序,我发现其中一种情况是 nowplaying item 为零那个时候它不会调用它的完成处理程序,有没有人遇到同样的问题或找到解决方案?
代码示例
mediaPlayer.perform { (currentQueue) in
//set new queue descrptor
currentQueue.insert(descriptor!,after: mediaPlayer.nowPlayingItem)
} completionHandler: { (newQueue,error) in
//in some casese compltion handler not call,one of such case is when nowplayingitme is nil
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)