XCDYouTubeKit icon indicating copy to clipboard operation
XCDYouTubeKit copied to clipboard

Unable to play youtube video in iOS app

Open dipubright opened this issue 4 years ago • 10 comments

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)

dipubright avatar May 25 '21 07:05 dipubright

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

ryanfrancesconi avatar May 25 '21 18:05 ryanfrancesconi

+1

zeqinjie avatar May 27 '21 07:05 zeqinjie

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

hArshpb11 avatar May 27 '21 18:05 hArshpb11

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

Tsquared86 avatar Jun 20 '21 10:06 Tsquared86

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

ryanfrancesconi avatar Jun 25 '21 04:06 ryanfrancesconi

Yep

NikKovIos avatar Jun 25 '21 10:06 NikKovIos

Yes. Did anyone find a solution for it?

marcoswmv avatar Jul 08 '21 13:07 marcoswmv

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

cironapo avatar Jul 10 '21 13:07 cironapo

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

ryanfrancesconi avatar Jul 19 '21 15:07 ryanfrancesconi

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

haroonakram avatar Apr 07 '22 08:04 haroonakram