Channel class

The Channel object represents a broadcast stream or service.

Channel objects typically represent channels stored in the channel list. Channel objects may also represent locally defined channels created by an application using the createChannelObject() methods on the video/broadcast embedded object or the ChannelConfig class or the createChannelList() method on the ChannelConfig class. Accessing the channel property of a ScheduledRecording object or Recording object which is scheduled on a locally defined channel will return a Channel object representing that locally defined channel.

Except for the hidden property, writing to the writable properties on a Channel object will have no effect for Channel objects representing channels stored in the channel list. Applications should only change these writable properties of a locally defined channel before the Channel object is referenced by another object or passed to an API call as an input parameter. The effects of writing to these properties at any other time is implementation dependent.

Constants

NameValueUse
TYPE_TV0Used in the channelType property to indicate a TV channel.
TYPE_RADIO 1 Used in the channelType property to indicate a radio channel.
TYPE_OTHER 2 Used in the channelType property to indicate that the type of the channel is unknown, or known but not of type TV or radio.
TYPE_ALL 128 Used during channel scanning to indicate that all TV, radio and other channel types should scanned.
TYPE_HBBTV_DATA 256 Reserved for data services defined by [TS 102 796].
ID_DVB_C 10 Used in the idType property to indicate a DVB-C channel identified by the three properties: ‘onid’, ‘tsid’, ‘sid’.
ID_DVB_S 11 three properties: ‘onid’, ‘tsid’, ‘sid’.
ID_DVB_T 12 Used in the idType property to indicate a DVB-T channel identified by the three properties: ‘onid’, ‘tsid’, ‘sid’.
ID_DVB_SI_DIRECT 13 Used in the idType property to indicate a channel that is identified through its delivery system descriptor as defined by DVB-SI [EN 300 468] section 6.2.13.
ID_DVB_C2 14 Used in the idType property to indicate a DVB-C or DVB-C2 channel identified by the three properties: ‘onid’, ‘tsid’, ‘sid’.
ID_DVB_S2 15 Used in the idType property to indicate a DVB-S or DVB-S2 channel identified by the three properties: ‘onid’, ‘tsid’, ‘sid’.
ID_DVB_T2 16 Used in the idType property to indicate a DVB-T or DVB-T2 channel identified by the three properties: ‘onid’, ‘tsid’, ‘sid’.
ID_IPTV_SDS40 Used in the idType property to indicate an IP broadcast channel identified through SD&S by a DVB textual service identifier specified in the format “ServiceName.DomainName” as value for property ‘ipBroadcastID’, with ServiceName and DomainName as defined in [DVB-IPTV]. This idType SHALL be used to indicate Scheduled content service defined by [OIPF_PROT2].
ID_IPTV_URI41 Used in the idType property to indicate an IP broadcast channel identified by a DVB MCAST URI (i.e. dvb-mcast://) or by a URI referencing a HAS or MPEG DASH MPD (i.e. http:// or https://), as value for property ipBroadcastID.

Properties

This section details the properties of the Channel object.

readonly Integer channelType
The type of channel. Assigned by the terminal to TYPE_TV or TYPE_RADIO based on the service type signalled in SDT/service descriptor/service type or undefined otherwise.
readonly Integer idType
The type of identification for the channel. Assigned by the terminal based on the type of channel, if the channel was discovered by a channel scan, or by the application using the value passed in the createChannelObject() method.
readonly String ccid
Unique identifier of a channel within the scope of the terminal. The ccid is defined by the terminal and will have the prefix ‘ccid’: e.g. ‘ccid:{tunerID.}majorChannel’.

Note: the format of this string is platform-dependent.
readonly Integer onid
DVB original network ID. Assigned by the terminal from SDT.onid or by the application using the value passed in to the
createChannelObject() method.
readonly Integer nid
The DVB network ID. Assigned by the terminal as follows:

If during the terminal configuration process, a network_id value was selected (either explicitly or implicitly) and the NIT subtable with that network_id value was used by the terminal to discover the correct delivery system descriptor of this channel, then the value of this property shall be that network_id value.

Otherwise, if there is exactly one NIT ‘actual’ subtable in the Transport Stream that is carrying the channel then the value of this property shall be the network_id in that subtable. Terminals are not required to update the value if it changes dynamically in the broadcast Transport Stream.

Otherwise the value shall be undefined.
readonly Integer tsid
DVB transport stream ID. Assigned by the terminal from SDT.tsid or PAT.tsid or by the application using the value passed in to the createChannelObject() method.
readonly Integer sid
DVB service ID. Assigned by the terminal from SDT.sid or by the application using the value passed in to the createChannelObject() method.
String name
The name of the channel. Typically, it will contain the call sign of the station (e.g. ‘HBO’). Assigned by the terminal from SDT/service descriptor/service name or undefined for Channel objects created by calls to the createChannelObject() method.
readonly Integer majorChannel
An integer property that shall be set to the value of the Logical Channel Number as defined by the logical channel information provided by the SI from the broadcast network.
 
The values shall be equal to the final LCN assignments after any sorting performed by the terminal as part of the channel scan only, taking into account other SI descriptors relating to network sorting (such as logical_channel_descriptor, HD_Simulcast_Logical_Channel_descriptor, target_region_descriptor, etc., as defined by the country profile).
 
It shall also be unaffected by any re-assignment of the LCN due to the terminal retaining and re-numbering duplicate services.
readonly Number terminalChannel
An integer property which shall be set to the value of the terminal’s Logical Channel Number as used by the terminal’s native UI. This allows for terminals to have different channel values (for example by way of user sorting) from the LCN values provided in SI by the broadcast network.
readonly String dsd
For channels of type ID_DVB_SI_DIRECT created through createChannelObject(), this property defines the delivery system descriptor (tuning parameters) as defined by DVB-SI [EN 300 468] section 6.2.13. The dsd property provides a string whose characters shall be restricted to the ISO Latin-1 character set. Each character in the dsd represents a byte of a delivery system descriptor as defined by DVB-SI [EN 300 468] section 6.2.13, such that a byte at position “i” in the delivery system descriptor is equal the Latin-1 character code of the character at position “i” in the dsd. Described in the syntax of JavaScript: let sdd[] be the byte array of a system delivery descriptor, in which sdd[0] is the descriptor_tag, then, dsd is its equivalent string, if : dsd.length==sdd.length and for each integer i : 0<=i<dsd.length holds: sdd[i] == dsd.charCodeAt(i).

For a DVB-T channel, the “delivery system descriptor” shall be a terrestrial_delivery_system_descriptor.

For a DVB-T2 channel, the “delivery system descriptor” shall be a T2_delivery_system_descriptor which shall include at least one centre_frequency field.

For a DVB-S channel, the “delivery system descriptor” shall be a satellite_delivery_system_descriptor.

For a DVB-S2 channel the “delivery system descriptor” shall be either a satellite_delivery_system_descriptor, or the concatenation of an S2_satellite_delivery_system_descriptor and a satellite_delivery_system_descriptor, in that order.

For a DVB-S2X channel, the “delivery system descriptor” shall be an S2X_satellite_delivery_system_descriptor.

For a DVB-C channel, the “delivery system descriptor” shall be a cable_delivery_system_descriptor.For a DVB-C2 channel that does not use channel bundling, the “delivery system descriptor” shall be a C2_delivery_system_descriptor.

For a DVB-C2 channel that uses channel bundling, the “delivery system descriptor” shall be the concatenation of one or more C2_bundle_delivery_system_descriptor.
readonly String ipBroadcastID
Terminals supporting the integration of the present document with ETSI TS 103 770 [96] shall support the ipBroadcastID property.

If the channel has an idType of ID_IPTV_SDS, this property denotes the DVB textual service identifier of the IP broadcast service, specified in the format “ServiceName.DomainName” with the ServiceName and DomainName as defined in [DVB-IPTV]. If the Channel has an idType of ID_IPTV_URI, this element denotes a URI of the IP broadcast service.

Methods

The Channel object has no methods.

Additional Notes

Application developers should be aware that some APIs return data that may not be authenticated. In some circumstances an attacker may be able to modify the broadcast signalling from which this data is derived. This particularly applies to the properties and methods of the Channel and Programme classes:

  • Applications should be written to be tolerant of values which are outside the expected range without hanging up, locking up or crashing.
  • Applications should treat the values returned by Channel.name, Programme.name, Programme.description and Programme.longDescription with caution as an attacker may modify the broadcast signalling to include HTML or JavaScript as well as values that are outside the expected set. Applications shall not use the data returned by these properties in a way that would result in them being executed by the browser.
  • Applications should treat data returned by the getSIDescriptors method with caution. Applications shall not use this data in a way that would result in that such data being executed by the browser. Applications should be written to be tolerant of values which are outside the expected range without hanging up, locking up or crashing.