XCDYouTubeKit icon indicating copy to clipboard operation
XCDYouTubeKit copied to clipboard

getVideoWithIdentifier return XCDYouTubeVideoErrorDomain error

Open akoruk opened this issue 3 years ago • 25 comments

Hello,

XCDYouTubeClient.default().getVideoWithIdentifier(videoID)

This method above always returns error XCDYouTubeVideoErrorDomain with code -3. I think Youtube API changed something.

Do you know anything about it?

akoruk avatar May 30 '21 15:05 akoruk

duplicate with: https://github.com/0xced/XCDYouTubeKit/issues/530 https://github.com/0xced/XCDYouTubeKit/issues/527 fix: https://github.com/0xced/XCDYouTubeKit/pull/526

Alanko5 avatar Jun 04 '21 07:06 Alanko5

https://github.com/ytdl-org/youtube-dl/issues/29086

get_vid_info is shut-downing.

drwjf avatar Jun 17 '21 03:06 drwjf

HI, the error appears again on my side - Error Domain=XCDYouTubeVideoErrorDomain Code=-3 Fix from @hArshpb11 worked< but again :(

Oleh-Poremskyy avatar Jun 18 '21 07:06 Oleh-Poremskyy

https://stackoverflow.com/a/67629882 Updating query in XCDYouTubeVideoOperation.m seems to work for now..

NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1", @"eurl": [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier],@"c": @"TVHTML5", @"cver": @"6.20180913"};

armendh avatar Jun 18 '21 11:06 armendh

https://stackoverflow.com/a/67629882 Updating query in XCDYouTubeVideoOperation.m seems to work for now..

`NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1", @"eurl": [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier],@"c": @"TVHTML5", @"cver": @"6.20180913"};

it seems that the updated request is now working on my side. I hope it will continue to work. @armendh Thank you very much )

Oleh-Poremskyy avatar Jun 18 '21 11:06 Oleh-Poremskyy

This also seems to fix it on my end (for now...). Good find @armendh!

cbg-dev-k avatar Jun 18 '21 12:06 cbg-dev-k

Yep can confirm this fixed it for me too thanks @armendh

philmmoore avatar Jun 18 '21 13:06 philmmoore

I've created a PR here: https://github.com/alexeichhorn/XCDYouTubeKit/pull/3 though you could install the fix by updating your podfile with:

pod 'XCDYouTubeKit', git: '[email protected]:hinge-agency/XCDYouTubeKit.git', branch: 'fix/issue-534- XCDYouTubeVideoErrorDomain-error-code-3'

philmmoore avatar Jun 18 '21 13:06 philmmoore

@philmmoore great, thanks, good luck

Oleh-Poremskyy avatar Jun 18 '21 13:06 Oleh-Poremskyy

Great solution. It works for me as well 🎉
PS: pod update did not work. https://github.com/0xced/XCDYouTubeKit/issues/534#issuecomment-864047166

I just changed line value 151. in XCDYouTubeVideoOperation.m to this below.

NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1", @"eurl": [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier],@"c": @"TVHTML5", @"cver": @"6.20180913"};

akoruk avatar Jun 18 '21 16:06 akoruk

same issue. common videos works fine but "LIVE NOW" videos didn't work

devbest555 avatar Jun 18 '21 20:06 devbest555

I've created a PR here: alexeichhorn#3 though you could install the fix by updating your podfile with:

pod 'XCDYouTubeKit', git: '[email protected]:hinge-agency/XCDYouTubeKit.git', branch: 'fix/issue-534- XCDYouTubeVideoErrorDomain-error-code-3'

I use this line to make pod update works

pod 'XCDYouTubeKit', :git => 'https://github.com/hinge-agency/XCDYouTubeKit.git', :branch => 'fix/issue-534-XCDYouTubeVideoErrorDomain-error-code-3

gonzo-oin avatar Jun 19 '21 19:06 gonzo-oin

I've created a PR here: alexeichhorn#3 though you could install the fix by updating your podfile with:

pod 'XCDYouTubeKit', git: '[email protected]:hinge-agency/XCDYouTubeKit.git', branch: 'fix/issue-534- XCDYouTubeVideoErrorDomain-error-code-3'

I use this line to make pod update works

pod 'XCDYouTubeKit', :git => 'https://github.com/hinge-agency/XCDYouTubeKit.git', :branch => 'fix/issue-534-XCDYouTubeVideoErrorDomain-error-code-3

did you test the "LIVE NOW" videos ? could you test the project with youtube videoID "azl07uA79pA"? Even though I didn't get the Error but video doesn't load because streamURL=nil for live videos. any idea for live videos?

devbest555 avatar Jun 21 '21 09:06 devbest555

HI, the error appears again on my side - Error Domain=XCDYouTubeVideoErrorDomain Code=-3 Fix from @hArshpb11 worked< but again :(

https://github.com/0xced/XCDYouTubeKit/issues/530#issuecomment-849851958

hArshpb11 avatar Jun 21 '21 17:06 hArshpb11

live videoIDs : hartiIFC1s4, azl07ua79pa can you test these videos in your side using XDCYouTubeVideoKit?

devbest555 avatar Jun 22 '21 07:06 devbest555

PR #536 seems the best hotfix for now, but we need a long-term solution for this.

markdegrootnl avatar Jun 22 '21 20:06 markdegrootnl

PR #536 seems the best hotfix for now, but we need a long-term solution for this.

So, finally, can you play the live videos(hartiIFC1s4, azl07ua79pa) using XCDYoutubekit?

devbest555 avatar Jun 23 '21 07:06 devbest555

The second video is no longer valid. The first one does not play, the player just keeps on loading.

markdegrootnl avatar Jun 24 '21 08:06 markdegrootnl

@markdegrootnl Thank you for your information. first, second videos are playing in the web browser and also those are playing in ios app using ios-youtube-player-helper library. thoes videos doesn't play in only XCDYoutubeVideokit. do you have any idea?

devbest555 avatar Jun 24 '21 08:06 devbest555

https://stackoverflow.com/a/67629882 Updating query in XCDYouTubeVideoOperation.m seems to work for now..

NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1", @"eurl": [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier],@"c": @"TVHTML5", @"cver": @"6.20180913"};

This also works for me

DuyBui-Everfit avatar Jul 16 '21 07:07 DuyBui-Everfit

https://stackoverflow.com/a/67629882 Updating query in XCDYouTubeVideoOperation.m seems to work for now.. NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1", @"eurl": [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier],@"c": @"TVHTML5", @"cver": @"6.20180913"};

This also works for me

This solution is not completely fixed, sometimes it works, sometime not.

DuyBui-Everfit avatar Jul 21 '21 10:07 DuyBui-Everfit

I followed 2 modifications from another closed issue to fix the live broadcast cannot be played problem. https://github.com/0xced/XCDYouTubeKit/issues/538 It seems like the hotfix is worked again.

  1. XCDYouTubeVideoOperation.m self.eventLabels = [[NSMutableArray alloc] initWithArray:@[ @"embedded", @"detailpage" ]]; --->> [Edit] self.eventLabels =[[NSMutableArray alloc] init];
  2. XCDYouTubeVideo.m NSString *httpLiveStream = info[@"hlsvp"] ?: XCDHTTPLiveStreamingStringWithString(playerResponse); --->> [Edit] NSString *httpLiveStream = info[@"hlsvp"] ?: XCDHTTPLiveStreamingStringWithString(playerResponse); if(httpLiveStream.length == 0){ httpLiveStream = info[@"streamingData"][@"hlsManifestUrl"]; }

But this is resulting in another issue, the user info for upcoming live stream will return error: XCDYouTubeVideoErrorDomain: -2 instead of remaining start time. And I opened this issue already.https://github.com/0xced/XCDYouTubeKit/issues/541 Please help~

Kiu212 avatar Jul 22 '21 02:07 Kiu212

Hello folks! seems that Again this is not working, i can't play videos on iOS. even with the latest modifications to the line 152, seems that again the URL schema has change, since i can't decode the response.

Any ideas?

CharlyVaiMX avatar Jul 24 '21 01:07 CharlyVaiMX

Hello folks! seems that Again this is not working, i can't play videos on iOS. even with the latest modifications to the line 152, seems that again the URL schema has change, since i can't decode the response.

Any ideas?

Somehow this is working again...

CharlyVaiMX avatar Jul 26 '21 22:07 CharlyVaiMX

@CharlyVaiMX Have you got any solution?

KaranMehta3984 avatar Aug 04 '21 09:08 KaranMehta3984