尝试使用 AVPlayer 播放媒体 url 时,我收到 AVPlayerStatusFailed 错误代码 -11819。请指教。
- (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]);
.....
}
....
}