尝试使用AVPlayer播放媒体网址时,我收到错误代码为-11819的AVPlayerStatusFailed。请指教。
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change: (NSDictionary *)change context:(void *)context
{
if (context == &AVPlayerItemStatusContext) {
AVPlayerItem *playerItem = (AVPlayerItem *)object;
NSInteger status = [playerItem status];
switch (status) {
case AVPlayerStatusFailed:
{
NSError *error = [playerItem error];
NSLog(@"%s %d\n", __FUNCTION__, [error code]);
.....
}
....
}
答案 0 :(得分:0)
我在AVError.h中发现AVFoundation错误代码-11819对应于AVErrorMediaServicesWereReset(“因为媒体服务不可用而无法完成操作”)。