-
Notifications
You must be signed in to change notification settings - Fork 626
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
Can Not Play video any more - XCDYouTubeVideoErrorDomain Code=-3 #525 #526
base: master
Are you sure you want to change the base?
Conversation
It works correctly in our project, thank you so much! 👌 |
Tested. It seems to work! 👍 |
Works! |
It's Great!, please guys, merge the pull request, thanks a lot! |
It works correctly 👍 |
Can you make a release? |
It works for me. Thank you! |
Can you help me? i am reinstall pod - dont work |
I think that it hasn't been published yet. eg: BTW it works fine! |
Thank you! It works correctly 👍 |
When can we expect this to be published? |
How to fix this problem bros ?????? |
problem was fixed |
But how to do with podfile ?? |
|
This works but there is no official release yet!!! |
Please merge and release |
Can anyone say why it didn't work previously and why I need to add those new changes? |
this fixed for me but i have multiple videos in some video still coming |
We're also getting reports of videos not playing since ~yesterday. As @drwjf mentioned on #534, it seems the html5 parameter is no longer a valid workaround for the get_video_info API. In another library (streamlink issues#3795) they're moving away from this API entirely, but I don't know if this is at all possible for YoutubeKit. |
Tried that yesterday, not working unfortunately 😓 |
Yep, few days ago sometimes videos are just not playing. |
It seems that youtube is slowly deprecating this api. However, there is a combination of parameters that has it working for me. diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m
index be4ce9e..714bed3 100644
--- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m
+++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m
@@ -149,7 +149,7 @@ - (void) startNextRequest
NSString *eventLabel = [self.eventLabels objectAtIndex:0];
[self.eventLabels removeObjectAtIndex:0];
- NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" };
+ NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @"1", @"c": @"IOS", @"cver": @"16.05.7"};
NSString *queryString = XCDQueryStringWithDictionary(query);
NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/get_video_info?" stringByAppendingString:queryString]];
[self startRequestWithURL:videoInfoURL type:XCDYouTubeRequestTypeGetVideoInfo];
@@ -358,7 +358,7 @@ - (void) handleJavaScriptPlayerWithScript:(NSString *)script
{
NSString *eurl = [@"https://youtube.googleapis.com/v/" stringByAppendingString:self.videoIdentifier];
NSString *sts = self.embedWebpage.sts ?: self.webpage.sts ?: @"";
- NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts};
+ NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts, @"html5" : @"1", @"c": @"IOS", @"cver": @"16.05.7"};
NSString *queryString = XCDQueryStringWithDictionary(query);
NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/get_video_info?" stringByAppendingString:queryString]];
[self startRequestWithURL:videoInfoURL type:XCDYouTubeRequestTypeGetVideoInfo];
This is tested and works with both regular videos and live streams. |
Any pod version for this fix? |
It works for me - |
This helped me too #525 (comment) |
This works for me. |
I tried this fix, but it doesn't work.
|
hello, |
Now getting -2 |
Fixed Issue #525 - Can Not Play video any more - XCDYouTubeVideoErrorDomain Code=-3 #525