youtube-ios-player-helper
youtube-ios-player-helper copied to clipboard
UIWebView is not available on tvOS
If I wanted to play a YouTube video on Apple's tvOS, how should I do it? UIWebView is not available.
An answer to this would be really helpful.
Currently it looks like we're going to need to wait for Google/YT to release an official mechanism for accessing the raw MP4, if they decide to do so.
One would assume they could componentize the mechanism they built for their iOS app.
+1 for this issue
:+1:
+1
+1
+1
+1
As far as I figured out UIWebView is needed because it embeds a UIWebView that open the html5 player, am I wrong? Isn't there any way to expose directly the streaming file and use it via AVPlayer? But prob is pretty against your TOS...
It's against the ToS because it won't display the ads.
It would be interesting to port the structure in swift/objc with AVPlayer for the player, UIButton for banners etc.
I just spent 2 weeks building my app, only to find out that I can't because I can't play YouTube videos without a UIWebView. ;) Should have realized it earlier. +1 on something that will allow us to do this.
@cdrx I believe the ad playback functionality was removed in PR #58. It never worked properly anyways.
Anyone try to build WebKit for tvOS? There's a guide for iOS here if anyone wants to work off of that: https://www.webkit.org/blog/3457/building-webkit-for-ios-simulator/
@JALsnipe does apple allow apps with custom built WebKit ?
No
@jalsnipe that is a separate issue. You will still (occasionally) get pre-roll ads on iOS using this component.
@cdrx Can you give me an example video id where this occurs?
@jalsnipe example of the top of my head - no. Pre-roll ads on iOS are rare, but they do happen. They never last more than 30 seconds.
@JALsnipe prob it would not work, some libs are not working in this first beta release of tvOS and probably will never be (as far as I figured out).
+1
+1
Pingggg
+1
+1
+1
+1
There are lot of Parsers available to fetch the video, but they are all against Youtube TOC, because it stops ad displays for User. So, only way is an update from TVos with support of Webview.
@Keyar, I don't fully agree. There are other options. YouTube can alter their Terms of Service to allow extracting video stream by tvOS apps (not likely to happen IMHO), or (BETTER!) providing a YouTube SDK for tvOS with working YouTube player. Right now, because of their ToS and lack of SDK there is no way of playing YouTube content on tvOS.
I also find it awkward that no YouTube engineer responded yet in this thread.
+1
+1