Access to the TOI/JS interface is done through the toi
object members. See Services for a list of TOI services and how to access them.
The toi
object also has a member toi.consts
, which may be used e.g. to access constants for objects otherwise only accessible through instantiating functions. For instance the ToiMediaPlayerBase::TIMESHIFT_STATE_BUFFERING constant is also found at toi.consts.ToiMediaPlayerBase.TIMESHIFT_STATE_BUFFERING
.
The toi.utils
member gives access to helper functions, currently only the toi.utils.convertToiException(e)
function. Read more about it in the TOI/JS interface documentation.
The toi.statics
member is used for creation of TOI structures. The methods in toi.statics
are documented on each structure interface page respectively. E.g. an instance of ToiFrontPanelServiceLedState is created through toi.statics.ToiFrontPanelServiceLedState.create(<color>, <blinkFrequency>)
.