We're testing our app with the ytplayer SDK provided by YouTube. Please refer to the link below. https://developers.google.com/youtube/v3/guides/ios_youtube_helper?hl=ko
The problem is, when I play some videos I can not play only in the app. This video plays very well on Youtube apps, mobile webs (Safari apps) and desktop browsers. (videoId:ozUdQJxvQCk)
I tried it in the SDK sample app on YouTube, but the problem was the same. In other words, it's not just my app's issue.
The error code returned from the SDK looks like this: "Decoding failed with error code -1"
If anyone knows how to solve it, please answer it.
==
Attach the sample app code. Of the two videos, the above is normal and the one below is the problematic one.
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
CGRect rect = CGRectMake(0, (self.view.frame.size.height - self.view.frame.size.width) / 2, self.view.frame.size.width, self.view.frame.size.width);
YTPlayerView *yt = [[YTPlayerView alloc] initWithFrame:rect];
[self.view addSubview:yt];
// [yt loadWithVideoId:@"yv90i_afcPI"]; // it's ok
[yt loadWithVideoId:@"ozUdQJxvQCk"]; // video unavailable
}