0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 626 forks source link

Unable to play youtube video in iOS app #531

Open dipubright opened 3 years ago

dipubright commented 3 years ago

Getting fail to decode response with below logs [XCDYouTubeKit] Failed to decode response from https://www.youtube.com/get_video_info?el=embedded&hl=en&ps=default&video_id=-VmaT7ChiYs (response.textEncodingName = utf-8, data.length = 0) 2021-05-25 13:09:58.729299+0530 HealthKart[6512:163267] [XCDYouTubeKit] Video operation finished with error: The operation couldn’t be completed. (XCDYouTubeVideoErrorDomain error -3.) Domain: XCDYouTubeVideoErrorDomain Code: -3

Version (2.15.2)

ryanfrancesconi commented 3 years ago

duplicate of https://github.com/0xced/XCDYouTubeKit/issues/530 duplicate of #525

zeqinjie commented 3 years ago

+1

hArshpb11 commented 3 years ago

Need to make little modification in "XCDYouTubeVideoOperation" For make this Fix. Replac line number 152,361 with new one that i have listedout at bottom.

File : XCDYouTubeVideoOperation

line: 152 line: 361

Modification for line 152: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @1 };

Modification for line 361: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts, @"html5" : @1 };

Tsquared86 commented 3 years ago

HI is anyone having problems with this again? I did these changes about a month ago but as of lately no longer work.

ryanfrancesconi commented 3 years ago

@Tsquared86 yes, it's broken again for me as well

NikKovIos commented 3 years ago

Yep

marcoswmv commented 3 years ago

Yes. Did anyone find a solution for it?

cironapo commented 3 years ago

I replace the line 152 in "XCDYouTubeVideoOperation.m" with NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1" };

and le line 154 in "XCDYouTubeVideoOperation.m" with NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/get_video_info?eurl=https%3A%2F%2Fyoutube.googleapis.com%2Fv%2Fonz2k4zoLjQ&c=TVHTML5&cver=6.20180913&" stringByAppendingString:queryString]];

I followed this link https://stackoverflow.com/questions/67615278/get-video-info-youtube-endpoint-suddenly-returning-404-not-found

ryanfrancesconi commented 3 years ago

There is a PR here that addresses it: https://github.com/0xced/XCDYouTubeKit/pull/539

haroonakram commented 2 years ago

I am having the same issue... does any one found any solution or can suggest any other option?