- Tutorials:
Main object stbEvent to receive messages from STB application.
Event model in JavaScript assumes the possibility for API user to receive different subsystems events indicating some changes.
The code of the last event is also stored in the stbEvent.event
.
Members
(static) event :number
- Deprecated:
- Yes
The code of the last event.
The following events are defined:
Value | Description |
---|---|
1 | The player reached the end of the media content or detected a discontinuity of the stream. |
2 | Information on audio and video tracks of the media content is received. It's now possible to call gSTB.GetAudioPIDs etc. |
4 | Video and/or audio playback has begun. |
5 | Error when opening the content: content not found on the server or connection with the server was rejected. |
6 | Detected DualMono AC-3 sound. |
7 | The decoder has received info about the content and started to play. It's now possible to call gSTB.GetVideoInfo. |
8 | Error occurred while loading external subtitles. |
9 | Found new teletext or subtitles in stream. |
32 (0x20) | HDMI device has been connected. |
33 (0x21) | HDMI device has been disconnected. |
34 (0x22) | PVR task has been finished successfully. |
35 (0x23) | PVR task has been finished with error. |
36 (0x24) | External protocol event (e.g. "TimeShift") |
37 (0x25) | Download manager job is completed successfully. |
38 (0x26) | Download manager job is failed. |
39 (0x27) | PVR task recording is started. |
40 (0x28) | DVB channels scanning is in progress. |
41 (0x29) | DVB channel is found. |
42 (0x2A) | EPG info is updated. |
43 (0x2B) | DVB antenna is powered off. |
129 (0x81) | When playing RTP-stream the numbering of RTP-packets was broken. |
Type:
- number
Methods
(static) onEvent(event, infoopt)
- Deprecated:
- Yes
- See:
-
- stbPlayer.onPlayEnd
- stbPlayer.onTracksInfo
- stbPlayer.onContentInfo
- stbPlayer.onPlayStart
- stbPlayer.onPlayError
- stbPlayer.onTracksError
- stbPlayer.onDualMono
- stbPlayer.onTracksUpdate
- stbPlayer.onRTPBreak
- stbPlayer.onTimeShift
- stbDisplay.onStateChange
- pvrManager.onTaskStart
- pvrManager.onTaskFinish
- pvrManager.onTaskError
- dvbManager.onScanProgress
- dvbManager.onChannelFound
- dvbManager.onEPGInfo
- dvbManager.onAntennaPower
The function to be called when getting the player event.
It is used for processing the events in the portal with the event code as the parameter.
Warning: these events are only for the first player (stbPlayerManager.list[0]).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | type of event |
|
info |
string |
<optional> |
associated data in JSON format |
(static) onMessage(windowId, message, data)
Receive a message from a window.
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | |
message |
string | |
data |
string |
(static) onBroadcastMessage(windowId, message, data)
- Tutorials:
Receive a broadcast message from a window.
System messages:
Name | Description |
---|---|
storage.mount | some storage is mounted |
storage.unmount | some storage is unmounted |
Parameters:
Name | Type | Description |
---|---|---|
windowId |
number | |
message |
string | |
data |
string |
(static) onWebBrowserProgress(progress, status)
Callback on current web document loading.
Triggers every time the document loading progress changes.
Parameters:
Name | Type | Description |
---|---|---|
progress |
number | loading stage value [0..100] |
status |
number | possible error conditions found during the processing of the request (http://doc.qt.io/qt-5/qnetworkreply.html) |
(static) onWindowActivated()
Callback on browser web window activation.
(static) onMediaAvailable(mime, link)
Callback on internet browser link clicked to ask user what to do with link: play or download.
It is also used to start playing a downloaded item.
Parameters:
Name | Type | Description |
---|---|---|
mime |
string | MIME type of available content |
link |
string | link of available content |
(static) onScreenSaverOverride()
- Deprecated:
- Yes
(static) onScreenSaverActivation(mode)
Callback on screensaver activation/deactivation.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
mode |
boolean | possible values:
|
(static) onWifiStateChange(status)
- Since:
- v343
Callback fired on lost/restore wifi connection.
Parameters:
Name | Type | Description |
---|---|---|
status |
boolean | new network state |
(static) onLanStateChange(status)
- Since:
- v345
Callback fired on lost/restore ethernet connection.
Parameters:
Name | Type | Description |
---|---|---|
status |
boolean | new network state |
(static) onLanguageChange()
- To Do:
-
- add description
(static) onStandBy(data)
Change standby state.
Example
'{"prevState": 0, "nextState": 3, "source": 1}'
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | associated data object in JSON format Properties
|
(static) onVkNeedReposition(hint)
- Since:
- 0.2.18
"Virtual keyboard" window needs to change position.
Parameters:
Name | Type | Description |
---|---|---|
hint |
string | "Virtual keyboard" window position (set by (value is defined for web application level) recommended values see in |