stbEpgManager

stbEpgManager

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
id channel unique identifier which EPG is updated
brief true - brief EPG is updated, false - schedule EPG is updated

See stbEpgManager.getBrief and stbEpgManager.getSchedule.

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

See:

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

See:

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(id) → {Array.<stbEpgManager~epgProgramInfo>}

Get brief EPG (present and following program) for specified channel.

Parameters:
Name Type Description
id string

channel unique identifier from stbDvbChannelList~dvbChannelInfo

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({
    id: 'C_4601_634000'
});
// given time range
var schedule = stbEpgManager.getSchedule({
    id: 'C_4601_634000',
    start: 1428307972,
    end: 1428329461
});
// full schedule from the given start time
var schedule = stbEpgManager.getSchedule({
    id: 'C_4601_634000',
    start: 1428307972
});
// full schedule till the given end time
var schedule = stbEpgManager.getSchedule({
    id: 'C_4601_634000',
    end: 1428329461
});
Parameters:
Name Type Description
config Object

configuration object

Properties
Name Type Attributes Description
id string

channel unique identifier from stbDvbChannelList~dvbChannelInfo

start number <optional>

range start in seconds since epoch

end number <optional>

range end in seconds since epoch

Returns:

schedule EPG data

Type
Array.<stbEpgManager~epgProgramInfo>

(static) onEpgInfo(data)

See:

DVB Channel EPG update.

Example
{
    id: 'T2_11_650000',
    brief: true
}
Parameters:
Name Type Description
data Object

event info

Properties
Name Type Description
id number

DVB Channel identifier

brief string

short description

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'
}