JS on the Big Screen: Making TV Apps

Rate this content
Bookmark

The ever-expanding landscape of JavaScript applications has now reached the big screen - yes, you heard it right, you can build TV apps with JavaScript! 


The TV operating space is a mess; there’s more fragmentation than the Android ecosystem, and that’s saying something. Each manufacturer has tried to reinvent the wheel by making their own OS. At the moment, the main players are Android TV, tvOS, WebOS, Tizen, among a whole myriad of others. 


This makes it a unique place where Javascript and web technologies can become a uniting factor and save you from the stress of trying to develop and maintain handfuls of apps for the big screen. 


We’ll talk about how to build TV apps, what JS frameworks can help in this, and explore the challenges that come hand-in-hand with TV app development, namely performance bottlenecks and focus management using remote controls.

Mo Khazali
Mo Khazali
22 min
17 Jun, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

JavaScript is widely used in web, mobile, and backend development, and now it is also being used to create TV apps. TVs with web-based operating systems can be targeted with JavaScript applications, and React is commonly used for TV app development. React Native allows for cross-platform TV app development, except for Roku. User interactions and focus management are important considerations in TV app development. Performance optimization is crucial for TV apps, as TVs have lower device scores and limited RAM. Spatial virtualization can significantly improve TV app performance.

1. Introduction to JavaScript on the big screens

Short description:

I'm very excited to be talking about JavaScript on the big screens and how you can make TV apps using JavaScript. JavaScript is absolutely everywhere. Today, more than 99% of web pages use JavaScript. It's everywhere. JavaScript has found its way into the mobile development world. JavaScript has become an integral part of the mobile ecosystem as well. And even backend, right? We've been seeing more and more backend runtimes of JavaScript or server-side runtimes of JavaScript. So JavaScript can effectively be used across the entire stack.

♪ Hi, everyone. Thank you for joining this session. I'm very excited to be talking about JavaScript on the big screens and how you can make TV apps using JavaScript. I'm very excited to be here with you at JS Nation this year.

A little bit about me. My name is Mo. I head the mobile team in the UK of Theodore and Bam. Theodore Group is a group of about 700 digital experts, and Bam is the mobile specialist team within that. We've been in the mobile space since about 2015 and very early adopters of React Native, and we've been doing React for a very long time as well. I've been very involved in the JavaScript ecosystem for quite a while and excited to be talking and sharing some of our learnings with you today.

JavaScript is absolutely everywhere. So it started from the web, and I found this very cool picture of a book talking about Netscape JavaScript in version 1.2. I think this book is from the late 90s. Today, more than 99% of web pages use JavaScript. It's everywhere. You cannot get away with building a web app without JavaScript. And more and more JavaScript frameworks have arisen over the years and are being used out in the wild, and we're very familiar with these. On the other side, JavaScript has found its way into the mobile development world. This is a quote that I always keep on referring back to, which is from Steve Jobs in 2007 when he's announcing the iPhone 3G, where he lays out the vision basically for PWAs. And it's really interesting to see that there is always this idea that JavaScript could be used to build really good apps on mobile phones. And that vision moved forward despite native app adoption through tools like Cordova, later Ionic on top of that, and React Native, which allows you to create native applications using JavaScript. So JavaScript has become an integral part of the mobile ecosystem as well. And even backend, right? We've been seeing more and more backend runtimes of JavaScript or server-side runtimes of JavaScript. So JavaScript can effectively be used across the entire stack.

2. JavaScript's Role in the TV Ecosystem

Short description:

But, you know, as you're sitting at home browsing on your phone, looking through your laptop, and all of these experiences of JavaScript, there's one more experience that's sitting in the background that is also powered by JavaScript. So let's take a quick aside, and then I want to go back into understanding where does JavaScript fit with TV. TVs are interacted with primarily by a remote. The TV operating system landscape is incredibly fragmented. The web-based operating systems can be targeted with any JavaScript application. It's very common for TV applications to use React.

But, you know, as you're sitting at home browsing on your phone, looking through your laptop, and all of these experiences of JavaScript, there's one more experience that's sitting in the background that is also powered by JavaScript. And that is the TV. And you'd be surprised to understand how much of the TV ecosystem is being powered by JavaScript.

So let's take a quick aside, and then I want to go back into understanding where does JavaScript fit with TV. But to set some of the prerequisites and the groundwork for this talk, I just want to quickly cover what some of the core components of a TV app are. So if we look at a blank screen, we've got a... In any TV app, we've got a top-level navigation, and then you've got a grid or a set of carousels. And the key factor here is that TVs are interacted with primarily by a remote, effectively.

So if you look at the TV operating system landscape, what you'll find is that it's actually incredibly fragmented far beyond anything that you see in mobile apps. And in terms of web browsers, web browsers are typically very much in feature parity and heavily Chromium-dominated these days. Whereas in the TV space, you've got so many different operating systems, each with large market shares. So there's so many different operating systems for TVs, and you can't really just target one of them. You really need to target almost all of them in order to have a strong media presence.

Now, web is pretty self-explanatory, right? The web-based operating systems can be targeted with any JavaScript application. They run HTML-based, JavaScript-based applications. So it's very common for TV applications to use React. But people also have started to use Preact quite extensively. Similarly, Solid. And interestingly, there is actually a TV specialized framework, which I'll get into in a little bit more detail later on, called Lightning.js. And Lightning.js actually uses Solid to define the UI of your application. So there's a lot of usage and there's a lot of focus as well on optimization.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Vite: Rethinking Frontend Tooling
JSNation Live 2021JSNation Live 2021
31 min
Vite: Rethinking Frontend Tooling
Top Content
Vite is a new build tool that intends to provide a leaner, faster, and more friction-less workflow for building modern web apps. This talk will dive into the project's background, rationale, technical details and design decisions: what problem does it solve, what makes it fast, and how does it fit into the JS tooling landscape.
Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a new web framework from the creators of React Router that helps you build better, faster websites through a solid understanding of web fundamentals. Remix takes care of the heavy lifting like server rendering, code splitting, prefetching, and navigation and leaves you with the fun part: building something awesome!
React Compiler - Understanding Idiomatic React (React Forget)
React Advanced Conference 2023React Advanced Conference 2023
33 min
React Compiler - Understanding Idiomatic React (React Forget)
Top Content
React provides a contract to developers- uphold certain rules, and React can efficiently and correctly update the UI. In this talk we'll explore these rules in depth, understanding the reasoning behind them and how they unlock new directions such as automatic memoization. 
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Too much JavaScript is getting you down? New frameworks promising no JavaScript look interesting, but you have an existing React application to maintain. What if Qwik React is your answer for faster applications startup and better user experience? Qwik React allows you to easily turn your React application into a collection of islands, which can be SSRed and delayed hydrated, and in some instances, hydration skipped altogether. And all of this in an incremental way without a rewrite.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
Interactive web-based tutorials have become a staple of front end frameworks, and it's easy to see why — developers love being able to try out new tools without the hassle of installing packages or cloning repos.But in the age of full stack meta-frameworks like Next, Remix and SvelteKit, these tutorials only go so far. In this talk, we'll look at how we on the Svelte team are using cutting edge web technology to rethink how we teach each other the tools of our trade.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Solid caught the eye of the frontend community by re-popularizing reactive programming with its compelling use of Signals to render without re-renders. We've seen them adopted in the past year in everything from Preact to Angular. Signals offer a powerful set of primitives that ensure that your UI is in sync with your state independent of components. A universal language for the frontend user interface.
But what about Async? How do we manage to orchestrate data loading and mutation, server rendering, and streaming? Ryan Carniato, creator of SolidJS, takes a look at a different primitive. One that is often misunderstood but is as powerful in its use. Join him as he shows what all the Suspense is about.

Workshops on related topic

Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
Featured WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
React Day Berlin 2022React Day Berlin 2022
86 min
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
Top Content
WorkshopFree
Hussien Khayoon
Kahvi Patel
2 authors
Using a library might seem easy at first glance, but how do you choose the right library? How do you upgrade an existing one? And how do you wade through the documentation to find what you want?
In this workshop, we’ll discuss all these finer points while going through a general example of building a code editor using CodeMirror in React. All while sharing some of the nuances our team learned about using this library and some problems we encountered.
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
WorkshopFree
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
WorkshopFree
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Hard GraphQL Problems at Shopify
GraphQL Galaxy 2021GraphQL Galaxy 2021
164 min
Hard GraphQL Problems at Shopify
WorkshopFree
Rebecca Friedman
Jonathan Baker
Alex Ackerman
Théo Ben Hassen
 Greg MacWilliam
5 authors
At Shopify scale, we solve some pretty hard problems. In this workshop, five different speakers will outline some of the challenges we’ve faced, and how we’ve overcome them.

Table of contents:
1 - The infamous "N+1" problem: Jonathan Baker - Let's talk about what it is, why it is a problem, and how Shopify handles it at scale across several GraphQL APIs.
2 - Contextualizing GraphQL APIs: Alex Ackerman - How and why we decided to use directives. I’ll share what directives are, which directives are available out of the box, and how to create custom directives.
3 - Faster GraphQL queries for mobile clients: Theo Ben Hassen - As your mobile app grows, so will your GraphQL queries. In this talk, I will go over diverse strategies to make your queries faster and more effective.
4 - Building tomorrow’s product today: Greg MacWilliam - How Shopify adopts future features in today’s code.
5 - Managing large APIs effectively: Rebecca Friedman - We have thousands of developers at Shopify. Let’s take a look at how we’re ensuring the quality and consistency of our GraphQL APIs with so many contributors.