【发布时间】:2011-06-30 08:30:14
【问题描述】:
这是我在 iOS 应用程序中用来播放来自服务器的流媒体视频的代码段。但它没有播放视频
-(IBAction)PlayTV:(id)sender{
MPMoviePlayerController *player2 = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://87945.obj.myservmedia.net/quit1/mpegts.stream/playlist.m3u8"]];
player2.movieSourceType = MPMovieSourceTypeStreaming;
player2.view.frame = CGRectMake(25, 117, 270, 189);
player2.view.backgroundColor = [UIColor blackColor];
player2.view.hidden = NO;
[self.view addSubview:player2.view];
[player2 play];
}
【问题讨论】:
-
我试过这个,但是链接失效了。这就是它可能不起作用的原因。
-
谁能给我一个工作播放列表,仅供测试
-
看看网络 - 有很多流可供测试。
-
我在谷歌上搜索过....但我没有找到任何人...你能指点我一个吗...