iOS 音乐播放界面卡顿


MPNowPlayingInfoCenter

在获取播放器播放时长的时候 通过AVURLAsset 获取时如果传入URL为空不会崩溃但会导致页面卡顿


AVURLAsset *audioAsset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString: url ] options: nil ];
这里的   url 如果传的不对 在iOS11 上会引起应用页面卡顿
CMTime audioDuration = audioAsset.duration;   

float audioDurationSeconds = CMTimeGetSeconds(audioDuratio)



你可能感兴趣的:(移动开发)