简体   繁体   English

movieplayercontroller不起作用

[英]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 : 我想在我的iOS应用程序上流式传输视频,问题是它在黑屏上显示了我想显示的网址,但可以与其他网址一起使用,这是我的代码:

[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. 提及的视频网址未使用HLS格式。 Thus MPMoviePlayerController cannot play the video. 因此, MPMoviePlayerController无法播放视频。

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. http://livevideo.infomaniak.com/iframe.php?stream=arabelfmendirect&name=arabel_ webtv&player = 2828.m3u8来看,它似乎需要Flash才能播放视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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