SmartTV Services

From SAM
Jump to: navigation, search

A Smart TV Service or "App" is a type of application written for a Smart TV Platform (device). This page describes briefly what it typically consists of, which standards are available that describe how a Smart TV Service is written and provides some further background information. Smart TV itself is a broad term, that concerns both Services/Apps as well as native functionality of a Smart TV device. For the purpose of this page, this native functionality (Electronic Program Guide, PVR functionality etc.) is out-of-scope.


The most common form of a Smart TV App/Service is (web) browser-based. Additionally, some newer platforms expose additional non-browser based API's for making Smart TV Apps, such as Android. This page describes the common browser based Smart TV Apps. In addition it will also cover some description of native android based app and some functionalities it can provide. Also, there are some discussions related to some services/functionality used in our app which is combination of web and native functionality. This kind of app is known as Hybrid App.

Examples of Smart TV Apps/Services that run inside a browser:

  • Netflix
  • BBC iPlayer
  • ARD/ZDF Mediathek
  • Uitzending Gemist

Hybrid Application

Hybrid Application combines the features of both the native world and HTML5 world. Hybrid app is defined as a web app which primarily is built using HTML5, JavaScript and similar web technologies and that is then wrapped inside a thin native container that provides access to native platform features.

In SAM, the Smart TV First Screen App is basically an android application, which after launch triggers the browser application to launch which then acts as a container to show Generic Dashboard web application. As it is a native android application, so its can use all the native features/services of the Smart TV.

Relevance to SAM

A Smart TV can be a device representation for SAM, and this page is part of the "Multi-device Representation and 2nd Screen" RTD work package. This page specifically focuses on the format of the representation layer, which should be compatible with Smart TV devices.

State of the Art Analysis

Smart TV Standards

A number of standards have been made that describe how a Smart TV App/Service can be written, a list of some of the more known standards:

  • CEA-2014 (describes CE-HTML, a HTML4 subset) [1]
  • HbbTV 1.5 (based on CE-HTML) [2]
  • Open IPTV Forum (based on CE-HTML) [3]
  • Smart TV Alliance (based on HTML5) [4]
  • Smart Android TV Developer Apis [5]

The latest standards for Smart TV Apps that run inside a browser are based on HTML5[6] (related) standard(s), which offers for example advanced use cases for media streaming and improved user interface design options.

Typical service architecture

Native Smart TV Application runs on native TV platform. This application has the capability to use all Smart TV native features.

Browser based Smart TV Applications run on the (web) browser that resides in the Smart TV Client. The code is hosted on a remote server, that is accessed over the HTTP[7] protocol. Below is a description of both client and server interface for the Smart TV Application. The picture shows an overview of the relationship between the client and server for rendering and controlling a Smart TV Application.

Hybrid Application is the combination of both kind of application ie Native Smart TV Application and Browser based Smart TV Application. In hybrid application, the native application can launch browser from inside it which can then run the web application.

Smart TV Service/App Architecture (client/server)

Server side

Unlike native applications, Smart TV Apps that are browser based are hosted on an HTTP server, just like regular web pages on the internet. This also implies that these applications do not have to be pre-installed on the platform on which they run, but can be started from the remote server location (using a Uniform Resource Locator, URL), just like opening a web page in a desktop browser. On some platforms, configuration of the Service URL can still be done using a small pre-installed application, but this application would typically only contain Metadata (URL, description, title, etc.). Some related concepts, such as Widgets, do allow for the possibility to pre-install actual packaged application data to the client, but only a very few Smart TV platforms support this type of downloaded application, which still has to gather data (media, real-time data) from a remote server, just like a regular Smart TV App.

Based on the standard for which the App is written, the server can contain some extensions to allow for more advanced use cases. Examples of such use cases:

  • Digital Rights Management (DRM), for securing served media content.
  • Adaptive Streaming Server, for serving streaming media to the client according to one of the known 'Adaptive Streaming' protocols [8]. Examples are HTTP Live Streaming [9], MPEG-DASH [10] and Smooth Streaming [11].
  • Cross-Origin Resource Sharing, enabling the sharing of resources that are not located on the server that is hosting the content.

Client side

The Smart TV App itself is written in a language such as HTML(5), with certain client-side extensions that are part of the standard for which the App was written. Important client-side building blocks of an App:

  • HTML [12] - the markup language describing the Application
  • CSS [13] - Cascading Style Sheets, for defining/modifying the look and feel of the application. Refer also to the SmartTV User Interfaces page.
  • DOM [14]- Document object model, not a specific component, but the representation of the application inside the browser. Javascript is used to modify this representation.
  • Javascript [15] - Dynamic scripting language to modify the applications runtime behaviour
  • Miscellaneous content, such as pictures and remote data (JSON [16], XML [17]) served over the XMLHTTPRequest [18] interface

Client-side extensions of an application are for example:

  • Capability description mechanisms - some standards offer methods to retrieve the Smart TV Platform capabilities, these capabilities can then be used to adapt the Application to the Platform. Example of a capability is the availability of color-keys on the remote control, or the presence of a specific DRM method.
  • Special key constants - a uniform way to refer to remote control key codes inside the App. Instead of codes (20, 23, etc.) that differ per Smart TV Platform, some standards define constants such as VK_PLAY, VK_RED, VK_1 that are the same regardless of the platform on which the App is running.
  • Media playback - although part of HTML5, some earlier standards describe specific extensions to play back media inside the browser. Additionally, these extensions can in later standards be combined with DRM functionality. HTML5 offers advanced options for media playback that include closed captioning and multi-track audio.
  • Multi-screen functionality - the latest Smart TV standards support methods to interact between the TV device and an external device such as a Smart Phone through various Multi-screen protocols such as DIAL[19]. Refer to Multiscreen (App-to-app) Communication for more information.

Developing a Smart TV Service/App

As the Smart TV App is running in a browser, developing the app can be done using known web developer tools. However, Smart TV standards such as the ones described above will sometimes offer Software/Service Development Kits that include documentation and tooling specifically targeted towards development for that standard. This tooling can consist of an emulator to test the App, documentation on best practices and Integrated Development Environments to quickly create a new App from scratch. An advantage of using such an SDK over more rudimentary development methods is that the tooling will render and validate the application based on the Smart TV Platform that will ultimately run the application, without the need to obtain specific Smart TV hardware, thereby shortening the development cycle considerably. Additionally, the SDK can offer tooling for advanced debugging of the application which, by design, is often not available on regular Smart TV platforms.

Examples of Software/Service Development Kits:

  • Tizen SDK [20]
  • Smart TV Alliance SDK [21]

Developing of Sam Smart TV Service/App

In SAM, the Smart TV is an Android Smart TV. The Smart TV app in an hybrid app, so it combines the features of android platform and Web App. The application is launched as native android application. Once launched, it has the capability to launch browser application from inside which can then host the web app.

The services used in this application which are provided using Android APIs are :

  • Network Service Discovery (NSD) [22]
  • Web Sockets for communication between First Screen and Second Screen
  • Web Server for hosting Web Application in first screen

The web related services are provided through Web Browser which is launched from inside the application.


  1. CEA-2014
  2. HbbTV
  3. Open IPTV Forum
  4. Smart TV Alliance
  5. Android TV Developer APIs
  6. HTML5
  7. HTTP
  8. Adaptive streaming
  9. HTTP Live Streaming
  11. Smooth Streaming
  12. HTML
  13. CSS
  14. DOM
  15. Javascript
  16. JSON
  17. XML
  18. XMLHTTPRequest
  19. DIAL
  20. Tizen SDK
  21. Smart TV Alliance SDK
  22. NSD