From 4fb6c971d9fcead838b82d8128bd5568c00b9373 Mon Sep 17 00:00:00 2001 From: "Vassilis A. Alexiou" Date: Wed, 2 Jun 2021 12:51:29 +0300 Subject: [PATCH] Failed to decode response error Solution - 0xced#531 0xced#531 --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index 4fcc4107..196d9d9a 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -397,7 +397,8 @@ - (void) handleJavaScriptPlayerWithScript:(NSString *)script { NSString *eurl = [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier]; NSString *sts = self.embedWebpage.sts ?: self.webpage.sts ?: @""; - NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts}; + //NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts}; + NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts, @"html5" : @1 }; NSString *queryString = XCDQueryStringWithDictionary(query); NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/get_video_info?" stringByAppendingString:queryString]]; [self startRequestWithURL:videoInfoURL type:XCDYouTubeRequestTypeGetVideoInfo];