Play YouTube Videos in TVML App

Hi everyone,


I hope you are enjoying the new tvOS as much as I do. I would like to create an application for my employer, who offers video tutorials and bring them to the Apple TV. I thought that TVML might be a good idea and it indeed works like a charm. By setting up simple REST-Services, a TVML template engine and an ElasticSearch connection I am able to build the application at an amazing speed. However I am struggeling with the implementation of the video player, as all the videos are hosted on YouTube. For testing purposes I grab a Link directly from YouTube to stream the mp4 content, however I think this will not be possible in a productive system. What is the best way to solve this problem? From my point of view I have 3 possibilities:

  1. Keep on going and directly link to YouTube (which might get us in trouble with YT)
  2. Wait for YouTube to come up with a native app and redirect the user (which leads to bad UX, as we provide a lot of information next to the video)
  3. Build up a YouTube Proxy to grab an mp4 file as soon as it is requested for the first time and store it on some server (which leads to a lot of traffic on our servers)

Has anyone built something similar yet? I am open to any ideas.


Thanks in advance.
Kevin

Replies

I could be wrong, but I am in the same boat as you, trying to figure out how to play YouTube videos in a TVos app. At this point, since UIWebView is prohibited in code, therefore not available to even hack in a TVos app. the YouTube embedded video player will not be available. Unless you physically have the video file and have it Http Live Streamed via the spec, you won't be able to have your app play the video.


I really hope there is an alternative, but doesn't appear that there will be right away, if ever.


Mark

Hi, did you ever build something like this? I too need to build a TVos app for a specific youtube channel (with extra info / value added)

cheers