【问题标题】:App crashes in IOS 9 at AVPlayer TimeControlstatus应用程序在 IOS 9 中的 AVPlayer TimeControlstatus 崩溃
【发布时间】:2017-02-13 03:10:32
【问题描述】:

我的应用在 iOS 10 中运行,但在下面一行崩溃

ViewModel.IsPlaying = (player.TimeControlStatus == AVPlayerTimeControlStatus.Playing
                || player.TimeControlStatus == AVPlayerTimeControlStatus.WaitingToPlayAtSpecifiedRate);

有错误

-[AVPlayer timeControlStatus]: unrecognized selector sent to instance 0x16fc83f0 发生未处理的异常。

iOS 10 以下发生这种情况,请帮忙

【问题讨论】:

    标签: xamarin.ios crash avplayer


    【解决方案1】:

    答案是timeControlStatus 仅在 iOS 10 开始可用。

    正如Kris 提到的,以下情况似乎非常相似:

    (player.timeControlStatus == .playing) == (player.rate != 0.0)
    

    【讨论】:

    • 我目前正在使用 player.rate 并且工作正常
    猜你喜欢
    • 2015-12-29
    • 1970-01-01
    • 1970-01-01
    • 2016-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-28
    • 1970-01-01
    相关资源
    最近更新 更多