我需要做的是创建一个tableview,其中包含单元格;和tabelviewCell中的UIWebview,whitch意味着我有tableviewcells,我需要它们加载html视频(src像:http://v.qq.com/iframe/player.html?vid=w0330g8iova&tiny=0&auto=0);
问题是:当我播放视频时,我无法播放另一个视频,如果我点击其他小区播放视频,播放视频会停止播放;
看起来像单元格是一样的,我在这里发布我的代码:
- (void)loadHTMLStringWithDict:(NSDictionary *)tempDict {
if ([[tempDict objectForKey:@"type"] isEqualToString:@"scene"]) {
_videoWebView.hidden = NO;
_videoWebView.scrollView.scrollEnabled = NO;
_videoWebView.backgroundColor = [UIColor blackColor];
_videoWebView.opaque = NO;
_videoWebView.delegate = self;
_videoWebView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_videoWebView.scalesPageToFit = NO;
_videoWebView.allowsInlineMediaPlayback = YES;
_videoWebView.mediaPlaybackRequiresUserAction = NO;
NSString *head = [NSString stringWithFormat:@"<iframe class=\"video_iframe\" type=\"text/html\" width=\"100%%\" height=\"100%%\" margin=0 padding=0 src=\""];
NSString *foot = @"\" frameborder=\"0\" allowfullscreen = 0></iframe>";
NSString *imageHTML = [NSString stringWithFormat:@"%@%@%@", head,[tempDict objectForKey:@"src"],foot];
imageHTML = [CommonTool HTMLStringAddImgStyleWithOriginal:imageHTML];
_videoWebView.allowsInlineMediaPlayback=YES;
[_videoWebView loadHTMLString:imageHTML baseURL:nil];
}
}
我在运行此方法
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
我已经为这个问题工作了2天,欢迎任何建议......
感谢收看.....