WebAPI/TVAPI

< WebAPI

Contents

TV API Specification

Goals

TV Manager API enables the development of web-based applications to acquire the information from service providers as well as to manage the native TV hardwares (i.e. tuners). The capability includes:

  • control and switch the TV sourcing based on channel identifiers
  • provide EPG type of information, including the list of TV programs and related information
  • interact with TV platform for presenting the TV program and other supplemental content appropriately
  • overlay the channels and supplemental information in a hybrid broadcast/broadband environment

Status

  • See bug 980768 for overall TV support.
  • See bug 998872 for the implementation of TV Manager API.
  • At beginning, this API is only exposed to certified apps.

Contributors

Sean Lin, Gene Lian, and Gary (PoYu) Chen.

Features

TV Manager API supports the following features.

Tuner, channel, and program management

  • The web content is able to know the number of tuners on the device, and the broadcasting types (DVB-T, DVB-S, etc.) supported by each of them.
  • The TV tuner, which may have its own scanning algorithm provided by the vendor, can scan broadcasting channels. The scanning status and the information of discovered channels are exposed to the web content.
  • The web content is able to control/select TV channels with the tuner on the device.
  • The web content is able to receive the information of Electronic Program Guide (EPG) as well as the dynamic updates provided by broadcasters/service providers.
  • A TV program may have multiple video/audio tracks in the same broadcasting stream.
  • The web content may flexibly manipulate multiple tuners. For example, it may only consume one tuner for watching and recording a given channel at the same time. Yet when it comes to switch to another channel to watch, in order not to affect the original recording task against the tuner, the app may take another tuner to do so, if resource permitted.

Streaming management

  • The web content may play the broadcasting stream content while browsing through the list of other currently broadcasted programs.
  • The web content is able to suffice the scenarios of concurrently displaying multiple streams (i.e. Picture-in-Picture).
  • This API utilizes MediaStream interface in Media Capture and Streams API, which contains video and audio tracks, for streaming management. And the streaming content can be played with HTML5 <video> element by assigning the media stream to HTMLMediaElement.

Emergency alert

  • The web content can receive emergency announcements for earthquake, tsunami, fire, etc.

Extended TV use cases

  • For recording scheduling, the app may utilize DataStore API (or some other storage mechanisms) as a centralized schedule pool and handle potential time conflicts between requests. It can also use TV Manager API to get the data of TV series and listen to possible updates if necessary. Besides, Alarm API may help schedule tasks.
  • If the app plans to support searching or other customized openrations on channel or EPG data, DataStore API (or some other storage mechanisms) may be used to store the correspondent data. Even when the app is not running, System App or service workers may help listen to EPG updates and reflect the change to stored data.
  • For operations about configuration/settings, such as language selection on TV device, Settings API is the right way to do so.

DOM API

Please see TV Manager API for spec details.

Examples

Please see TV Manager API examples.

Reference