Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getVideoWithIdentifier return XCDYouTubeVideoErrorDomain error #534

Open
akoruk opened this issue May 30, 2021 · 25 comments
Open

getVideoWithIdentifier return XCDYouTubeVideoErrorDomain error #534

akoruk opened this issue May 30, 2021 · 25 comments

Comments

@akoruk
Copy link

akoruk commented May 30, 2021

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?

@Alanko5
Copy link

Alanko5 commented Jun 4, 2021

duplicate with:
#530
#527
fix:
#526

@drwjf
Copy link

drwjf commented Jun 17, 2021

ytdl-org/youtube-dl#29086

get_vid_info is shut-downing.

@Oleh-Poremskyy
Copy link

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

@armendh
Copy link

armendh commented Jun 18, 2021

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

@Oleh-Poremskyy
Copy link

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 )

@cbg-dev-k
Copy link

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

@philmmoore
Copy link

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

philmmoore added a commit to hinge-agency/XCDYouTubeKit that referenced this issue Jun 18, 2021
@philmmoore
Copy link

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'

@Oleh-Poremskyy
Copy link

@philmmoore great, thanks, good luck

alexeichhorn added a commit to alexeichhorn/XCDYouTubeKit that referenced this issue Jun 18, 2021
@akoruk
Copy link
Author

akoruk commented Jun 18, 2021

Great solution. It works for me as well 🎉
PS: pod update did not work. #534 (comment)

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

@devbest555
Copy link

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

@gonzo-oin
Copy link

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

@devbest555
Copy link

devbest555 commented Jun 21, 2021

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?

@hArshpb11
Copy link

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

#530 (comment)

@devbest555
Copy link

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

@markdegrootnl
Copy link

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

@devbest555
Copy link

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?

@markdegrootnl
Copy link

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

@devbest555
Copy link

@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?

pahnev added a commit to pahnev/XCDYouTubeKit that referenced this issue Jun 29, 2021
@DuyBui-Everfit
Copy link

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
Copy link

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.

@Kiu212
Copy link

Kiu212 commented Jul 22, 2021

I followed 2 modifications from another closed issue to fix the live broadcast cannot be played problem. #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.#541
Please help~

@CharlyVaiMX
Copy link

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
Copy link

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...

@KaranMehta3984
Copy link

@CharlyVaiMX
Have you got any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests