媒体播放器执行队列事务不起作用

问题描述

我需要实时更改媒体播放器队列,因为我使用了执行队列事务方法,但在某些情况下,即使出现错误,它也不会调用其完成处理程序,我发现其中一种情况是 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 (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...