-
Notifications
You must be signed in to change notification settings - Fork 627
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
Error XCDYouTubeVideoErrorDomain -2 when i try open video #544
Comments
This brunch helped me pod 'XCDYouTubeKit', :git => 'https://github.com/dpwilhelmsen/XCDYouTubeKit', :branch => 'hotfix/fix-get-video-info-error', submodules: true But i just replace 2 files It's working one time, now not work |
yes, it does not work anymore |
And now what i can do? :) |
I'm seeing the same issue here. When using a VPN to the US, videos still play. Maybe it's related to the consent cookie tweak we've had to implement before? That only affected non-US clients I believe. |
Ah shit, here we go again |
Maybe this can help: There's a new answer named UPDATE (July 2021) POST: https://youtubei.googleapis.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 with the body : { |
the above mentioned fix seems to work the innertube api key is hardcoded and we don't know how long it will last so it is recommended to scrap the api key from youtube and set it via XCDYouTubeClient.setInnertubeApiKey
|
I can confirm the post method works, but the response schema is different than the current get_video_info. So, I think there are some meaningful changes required to get this working from within XCDYouTubeKit. In case it helps anyone in the short-term, here's snippet from my swift app. But I started needing to re-implement some of the signature stuff inside XCDYouTubeKit, and decided to slow my roll. Note that postToUrl is a shared helper which is pretty simple, so left out here for brevity.
|
Return error "Precondition check failed" :( |
Looks good, but the problem is that at my stage But i tested key "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8" - he is work, but Privacy Policy blocked all and video not returned( |
When i try get video info, google return this:
|
I saw that, you need to make sure that the content type is application/json and you don't percent encode it. |
It's... work... I hope this doesn't sound weird, but I love you, thank you very much! :) |
I followed the code in #545, but still getting XCDYouTubeVideoErrorDomain -2 for upcoming live stream video. |
@Kiu212 +1 |
After combining #545 with the changes I already had locally (consent cookie etc), it started playing videos again in europe. When I try a livestream however, the POST works but youtubekit fails to play the stream. The log eventually notifies that a request went timeout. Anyone else seeing this? The timeout error: |
I have same error... If someone have solution - pls share... |
need a fix :'( |
Well damn, it seems I didn't apply one of the previous fixes and it came back to bite me. The only missing code I needed was near line 173 in XCDYoutubeVideo.m: Now both livestreams and past broadcasts are working for me. |
no of the fixes works anymore (for me). it looks like it will only play videos randomly. |
anyone got the solution ?? |
Hello guys, someone got the solution? |
I was getting this error when I tried to pass the video url instead of the video id. |
when i try to open any video it returns an error XCDYouTubeVideoErrorDomain, Code: -2
Before that, other tips from other discussions helped, but now something new :(
The text was updated successfully, but these errors were encountered: