0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 627 forks source link

Add ability to fetch videos allowed to be watched on youtube only #315

Closed k06a closed 6 years ago

k06a commented 7 years ago

Should solve this issue: https://github.com/0xced/XCDYouTubeKit/issues/309

dnfodjo commented 7 years ago

Hi, I am still having that issue even after adding line of code

k06a commented 7 years ago

@dnfodjo are you sure you have exactly this issue? Video should be watched on YouTube site only?

k06a commented 7 years ago

@dnfodjo I had tested it on this video: https://www.youtube.com/watch?v=GVV06jTYjeY

HernanPaez commented 7 years ago

@k06a It doesn't work with this video https://www.youtube.com/watch?v=JGwWNGJdvx8

HernanPaez commented 7 years ago

@k06a Nevermind. I was testing on an old version of XCDYouTubeKit (2.5.4) the newest version is 2.5.5

k06a commented 7 years ago

Why not to merge this one-line fix?

nabeelahmed87 commented 6 years ago

Its not working with this url

https://www.youtube.com/watch?v=pqU29nHc-U0

SoneeJohn commented 6 years ago

@k06a Closing due to being an old PR. If you still wish to work on this please reopen a new PR and I'll review it.

k06a commented 6 years ago

@SoneeJohn why not to merge it? Just add Referer header to request:

[request setValue:[NSString stringWithFormat:@"https://youtube.com/watch?v=%@", self.videoIdentifier] forHTTPHeaderField:@"Referer"];
SoneeJohn commented 6 years ago

@k06a sorry I just needed to review it and rerun the unit test since the PR was old. Thanks for your contribution :-)