2

Since Web Kit cant be used to distribute Apple TV application, I was searching through alternate ways to display web content in Apple TV app. Using TVML I could play video source from a web site from Apple TV app. My doubt is that can I display a web site by providing the link as like the UIWebView does!

I have already a developed web site with me and need to have a TV app version also. Is it possible ?

The following code works for me, and it loaded a video from a URL.

var player = new Player();
var playlist = new Playlist();
var mediaItem = new MediaItem("video", videoURL);
player.playlist = playlist;
player.playlist.push(mediaItem);
player.present();
Govind
  • 2,337
  • 33
  • 43
  • For anyone googling here, the simple answer is **no**, it's impossible to play a web page or a web view, on AppleTV. You have to custom make one of the "TVML" AppleTV apps. – Fattie Jun 28 '22 at 18:28

2 Answers2

1

If your plan is to load your existing website into a WebView you can take a look at this question. Even if you manage to load it, I doubt Apple will let you publish it.

If your existing web application serves parse-able data like JSON you can use it to bulid a TVML app.

As a reference you can check Apple's sample applications:

What you could also do, despite I would not recommend it is to modify your existing web application to serve TVML templates

Teneff
  • 30,564
  • 13
  • 72
  • 103
1

one way to do it might be with your server, you can let it serve down a tvml version of the site (maybe). But the underline thing is: it won't magically work, it requires work to be done.

Here are some reference you might found helpful

https://github.com/emadalam/atvjs

https://github.com/ramitos/react-tvml

kaho
  • 4,746
  • 1
  • 16
  • 24