1

iPad、iPhone で HLS ライブ ストリーミングを再生しています。時々、突然プレーヤーが黒くなり、次のエラーが表示されます

_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 operationAn unknown error occurredます。

ムービー プレーヤーは、AppDelegatedidFinishLaunchingWithOptionsメソッドで次のように宣言されます。

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;
}

何が起こっているのか知っている人はいますか?ありがとうございました。

4

1 に答える 1

1

もう少し情報が必要です。ストリーミング中にサーバーがシャットダウンしている可能性がありますか? ストリーミングを提供するために何を使用していますか? NGINX? ライブストリーミングを再生するには、ユーザー PLPlayerKit をお勧めします

于 2015-10-07T19:40:17.373 に答える