【问题标题】:Move to Previous AVPlayerItem AVQueuePlayer移动到上一个 AVPlayerItem AVQueuePlayer
【发布时间】:2012-10-09 15:59:27
【问题描述】:

试图允许用户在 AVQueuePlayer 中向后跳过,同时保留原始 AVQueuePlayer 集合。例如,用户按两次后退按钮并从以前的位置继续收听。引用此Skip to Previous AVPlayerItem on AVQueuePlayer / Play selected Item from queue - 似乎从队列中转储所有项目并仅播放指定项目。无需每次都重新初始化/填充队列,有没有办法跳过并让队列恢复其流程完成?

谢谢

【问题讨论】:

    标签: ios5 avplayer avqueueplayer


    【解决方案1】:

    没有。 Apple's documentation explains 当前进到下一个项目时,AVQueuePlayer 从队列中删除当前项目。鉴于只有 -insertItem:afterItem:,如果不转储和重建队列,就无法在当前项目之前重新插入项目。

    【讨论】:

    • 还应该注意removeAllItems 是相当错误的。这样做并插入两个新项目时,它会尝试播放第一个项目,但会直接播放第二个项目。通过 KVO currentItem、iOS 6.0.2 观察到的行为。
    猜你喜欢
    • 1970-01-01
    • 2011-06-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多