Closed NikKovIos closed 4 years ago
same issue here
Thanks! I will look into this!
For those wondering how to work around this please use the querying functionality in XCDYouTubeClient
or XCDYouTubeVideoQueryOperation
Here is an example on how to use it (example also in the macOS demo)
[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:@"" completionHandler:^(XCDYouTubeVideo *video, NSError *error) {
if (video)
{
[[XCDYouTubeClient defaultClient] queryVideo:video cookies:nil completionHandler:^(NSDictionary * _Nonnull streamURLs, NSError * _Nullable streamError, NSDictionary<id,NSError *> * _Nonnull streamErrors)
{
if (streamURLs)
{
NSURL *url = streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming] ?: streamURLs[@(XCDYouTubeVideoQualityHD720)] ?: streamURLs[@(XCDYouTubeVideoQualityMedium360)] ?: streamURLs[@(XCDYouTubeVideoQualitySmall240)];
}
else
{
//Error
}
}];
}
else
{
//Error
}
}];
Some links are returned, but not loaded. For example this. https://www.youtube.com/watch?v=550S-6XVRsw The 360p link works well.
The problem with 720p video link only, so i created a workaround for this to fetch 360p video link in that case and in other case use 720p.