xamarin.ios - IOS 9中的AVPlayer TimeControlstatus应用程序崩溃

标签 xamarin.ios crash avplayer

我的应用程序可在iOS 10中运行,但在以下行崩溃

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

有错误

-[AVPlayer timeControlStatus]: unrecognized selector sent to instance 0x16fc83f0 An unhandled exception occured.



这是在iOS 10以下发生的情况,请帮助

最佳答案

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

正如Kris所述,以下条件似乎非常相似:

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

关于xamarin.ios - IOS 9中的AVPlayer TimeControlstatus应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42180457/

相关文章:

xamarin - 示例 Xamarin 应用程序在 iPhone 模拟器上崩溃

image - 使用 mvvmcross 和 mono 选择图像时出现问题

swift - addPeriodicTimeObserver swift CMTIME

c# - 在 MVVMCross 中将对象传递到 "navigated to" View 模型的最佳方法是什么?

c# - 在 xamarin iOS 中 - 在 UITableViewCell 中获取 [indexPath.Row],使用按钮单击事件

c++ - 创建崩溃日志

android - 在Android中从一种方法切换到另一种方法时,应用程序崩溃

java - 如何在非 Activity 类中使用 Activity 方法?当我尝试使用上下文时我的程序崩溃

ios - 如何在 UIView swift 中播放视频?

ios - 如何使用 AVPlayer 从数组中选择后播放下一首轨道