如果在锁屏中暂停播放一段时间,resume() 不起作用

resume() does not work if playback was paused for some time in lockscreen

提问人:Prashanth Patil 提问时间:12/29/2017 最后编辑:Sangram ShivankarPrashanth Patil 更新时间:12/29/2017 访问量:186

问:

AVPlayer 在播放流时通知 AVPlayerItemFailedToPlayToEndTimeNotification。我使用以下代码并打印错误详细信息:

NSError *error = notification.userInfo[AVPlayerItemFailedToPlayToEndTimeErrorKey];
NSLog(@"itemFailedToPlayMPMovieFinishReasonPlaybackError=%@" ,error);

错误详细信息:

1. Error Domain=AVFoundationErrorDomain Code=-11853 "Stream has no valid 
alternates" UserInfo={NSLocalizedFailureReason=This data is damaged, incomplete,
 or incompatible., NSLocalizedDescription=Cannot Parse, 
NSDebugDescription=Stream has no valid alternates, NSUnderlyingError=0x155aa070 
{Error Domain=CoreMediaErrorDomain Code=-12880 "Can not proceed after removing 
variant" UserInfo={NSDescription=Can not proceed after removing variant}}}

2. Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the 
server." UserInfo={NSUnderlyingError=0x137d39380 {Error 
Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo=
{NSErrorPeerAddressKey={length = 16, capacity = 16, bytes = 
0x100201bb341a9f540000000000000000}, _kCFStreamErrorCodeKey=-2200, 
_kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=[FILTERED], 
NSErrorFailingURLKey=[FILTERED], _kCFStreamErrorDomainKey=4, 
_kCFStreamErrorCodeKey=-2200, NSLocalizedDescription=Could not connect to the 
server.}

而错误只发生在IOS上。而且我没有找到代码=-11853

我的问题:
1.这个错误的原因是什么?
2.如何解决?

谢谢

IOS 的Objective-C iPhone iOS7 AVFonfoundation

评论

0赞 Prashanth Patil 12/29/2017
预期结果:解锁设备后,我需要继续视频停止,但它失败了,并且收到错误消息。如果有人知道这个问题,请帮助我。

答: 暂无答案