YTPlayerView代码片段
- (void)viewDidLoad {
[super viewDidLoad];
[self.playerView setDelegate:self];
[self.playerView loadVideoByURL:@"https://www.youtube.com/embed/xyz" startSeconds:2.0 suggestedQuality:kYTPlaybackQualityAuto];
}发布于 2015-04-28 23:29:33
我发现这个类已经过时了,很难使用。这是我的解决方案(虽然没有委托)
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.youtube.com/embed/%@",tubeId]];
UIWebView *web = [[UIWebView alloc] initWithFrame:webFrame];
[self.view addSubview:web];
[web loadRequest:[NSURLRequest requestWithURL:url]];https://stackoverflow.com/questions/29918198
复制相似问题