iOS デバイス用のビデオをストリーミングするサーバーを MAC OS X に実装しようとしています。
サーバー側では、CocoaHTTPServer を使用して .mp4 ビデオを返します。
- (HTTPFileResponse*)video:(NSString*)pPath
{
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:pPath];
HTTPFileResponse *fileResponse = nil;
if (fileExists && [self isVideo:pPath])
{
fileResponse = [[HTTPFileResponse alloc] initWithFilePath:pPath forConnection:self];
}
return fileResponse;
}
クライアント側では、MPMoviePlayerController を使用してビデオを読み取ります。
ビデオを読み込もうとすると、次のエラーが表示されます。
MPMovieFinishReasonPlaybackError.error : Error Domain=MediaPlayerErrorDomain Code=-11828 "Cannot Open" UserInfo=0xb92ca80 {NSLocalizedDescription=Cannot Open}"