XCDYouTubeKit
XCDYouTubeKit copied to clipboard
getVideoWithIdentifier return XCDYouTubeVideoErrorDomain error
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?
duplicate with: https://github.com/0xced/XCDYouTubeKit/issues/530 https://github.com/0xced/XCDYouTubeKit/issues/527 fix: https://github.com/0xced/XCDYouTubeKit/pull/526
https://github.com/ytdl-org/youtube-dl/issues/29086
get_vid_info is shut-downing.
HI, the error appears again on my side - Error Domain=XCDYouTubeVideoErrorDomain Code=-3 Fix from @hArshpb11 worked< but again :(
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"};
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 )
This also seems to fix it on my end (for now...). Good find @armendh!
Yep can confirm this fixed it for me too thanks @armendh
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 great, thanks, good luck
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"};
same issue. common videos works fine but "LIVE NOW" videos didn't work
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
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?
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
live videoIDs : hartiIFC1s4, azl07ua79pa can you test these videos in your side using XDCYouTubeVideoKit?
PR #536 seems the best hotfix for now, but we need a long-term solution for this.
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?
The second video is no longer valid. The first one does not play, the player just keeps on loading.
@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?
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
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.
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.
- XCDYouTubeVideoOperation.m self.eventLabels = [[NSMutableArray alloc] initWithArray:@[ @"embedded", @"detailpage" ]]; --->> [Edit] self.eventLabels =[[NSMutableArray alloc] init];
- 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~
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?
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 Have you got any solution?