【发布时间】:2016-11-28 04:33:46
【问题描述】:
在我的项目中,我必须显示来自 JSON 的 videos 以 url 形式的响应,例如 ("http://eyeforweb.info.bh-in-15.webhostbox.net/myconnect/index.php?do=/video/63/video-videovideo/")
问题是当我想在UIWebView 中显示它时,它什么也没有显示,当我尝试第二种方法时,我得到了相同的结果
请帮我播放视频
目前我正在使用以下代码:
NSURL *streamURL = [NSURL URLWithString:@"http://eyeforweb.info.bh-in-15.webhostbox.net/myconnect/index.php?do=/video/63/video-videovideo/"];
_streamPlayer = [[MPMoviePlayerController alloc] initWithContentURL:streamURL];
// depending on your implementation your view may not have it's bounds set here
// in that case consider calling the following 4 msgs later
[self.streamPlayer.view setFrame: CGRectMake(15, 75, VidScroll.frame.size.width-30, 300)];
self.streamPlayer.controlStyle = MPMovieControlStyleEmbedded;
[VidScroll addSubview: self.streamPlayer.view];
[self.streamPlayer play];
【问题讨论】: