简体   繁体   中英

movieplayercontroller doesn't work

I want to stream video on my iOS application, the problem is that it displays a black screen with the url I want to show but it works with other url's here is my code :

[super viewDidLoad];
NSURL *fileURL = [NSURL URLWithString:@"http://livevideo.infomaniak.com/iframe.php?stream=arabelfmendirect&name=arabel_webtv&player=2828.m3u8"];

moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[moviePlayerController.view setFrame:CGRectMake(0, 70, 320, 270)];
[self.view addSubview:moviePlayerController.view];
// moviePlayerController.fullscreen = YES;
[moviePlayerController prepareToPlay];
[moviePlayerController play];

how can I fix it ?

The video URL mentioned doesn't use HLS format. Thus MPMoviePlayerController cannot play the video.

From http://livevideo.infomaniak.com/iframe.php?stream=arabelfmendirect&name=arabel_ ‌​webtv&player=2828.m3u8, it looks like it needs flash to play the video.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM