EPG
The EPG module lets you load Programme Guide information for DVB Channels.
There are two ways to get Events, distinguished mostly by use-case:
- The loadSchedule function will return Events for a single Channel in a specified time-range. The main use case will be to populate an EPG display.
- The loadPreviousNowNext function will return a Channel's current Event, the one before and the one immediately after. The main use case will be to display an info bar during DVB playback.
Events can be used to plan Recordings.
Members
onPreviousNowNextChanged
Signals that the Previous, Now and Next Events for a Channel have changed. The listener will be passed the following arguments:
-
mrl: The Channel for which the Previous, Now and Next Events changed.
-
events: An Array of two Events. The first is the Previous Event, the second is the Now Event and the third is the Next Event.
Methods
getEITScheduleLimit()
Get the current setting for the number of hours of EIT data that is kept.
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - limit: The EIT schedule limit (0-65535). 0 means unlimited schedule. |
loadNowNext()
This function is deprecated. Call loadPreviousNowNext and remove the first entry of the completion handler's parameter to get the same results.
loadPreviousNowNext(mrl)
Gets a Channel's Previous, Now and Next events, in that order. The Now Event is the one currently playing. The Next Event is the one following immediately after. The Previous Event is the one that was playing before the Now Event.
Parameters:
| Name | Type | Description |
|---|---|---|
mrl | MRL | The channel for which to get the Events. |
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - events: An Array of three Events. The Previous Event is at index 0, the Now Event at index 1 and the Next Event at index 2. |
loadSchedule(mrl, filter, template)
Returns all of a Channel's Events within a certain time-range. The time-range is inclusive, so even events that only partially fall within its borders will be inclued.
Passing null for filter.offset and filter.limit will return all elements.
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mrl | MRL | The Channel's MRL. | |||||||||||||||
filter | Object | A filter for the returned Array. Properties:
|
Returns:
| Type | Description |
|---|---|
| A promise. | The completion handler will be passed the following arguments: - events: An Array of Events, populated as per the template. |
setEITScheduleLimit(limit)
Set the number of hours of EIT data that is kept for each service that has not disabled it's EIT schedule.
Parameters:
| Name | Type | Description |
|---|---|---|
limit | Number | Number of hours of EIT data to be kept. 0 turns this feature off and all data will be kept. limit must be within [0, 65535]. |
Returns:
| Type | Description |
|---|---|
| A promise. | No arguments are passed to the completion handler. |
Type Definitions
Event
A description for an EPG Event.
Properties:
| Name | Type | Description |
|---|---|---|
| channelUrl | MRL | The Channel on which the Event appears. |
| id | Number | The event id for the given event. |
| name | String | The Event's name. |
| startDateTime | Number | The Event's start time in msecs since Epoch. |
| stopDateTime | Number | The Event's stop time in msecs since Epoch. |
| duration | Number | The Event's duration in msecs. |
| shortDescription | String | The Event's short description. |
| extendedDescription | String | The Event's extended description. |
| hasSubtitle | Boolean | True when DVB subtitles are signalled as being available for the given event. |
| hasAudioDescription | String | True when audio description is signalled as being available for the given event. (UNCLASSIFIED = 0x00, MOVIE = 0x10, NEWS = 0x20, SPORT = 0x40, CHILD = 0x50, MUSIC = 0x60, ARTS = 0x70, SOCIAL = 0x80, EDUCATION = 0x90, LEISURE = 0xA0, SPECIAL = 0xB0, RESERVED1 = 0xC0, RESERVED2 = 0xD0, RESERVED3 = 0xE0, USER_DEFINED = 0xF0) |
| parentalAge | Number | The Event's parental age value. |
| contentType | Number | The Event's level 1 value of the first content identifier for the given event. |
| crid | Number | The programme CRID (Content Reference Identifier ) of the given event (excluding Instance Metadata Identifier). |
| seriesCrids | Number | The number of series CRIDs for the given event. |