- Tutorials:
Electronic Program Guide Manager.
Possible events:
event 42 (0x2A) "EPG updated"
When new EPG is found, player will trigger event 42 (0x2A) with the following event data:
{"id": "C_4601_634000", "brief": false}
where
| Name | Description | 
|---|---|
| uri | stream address or channel unique identifier which EPG is updated | 
| brief | true - brief EPG is updated, false - schedule EPG is updated | 
Members
(static) enable :boolean
- Default Value:
- false
 
Turn on/off EPG scanning subsystem.
To improve STB performance disable this option in case it's not in use.
Type:
- boolean
(static) primaryLanguage :string
Primary language to be automatically used for EPG subsystem.
It's a 2/3–symbol tags according to ISO 639 (for example, "ru", "rus", "en", "eng").
If not found the stbEpgManager.secondaryLanguage is selected.
Type:
- string
(static) secondaryLanguage :string
Secondary language to be automatically used for EPG subsystem.
It's a 2/3–symbol tags according to ISO 639 (for example, "ru", "rus", "en", "eng").
Type:
- string
Methods
(static) getBrief(config) → {Array.<stbEpgManager~epgProgramInfo>}
Get brief EPG (present and following program) for specified channel.
Example
var info = stbEpgManager.getBrief({
    uri: 'http://22.54.76.10:3390/'
});Parameters:
| Name | Type | Description | 
|---|---|---|
| config | stbEpgManager~briefConfig | content config to get info for | 
Returns:
EPG brief data
- Type
- Array.<stbEpgManager~epgProgramInfo>
(static) getSchedule(config) → {Array.<stbEpgManager~epgProgramInfo>}
Get schedule EPG (for long period or given time range) for specified channel.
Examples
// full schedule
var schedule = stbEpgManager.getSchedule({
    uri: 'http://22.54.76.10:3390/',
    program: 3
});// given time range
var schedule = stbEpgManager.getSchedule({
    uri: 'dvb://C_4601_634000/',
    start: 1428307972,
    end: 1428329461
});// full schedule from the given start time
var schedule = stbEpgManager.getSchedule({
    uri: 'dvb://C_4601_634000/',
    start: 1428307972
});// full schedule till the given end time
var schedule = stbEpgManager.getSchedule({
    uri: 'dvb://C_4601_634000/',
    end: 1428329461
});// schedule for the next day
var schedule = stbEpgManager.getSchedule({
    uri: 'dvb://C_4601_634000/',
    day: 1
});// schedule for the previous day
var schedule = stbEpgManager.getSchedule({
    uri: 'dvb://C_4601_634000/',
    day: -1
});Parameters:
| Name | Type | Description | 
|---|---|---|
| config | stbEpgManager~scheduleConfig | configuration object | 
Returns:
schedule EPG data
- Type
- Array.<stbEpgManager~epgProgramInfo>
(static) onEpgInfo(data)
- See:
- 
        - stbEvent.onEvent(event 42)
 
DVB Channel EPG update.
Example
{
    uri: 'http://12.56.34.23:4444/',
    program: 3,
    brief: true
}Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| data | Object | event info Properties
 | 
Type Definitions
epgProgramInfo
Properties:
| Name | Type | Description | 
|---|---|---|
| start | number | event start time in UTC seconds | 
| duration | number | event duration in seconds | 
| name | string | event name | 
| info | string | event info | 
| details | string | detailed event info | 
Brief EPG (present and following program) for specified channel.
See stbEpgManager.
Type:
- Object
Example
{
    start: 1377846480,
    duration: 3300,
    name: 'Program1_name',
    info: 'program1_info',
    details: 'program1_details'
}briefConfig
Properties:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| uri | string | address of the content | |
| program | number | <optional> | MPTS program number | 
Brief EPG request structure.
Type:
- Object
scheduleConfig
Properties:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| uri | string | address of the content | |
| program | number | <optional> | MPTS program number | 
| start | number | <optional> | range start in seconds since epoch | 
| end | number | <optional> | range end in seconds since epoch | 
| day | number | <optional> | selected day number from current day (overrules  | 
Schedule EPG request structure.
Type:
- Object