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

Can Not Play video any more - XCDYouTubeVideoErrorDomain Code=-3 #525 #526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jatin19121990
Copy link

Fixed Issue #525 - Can Not Play video any more - XCDYouTubeVideoErrorDomain Code=-3 #525

@kirian
Copy link

kirian commented May 20, 2021

It works correctly in our project, thank you so much! 👌

@pausenabre
Copy link

Tested. It seems to work! 👍

@arcs-
Copy link

arcs- commented May 20, 2021

Works!

@JLPenaLopez
Copy link

It's Great!, please guys, merge the pull request, thanks a lot!

@amadorera
Copy link

It works correctly 👍

@ardavydov
Copy link

Can you make a release?

@huynguyencong
Copy link

It works for me. Thank you!

@meffistofel
Copy link

Can you help me? i am reinstall pod - dont work
i write this line in code on my own - dont workd
What wrong?

@rodineijf
Copy link

rodineijf commented May 22, 2021

Can you help me? i am reinstall pod - dont work
i write this line in code on my own - dont workd
What wrong?

I think that it hasn't been published yet.
I've changed the reference of XCDYouTubeKit to the branch of the PR owner. It isn't a definitive solution, but it helped me to fix my app for now.

eg:
pod 'XCDYouTubeKit', :git => 'https://github.com/jatin19121990/XCDYouTubeKit', :branch => 'hotfix/Can-Not-Play-video-any-more---XCDYouTubeVideoErrorDomain-Code=-3-#525'

BTW it works fine!

@baksogen
Copy link

Thank you! It works correctly 👍

@ghost
Copy link

ghost commented May 25, 2021

When can we expect this to be published?

@tungdangplus
Copy link

How to fix this problem bros ??????

@ios-dev-rep
Copy link

problem was fixed
#526

@tungdangplus
Copy link

problem was fixed
#526

But how to do with podfile ??

@ios-dev-rep
Copy link

pod 'XCDYouTubeKit', git: 'https://github.com/jatin19121990/XCDYouTubeKit', branch: 'hotfix/Can-Not-Play-video-any-more---XCDYouTubeVideoErrorDomain-Code=-3-#525', submodules: true

@ghost
Copy link

ghost commented May 26, 2021

This works but there is no official release yet!!!

@abomadi
Copy link

abomadi commented May 26, 2021

Please merge and release

@Sridharan15
Copy link

Sridharan15 commented Jun 11, 2021

Can anyone say why it didn't work previously and why I need to add those new changes?

@jaydeepk3
Copy link

pod 'XCDYouTubeKit', git: 'https://github.com/jatin19121990/XCDYouTubeKit', branch: 'hotfix/Can-Not-Play-video-any-more---XCDYouTubeVideoErrorDomain-Code=-3-#525', submodules: true

this fixed for me but i have multiple videos in some video still coming XCDYouTubeVideoErrorDomain Code=-3 this error

@cbg-dev-k
Copy link

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.

@chwastek
Copy link

pod 'XCDYouTubeKit', git: 'https://github.com/jatin19121990/XCDYouTubeKit', branch: 'hotfix/Can-Not-Play-video-any-more---XCDYouTubeVideoErrorDomain-Code=-3-#525', submodules: true

this fixed for me but i have multiple videos in some video still coming XCDYouTubeVideoErrorDomain Code=-3 this error

Tried that yesterday, not working unfortunately 😓

@ardavydov
Copy link

Yep, few days ago sometimes videos are just not playing.

@dpwilhelmsen
Copy link

It seems that youtube is slowly deprecating this api. However, there is a combination of parameters that has it working for me.

dpwilhelmsen@523a63f

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.

@ghost
Copy link

ghost commented Jun 24, 2021

It seems that youtube is slowly deprecating this api. However, there is a combination of parameters that has it working for me.

dpwilhelmsen@523a63f

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?

@nikolaenkoag
Copy link

It seems that youtube is slowly deprecating this api. However, there is a combination of parameters that has it working for me.
dpwilhelmsen@523a63f

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 - pod 'XCDYouTubeKit', :git => 'https://github.com/dpwilhelmsen/XCDYouTubeKit', :branch => 'hotfix/fix-get-video-info-error'

@NikKovIos
Copy link

This helped me too #525 (comment)

@devguy221
Copy link

devguy221 commented Jul 9, 2021

pod 'XCDYouTubeKit', :git => 'https://github.com/dpwilhelmsen/XCDYouTubeKit', :branch => 'hotfix/fix-get-video-info-error', submodules: true

This works for me.

@coachdesign
Copy link

It seems that youtube is slowly deprecating this api. However, there is a combination of parameters that has it working for me.
dpwilhelmsen@523a63f

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 - pod 'XCDYouTubeKit', :git => 'https://github.com/dpwilhelmsen/XCDYouTubeKit', :branch => 'hotfix/fix-get-video-info-error'

I tried this fix, but it doesn't work.

<CATransformLayer: 0x6000038770c0> - changing property masksToBounds in transform-only layer, will have no effect
<CATransformLayer: 0x6000038720e0> - changing property masksToBounds in transform-only layer, will have no effect
<CATransformLayer: 0x600003884840> - changing property masksToBounds in transform-only layer, will have no effect
[] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
[plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600003884bc0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
<CATransformLayer: 0x600003872d00> - changing property masksToBounds in transform-only layer, will have no effect
<CATransformLayer: 0x60000386bf20> - changing property masksToBounds in transform-only layer, will have no effect
<CATransformLayer: 0x600003884840> - changing property allowsGroupBlending in transform-only layer, will have no effect
<CATransformLayer: 0x600003872d00> - changing property allowsGroupBlending in transform-only layer, will have no effect```

GUIEEN added a commit to GUIEEN/XCDYouTubeKit that referenced this pull request Aug 2, 2021
@mirco1000
Copy link

mirco1000 commented Jan 1, 2022

hello,
pod 'XCDYouTubeKit', :git => 'https://github.com/dpwilhelmsen/XCDYouTubeKit', :branch => 'hotfix/fix-get-video-info-error'
not working for me please give a working pod version

@Pgmr-sagar
Copy link

hello, pod 'XCDYouTubeKit', :git => 'https://github.com/dpwilhelmsen/XCDYouTubeKit', :branch => 'hotfix/fix-get-video-info-error' not working for me please give a working pod version

Now getting -2
XCDYouTubeVideoErrorDomain error -2
Need urgent fix or i think i'll get fired 🥲

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

Successfully merging this pull request may close these issues.