youtube-ios-player-helper icon indicating copy to clipboard operation
youtube-ios-player-helper copied to clipboard

UIWebView is not available on tvOS

Open simonmaddox opened this issue 9 years ago • 62 comments

If I wanted to play a YouTube video on Apple's tvOS, how should I do it? UIWebView is not available.

simonmaddox avatar Sep 25 '15 10:09 simonmaddox

An answer to this would be really helpful.

williamsjj avatar Oct 07 '15 21:10 williamsjj

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.

johndavi avatar Oct 07 '15 21:10 johndavi

One would assume they could componentize the mechanism they built for their iOS app.

williamsjj avatar Oct 07 '15 21:10 williamsjj

+1 for this issue

matteocrippa avatar Oct 09 '15 21:10 matteocrippa

:+1:

mkral avatar Oct 13 '15 19:10 mkral

+1

r3econ avatar Oct 14 '15 13:10 r3econ

+1

yayoc avatar Oct 15 '15 06:10 yayoc

+1

spnkr avatar Oct 16 '15 06:10 spnkr

+1

blob42 avatar Oct 16 '15 19:10 blob42

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

matteocrippa avatar Oct 17 '15 09:10 matteocrippa

It's against the ToS because it won't display the ads.

cdrx avatar Oct 17 '15 09:10 cdrx

It would be interesting to port the structure in swift/objc with AVPlayer for the player, UIButton for banners etc.

matteocrippa avatar Oct 17 '15 11:10 matteocrippa

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.

bytor99999 avatar Oct 20 '15 21:10 bytor99999

@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 avatar Oct 20 '15 22:10 JALsnipe

@JALsnipe does apple allow apps with custom built WebKit ?

blob42 avatar Oct 20 '15 22:10 blob42

No

@jalsnipe that is a separate issue. You will still (occasionally) get pre-roll ads on iOS using this component.

cdrx avatar Oct 20 '15 22:10 cdrx

@cdrx Can you give me an example video id where this occurs?

JALsnipe avatar Oct 20 '15 22:10 JALsnipe

@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.

cdrx avatar Oct 20 '15 22:10 cdrx

@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).

matteocrippa avatar Oct 21 '15 08:10 matteocrippa

+1

WingedToaster avatar Oct 22 '15 13:10 WingedToaster

+1

mikerz avatar Oct 30 '15 18:10 mikerz

Pingggg

perezpaya avatar Nov 04 '15 22:11 perezpaya

+1

kentoh avatar Nov 05 '15 09:11 kentoh

+1

cm-hugog avatar Nov 10 '15 02:11 cm-hugog

+1

combi83 avatar Nov 12 '15 11:11 combi83

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 avatar Nov 17 '15 09:11 Keyar

@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.

r3econ avatar Nov 17 '15 10:11 r3econ

+1

sgenoud avatar Dec 07 '15 09:12 sgenoud

+1

sndrox avatar Dec 20 '15 11:12 sndrox