User Tools

Site Tools


Sidebar

Translations of this page:

Contacts Us

  • Contact Us

en:stb_webkit:faq:example_api


Attention! It is strongly recommended to read next document: JavaScript API for controlling IPTV devices

Minimal HTML page. Start playing the stream.

Example 1.

Example of minimal HTML page which load and perform the stream's playing (RTP in this case).

Code

Example 2.

Minimal HTML page. Starting playback stream RTSP, with preset parameters RTSP-server.

RTSP-server:

  • Server type: 4 - Live555;
  • Control flags: 32 (0x20) – Use UDP transport to send video:
  • 1 – switch on the keep-alive mode.

More details about setting parameters RTSP-server (Section stb.SetupRTSP page 35)

Code

Event Model

Example 3.

The stream will be requests again if there is “event 1”.

Code

Example 4.

The stream will be requests again if there are “event 1” and “event 5”. In current time <var check_time> the file <var fileName> begins to play from the root directory of USB-storage which connected to STB. When the file stops to play (or there is no file) then the stream <var streamURL> requests to play.

  • var check_time - Time in 24h format
  • var streamURL - Stream address
  • var fileName - File name on USB-storage

Code

Example of realization

Connect to STB via SSH.

login - root
pswd - 930920

Run the commands:

mv /home/web/services.html /home/web/services.html.old
vi /home/web/services.html

To copy the code of HTML page in services.html

Quit from “vi” editor with saving.

Reboot STB:

reboot

In this case HTML page <services.html> will be loaded with STB without main menu of the inner portal.

Mini Portal

Example 5.

Example of “mini portal” which will be loaded with STB run. It allows to play a certain number of streams with the ability to control STB with remote control. The user interface is a page with IPTV channels logo and ability to choose channel for watching..

Download mini-portal

Example "How to use"

Download the file. Unzip the file into your Web-server catalog. Those files must be available, for example: http://your_server/mini_portal/index.html

For the test run

To connect STB via SSH.
login: root
pswd: 930920

Run the commands:

killall stbapp
/usr/share/qt-4.6.0/stbapp -qws -display directfb http://your_server/mini_portal/index.html

2D Navigation

Example 6.

Example of using 2D-navigation

Code

DVB tunning / level of signal

Example 7.

Code

en/stb_webkit/faq/example_api.txt · Last modified: 2022/02/09 12:41 (external edit)