7
HLS Protocol
을 지원하는 iOS
에서 재생해야하는 .m3u8
링크가 있습니다.iOS에서 .m3u8 파일 재생
URL을 MPMoviePlayerController
에 직접 지정하고 재생하면 동영상이 보이지 않지만 오디오를들을 수 있습니다.
NSURL *movieURL = [NSURL URLWithString:@"http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8"];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[self.view addSubview:self.moviePlayer.view];
if (mp)
{
// save the movie player object
self.moviePlayer = mp;
[self.moviePlayer setFullscreen:YES];
// Play the movie!
[self.moviePlayer play];
}
iOS
쪽을 어떻게 처리해야합니까?
제 할당 'self.moviePlayer = MP,'전체 화면으로 설정하여 '[self.moviePlayer setFullscreen : YES]'와 MPMoviePlayerController보기위한 코드가 화면에 추가된다? – iCoder
@iCoder : 사용자 의견에 따라 코드를 편집했지만 여전히 운이 없습니다. –
답변을 확인하십시오! – iCoder