Teletext Element
Introduction
The teletext element provides DVB teletext stream visualisation and interaction
(list pages/subpages, process coloured keys). The element is implemented as windowless
(i.e. it does not have its own window, but it draws some data).
Teletext functionality is optional, and is implemented as an external NPAPI runtime plugin.
Embedding
Adding Teletext Support
To add support for teletext, the teletext NPAPI plugin IIP needs to be included
in the boot image configuration file:
kreatv-option-npapi-teletext
Embedding teletext in an HTML portal
The API for the teletext element is accessible via an 'api' member variable when
using the HTML Browser. See the general use example below. A complete HTML portal
example is also included in the kit.
Programming API
inputDigit(short digit) |
Process input of one digit for a page selection. Digit should be 0-9 |
inputRedKey()
inputGreenKey()
inputYellowKey
inputCyanKey()
|
Process colored key press. |
gotoIndexPage() |
Switch to page 100. |
gotoNextPage() |
Navigate to the next page. |
gotoPreviousPage() |
Navigate to the previous page. |
gotoNextSubpage() |
Navigate to the next subpage. This only works if the controllableSubPages property is set to true |
gotoPreviousSubpage() |
Navigate to the previous subpage. This only works if the controllableSubPages property is set to true |
toggleHold() |
Method for toggling the hold state. When the hold state is active, the automatic
updating of the subpage is disabled, otherwise it is enabled. Holding is inactive by
default, and it will toggle between activated and deactivated when calling this method. |
toggleZoom() |
Method for toggling the zoom state. If called when in the normal zoom size,
this will first display the upper half of the current page in double size.
On the next call it will display the lower half of the current page in double
size. On the third call it will restore the normal size. It is in normal
size by default. |
toggleReveal() |
Method for toggling the reveal state. When the reveal state is active, hidden
text will be shown. It is inactive by default, and it will change
between inactive and active when calling this method. |
transparent |
If this property is true then the teletext background is transparent, allowing you to see the portal or video graphics behind it, otherwise it is opaque.
This affects only colored areas of teletext, i.e. if some screen are is to be drawn
transparent (suge as teletext subtitles on page 888) it is always transparent. |
stretch |
If true then teletext is scaled to fullscreen, otherwise teletext is
scaled by keeping original aspect ratio(720:576) and a margin may be left on
left/right or top/bottom. The default value is true
stretch=false will result in compressed teletext on the analog video output.
|
controllableSubPages |
If true, the sub-pages navigation controls are enabled, otherwise subpages
are switched automatically. The default value is false. Some teletext pages can contain several subpages which are displayed one-by-one after some delay. When
subpage navigation is enabled, a counter appears in the top left corner,
next to the page number, like 2(5), and the sub-pages are switched using
gotoPreviousSubpage() and gotoNextSubpage() calls, and the automatic updating is disabled. |
Examples
Set teletext visibility
General usage example