我有一个嵌入式YTPlayerView:
YTPlayerView *player = [[YTPlayerView alloc] initWithFrame:newCell.coverImageButton.frame];
[player loadWithVideoId:[self extractYoutubeIdFromLink:posting.postDictionary[@"uri"]]];
player.delegate = self;
[newCell addSubview:player];它工作得很好,我点击视图,它会显示一个全屏播放器。但是当我按下“完成”时,这个观点就会被驳回,然后在大约几秒钟后重新呈现。
发布于 2015-05-07 14:25:43
只需在YTPlayerView-iframe-player.html中注释这一行代码window.setInterval(forcePlay, 5000)即可。
发布于 2015-04-01 12:50:12
我认为不需要YTPlayerView类来获得我想要的结果。这是非常完美的:
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.youtube.com/embed/%@",tubeId]];
UIWebView *w = [[UIWebView alloc] initWithFrame:webFrame];
[self.view addSubview:w];
[w loadRequest:[NSURLRequest requestWithURL:url]];https://stackoverflow.com/questions/29258174
复制相似问题