Comments (23)
pod 'XCDYouTubeKit', :git => 'https://github.com/armendh/XCDYouTubeKit', :branch => 'master', :commit => '651a6a51c695c5819eb51ba2f98d0b64094315b9'
https://console.cloud.google.com/apis/credentials?project=**projectName**
XCDYouTubeClient.setInnertubeApiKey(**key**)
from xcdyoutubekit.
For those looking for an alternative for tvOS, you can link to a video directly on the YouTube app with this URL scheme: youtube://watch/videoID
from xcdyoutubekit.
well, yeah, then you're stuck. My advice is for the rest of 99% of the devs that don't use tvOS.
from xcdyoutubekit.
@NikKovIos Thank you so much, it works well.
I just wondering why the commit (651a6a5) hasn't been merged yet.
from xcdyoutubekit.
It would be great if the owner of repo would do something. The community already did a lot!
from xcdyoutubekit.
Thank you for creating this issue.
I follow #545 by using the armendh's fork
pod 'XCDYouTubeKit', git: '[email protected]:armendh/XCDYouTubeKit.git', branch: 'master'
I created an API key following your explanation link and call setInnertubeApiKey
before anything else and it's working great. I'm in Europe if that matter.
XCDYouTubeClient.setInnertubeApiKey("MY_API_KEY")
Next step should be create an PR with a README update no ?
from xcdyoutubekit.
Next step should be create an PR with a README update no ?
Yep
And we need someone, who can merge this MR.
from xcdyoutubekit.
Thank @NikKovIos .
I tried your solution. It's working for me. But it doesn't work with livestream video.
Can you check it?
from xcdyoutubekit.
@tungdangplus sorry, don't have time for it. By the way, i'm not a owner of the repo, just a regular senior ios dev. You can find a solution by yourself and put it here. Just spend time.
from xcdyoutubekit.
Thanks for this,
Ryan
from xcdyoutubekit.
the problem is this will work... until it won't again. Not the nicest thing to happen when you have dozens of apps in production using it and all clients suddenly can't access some YT content.
Happened at least twice already, so it's better to avoid this lib altogether if you're doing any real production work and just go for the official lib.
from xcdyoutubekit.
@dcristolovean I agree with you but there is no official SDK available on tvOS. What to do then ?
from xcdyoutubekit.
@dcristolovean give a link for the official lib please.
from xcdyoutubekit.
https://developers.google.com/youtube/v3/guides/ios_youtube_helper
"Lib" might be too much to say, but after you play a bit with it, you can fit in it any design and make it behave like needed. You gotta face that YT will not just give you urls to play the content and will require a webview with their content inside in the future.
I didn't want to use this myself, preferred to get the URLs with xcdyoutubekit and then play them myself, but after 2-3 big failures over time, when the lib didn't work anymore and I have to republish tens of apps, I gave up on it and just moved to the webview approach.
from xcdyoutubekit.
@dcristolovean I agree with you but there is no official SDK available on tvOS. What to do then ?
Actually, webviews are the way to go there too. Considering that's what youtube_helper does anyway, you can directly use that one or create one yourself. I never coded for tvOS but I'm sure there's a way.
from xcdyoutubekit.
I never coded for tvOS but I'm sure there's a way.
Sadly, I don't think so: youtube/youtube-ios-player-helper#148
from xcdyoutubekit.
kinda old discussion, 2015.... anyway, another interesting thing:
"It's against the ToS because it won't display the ads."
That's why I said that at some point, surely you won't be able to just get a video url from YT and play it. There are so many reasons why they won't let you do that, I don't see a bright future for XCDYoutube.
from xcdyoutubekit.
defagos commented on Jan 22, 2016
You should really check out XCDYouTubeKit, it works great and supports tvOS as well.
@mikerz
mikerz commented on Jan 22, 2016
@defagos That's not a good recommendation, as it is against YouTube's terms of service. It bypasses their player and analytics. It should not be used in any production code beyond some fun prototype.
Exactly what I'm saying.
from xcdyoutubekit.
pod 'XCDYouTubeKit', :git => 'https://github.com/armendh/XCDYouTubeKit', :branch => 'master', :commit => '651a6a51c695c5819eb51ba2f98d0b64094315b9'
https://console.cloud.google.com/apis/credentials?project=**projectName**
XCDYouTubeClient.setInnertubeApiKey(**key**)
From today today there problems with playing videos with this solution
from xcdyoutubekit.
@Anvar102b place any logs. What is broken? What error?
from xcdyoutubekit.
Now I have Type 'XCDYouTubeClient' has no member 'setInnertubeApiKey'
. I couldn't find any declaration of it? Where is it supposed to be defined?
from xcdyoutubekit.
@secret3579 It should be documented before merging. If you have time to contribute π
from xcdyoutubekit.
@tungdangplus I also had issues with livestreams, I fixed my issues here -> https://github.com/KODIKAS-NL/XCDYouTubeKit.git
It also seems to work without setting the API key.
from xcdyoutubekit.
Related Issues (20)
- Error Domain=XCDYouTubeVideoErrorDomain Code=-3 "(null)" HOT 4
- Can't get the streamUrl of Live Stream HOT 11
- CP=βThis is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info.β
- No longer works: XCDYouTubeVideoErrorDomain error -3 HOT 22
- Unable to play youtube video in iOS app HOT 10
- getVideoWithIdentifier return XCDYouTubeVideoErrorDomain error HOT 25
- streamURL = nil for "LIVE NOW" videos(youtube). HOT 16
- (iOS) XCDYouTubeVideoErrorDomain: -2 with empty User Info for upcoming live stream HOT 2
- XCDYouTubeRequestTypeGetVideoInfo is resulting in a 404 response
- Error XCDYouTubeVideoErrorDomain -2 when i try open video HOT 23
- Error playing video HOT 11
- Video Takes a Long Time to Load - Same video performs differently daily HOT 11
- Get StreamUrls from Id is nil HOT 1
- [XCDYouTubeKit] Failed to decode response Code: -3 HOT 7
- Live video plays for last 2:00:00 hours only.
- Cannot play video with XCDYouTubeVideoErrorDomain Code: -2
- live video
- The following content is not available on this app. HOT 1
- Emergency fix HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcdyoutubekit.