1
我在iPad,iPhone上玩HLS直播。有時,突然玩家變黑,我得到以下錯誤HLS隨機發生故障,並在iOS上使用MPMoviePlayer黑色
_itemFailedToPlayToEnd: {
AVPlayerItemFailedToPlayToEndTimeErrorKey = "Error Domain=AVFoundationErrorDomain Code=-11800 \"No se ha podido completar la operaci\U00f3n\" UserInfo=0x15a50740 {NSLocalizedDescription=No se ha podido completar la operaci\U00f3n, NSUnderlyingError=0x1467e9e0 \"The operation couldn\U2019t be completed. (OSStatus error -12312.)\", NSLocalizedFailureReason=Se ha producido un error desconocido (-12312)}";
}
對不起西班牙語句子。他們的意思是Could not complete operation
和An unknown error occurred
。
電影播放,在AppDelegate didFinishLaunchingWithOptions
方法聲明如下:
self.videoplayer = [[MPMoviePlayerController alloc] init];
self.videoplayer.movieSourceType = MPMovieSourceTypeStreaming;
配置玩家要扮演如下進行:
-(void) configureAndPlayPlayer:(NSURL *)contentURL
{
AppDelegate * app = (AppDelegate *)[UIApplication sharedApplication].delegate;
[app.videoplayer.view removeFromSuperview];
[self.view addSubview:app.videoplayer.view];
[self videoPlayerFrame];
[app.videoplayer stop];
app.videoplayer.contentURL = contentURL;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
app.videoplayer.view.center = self.view.center;
[self videoPlayerFrame];
CGRect frame = app.videoplayer.view.frame;
frame.origin.y = 0;
frame.origin.x = 0;
app.videoplayer.view.frame = frame;
}
[app.videoplayer setScalingMode:MPMovieScalingModeAspectFit];
[app.videoplayer play];
app.eventPlaying = self.eventPlaying;
app.catchupPlaying = (self.isCatchup) ? YES : NO;
}
有誰知道可能會發生?謝謝。
嗨!對不起,來晚了。我們終於發現了這個問題,它與服務器中的播放列表緩存有關。一旦我們刪除它,問題就消失了。非常感謝您的回覆! –