gpt4 book ai didi

ios - youtube YTPlayerView没有响应

转载 作者:行者123 更新时间:2023-12-01 17:06:35 29 4
gpt4 key购买 nike

YTPlayerView代码段

- (void)viewDidLoad {
[super viewDidLoad];
[self.playerView setDelegate:self];
[self.playerView loadVideoByURL:@"https://www.youtube.com/embed/xyz" startSeconds:2.0 suggestedQuality:kYTPlaybackQualityAuto];
}

最佳答案

我发现该类已经过时且难以使用。
这是我的解决方案(虽然没有代表)

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]];

关于ios - youtube YTPlayerView没有响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29918198/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com