XCDYouTubeKit icon indicating copy to clipboard operation
XCDYouTubeKit copied to clipboard

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

Open jatin19121990 opened this issue 4 years ago • 30 comments

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

jatin19121990 avatar May 20 '21 11:05 jatin19121990

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

kirian avatar May 20 '21 13:05 kirian

Tested. It seems to work! 👍

pausenabre avatar May 20 '21 14:05 pausenabre

Works!

arcs- avatar May 20 '21 14:05 arcs-

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

JLPenaLopez avatar May 20 '21 18:05 JLPenaLopez

It works correctly 👍

amadorera avatar May 21 '21 08:05 amadorera

Can you make a release?

ardavydov avatar May 21 '21 13:05 ardavydov

It works for me. Thank you!

huynguyencong avatar May 22 '21 08:05 huynguyencong

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

meffistofel avatar May 22 '21 15:05 meffistofel

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!

rodineijf avatar May 22 '21 16:05 rodineijf

Thank you! It works correctly 👍

baksogen avatar May 22 '21 16:05 baksogen

When can we expect this to be published?

ghost avatar May 25 '21 07:05 ghost

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

tungdangplus avatar May 26 '21 06:05 tungdangplus

problem was fixed https://github.com/0xced/XCDYouTubeKit/pull/526

fedorchukios avatar May 26 '21 06:05 fedorchukios

problem was fixed #526

But how to do with podfile ??

tungdangplus avatar May 26 '21 06:05 tungdangplus

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

fedorchukios avatar May 26 '21 06:05 fedorchukios

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

ghost avatar May 26 '21 06:05 ghost

Please merge and release

abomadi avatar May 26 '21 13:05 abomadi

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

Sridharan15 avatar Jun 11 '21 05:06 Sridharan15

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

jaydeepk3 avatar Jun 17 '21 09:06 jaydeepk3

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.

cbg-dev-k avatar Jun 17 '21 13:06 cbg-dev-k

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 😓

chwastek avatar Jun 18 '21 13:06 chwastek

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

ardavydov avatar Jun 18 '21 13:06 ardavydov

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

https://github.com/dpwilhelmsen/XCDYouTubeKit/commit/523a63f694eca438f72a295c54abf4f2640da1a1

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.

dpwilhelmsen avatar Jun 19 '21 09:06 dpwilhelmsen

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?

ghost avatar Jun 24 '21 12:06 ghost

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'

nikolaenkoag avatar Jun 25 '21 05:06 nikolaenkoag

This helped me too https://github.com/0xced/XCDYouTubeKit/issues/525#issuecomment-843923468

NikKovIos avatar Jun 25 '21 10:06 NikKovIos

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

This works for me.

devguy221 avatar Jul 09 '21 14:07 devguy221

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

coachdesign avatar Jul 26 '21 10:07 coachdesign

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

mirco1000 avatar Jan 01 '22 23:01 mirco1000

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 🥲

Pgmr-sagar avatar Jan 05 '22 14:01 Pgmr-sagar