Академический Документы
Профессиональный Документы
Культура Документы
API specification
Version 0.14.x Revision 1 Access level: CONFIDENTIAL - NDA required
Confidentiality: the information in this document is subject to non-disclosure agreements and must not be passed to other third parties without the express permission of Amino Communications Ltd. Disclaimer: this document describes components that undergo continual development. The information in this document is subject to change without notice at any time.
About Amino
Amino Communications (www.aminocom.com) supplies the AmiNET series of set-top boxes renowned for their low cost and reliability. The AmiNET range materially reduces service operators capital expenditure, whilst offering the full range of specification required; MPEG2 and MPEG4 encoding standards, standard and high definition TV, personal video recording and home networking. The high performance coupled with the innovative design of Aminos set-top boxes, have brought the series industry accolades and the company a leading position within the IPTV market. Approximately 700,000 AmiNET IPTV set-top boxes have been used in over 50 countries worldwide by more than 400 customers in commercial deployments and trials. The set-top boxes have also been sampled by another additional 700 customers. Amino Communications principal customers are telecommunications, broadcast and hospitality service operators. Generally, AmiNET products are supplied with the IntAct IPTV software stack pre-loaded. Amino Communications is a wholly owned subsidiary of Amino Technologies plc. listed on the London Stock Exchange AIM, symbol AMO. Amino is based near Cambridge, UK, and has offices in Atlanta Georgia and Hong Kong.
Contact
Information: For further information about Amino or Amino products, email: info@aminocom.com Document feedback: If you have comments on this document, please submit feedback via the Customer area of the Amino support site.
Contents
About Amino ............................................................................................................................2 Contact ....................................................................................................................................2 Copyright and trademarks .......................................................................................................5 Conventions ............................................................................................................................5 1 Introduction .................................................................................................................6 1.1 About this document ........................................................................................... 6 1.2 Overview of classes............................................................................................ 7 1.3 Availability of functions ....................................................................................... 7 1.4 Using the API...................................................................................................... 8 JMACX functions - supported platforms ..................................................................9 2.1 Platforms supported............................................................................................ 9 ASTB ..........................................................................................................................21 3.1 ASTB class ....................................................................................................... 21 3.2 ASTB date functions ......................................................................................... 21 3.3 ASTB system information functions.................................................................. 22 3.4 ASTB power management functions ................................................................ 25 3.5 ASTB mouse pointer functions ......................................................................... 27 3.6 ASTB channel functions ................................................................................... 27 3.7 ASTB network functions ................................................................................... 29 3.8 ASTB upgrade functions................................................................................... 33 3.9 ASTB trusted domains functions ...................................................................... 34 3.10 ASTB configuration functions ........................................................................... 37 3.11 ASTB production functions ............................................................................... 41 3.12 ASTB miscellaneous functions ......................................................................... 45 AVMedia .....................................................................................................................59 4.1 AVMedia class .................................................................................................. 59 4.2 AVMedia event-handler attributes .................................................................... 59 4.3 AVMedia functions............................................................................................ 62 VideoDisplay .............................................................................................................79 5.1 VideoDisplay class............................................................................................ 79 5.2 VideoDisplay functions ..................................................................................... 79 AudioControl ...........................................................................................................106 6.1 AudioControl class.......................................................................................... 106 6.2 AudioControl event-handler attributes ............................................................ 106 6.3 AudioControl functions.................................................................................... 107 Browser ....................................................................................................................116 7.1 Browser class ................................................................................................. 116 7.2 Browser functions ........................................................................................... 116 AminoGeneric .........................................................................................................122 8.1 AminoGeneric class........................................................................................ 122 8.2 AminoGeneric event-handler attributes .......................................................... 122 8.3 AminoGeneric functions.................................................................................. 123
SmartCard ................................................................................................................125 9.1 SmartCard class ............................................................................................. 125 9.2 SmartCard functions ....................................................................................... 125 TVI ............................................................................................................................127 10.1 TVI class ......................................................................................................... 127 10.2 TVI event-handler attributes ........................................................................... 127 10.3 Return codes .................................................................................................. 127 10.4 TVI functions................................................................................................... 128 PVR ...........................................................................................................................141 11.1 PVR class ....................................................................................................... 141 11.2 PVR functions ................................................................................................. 141
10
11
Appendix A:HTML extensions .........................................................................................145 A.1 <AMINOATTR> tag ........................................................................................ 145 A.2 <IMG> tag....................................................................................................... 149 Appendix B:Media source URLs ......................................................................................150 B.1 Media source types......................................................................................... 150 B.2 Media source attributes .................................................................................. 152 Appendix C:Key codes and action codes .......................................................................153 C.1 List of key codes ............................................................................................. 153 C.2 List of action codes ......................................................................................... 156 Appendix D:Video output formats ...................................................................................158 D.1 AmiNET103 .................................................................................................... 158 D.2 AmiNET110, 110H.......................................................................................... 158 D.3 AmiNET120 .................................................................................................... 159 D.4 AmiNET124 .................................................................................................... 159 D.5 AmiNET125 ................................................................................................... 159 D.6 AmiNET130, 130H.......................................................................................... 160 D.7 AmiNET500 .................................................................................................... 160 Appendix E:Example code ...............................................................................................162 E.1 ASTB, AVMedia, VideoDisplay general example ........................................... 162 E.2 Mapping actions and channels to remote control buttons .............................. 166 E.3 Mapping remote control coloured keys to new actions................................... 167 E.4 PVR control example ...................................................................................... 169 Index ...................................................................................................................................172 Document history ................................................................................................................179
Conventions
Conventions
The following table describes common formatting conventions used in this document. Where other conventions apply to a particular section, they are described in the section they are used in.
Usage Indicates a value that you need to replace with a systemspecific value (except where used in HTML or XML examples, where it is used in tags, as normal). Indicates optional parameters - for example in commands or functions. Indicates choices - for example where an input can take one of a number of values. Indicates input and output values (for example, at a command line), as well as function, configuration, parameter and file names. Used for emphasis and for cross-references to other sections and other documents. Commands or settings which are not in general use (for example, configuration settings that are reserved for Amino internal use). Cross-reference (this is a clickable hyperlink if you are vewing the document electronically).
1 Introduction
1.1 About this document
This document introduces the JMACX API - a set of Javascript extensions designed to enable interaction with the components that an AmiNET set-top box communicates with and controls - and provides details of the available functions. The document assumes familiarity with Javascript. It also assumes an understanding of the AmiNET set-top box operation and management. For an introduction to set-top box operation and administration and for alternative ways of controlling set-top boxes, see the Set-Top Box Management Operations Guide. Note: This document details the functionality available in version 0.14.x. It also covers older functionality that is no longer supported, so that the information is available for backwards compatibility. Structure This document consists of the following chapters: Chapter Introduction on page 6 Outline This chapter continues by providing general information about the contents of the API and how to use it. Lists the available functionality and details the platforms, browsers and other build options that functionality is available on. The main chapters list the functions and eventhandling attributes available in each class. Details deprecated HTML attributes and available equivalents. Provides information on constructing media stream URLs. Lists remote control keycodes and actions that can be associated with them.
JMACX functions supported platforms on page 9 Individual classes HTML extensions on page 145 Media source URLs on page 150 Key codes and action codes on page 153
Video output formats on Lists the output format possibilities for each of page 158 the AmiNET set-top box types. Example code on page 162 Quick start If you are already familiar with the JMACX API, use the relevant sections of the document as a reference. Provides examples of JMACX API use.
Introduction
Enables communication with: General set-top box functionality areas. AV media settings and play-back. Video display settings. The set-top boxs audio system. The browser - to control and customise display content. The smartcard device.
AminoGeneric Third party software daemons running on the set-top box. (Restricted to partner companies; for use with SDK.) TVI PVR Television, via the TVI port on Hospitality set-top boxes. The personal video recorder, including the recorded assets available.
Introduction
See Data types on page 8 for more information on conventions used in this document for the different APIs. Hardware platform support Support for some functions is also limited to certain hardware platforms. For example, the TVI functionality for controlling a television is only available on set-top boxes that have a TVI port. Support for other build options In addition to browser and hardware platform, other functionality is also enabled or disabled as part of a software or hardware build. For example, subtitling is only available if it is included in the software build; ASTB production functionality is only enabled in production hardware builds, and is disabled during manufacture.
Hardware restriction
ASTB - mouse pointer control ASTB.SetMouseState ASTB.GetMouseState ASTB - channel information ASTB.SelectChannel ASTB.SetChannel ASTB.GetChannel ASTB.SaveChannels ASTB - network ASTB.GetDHCP ASTB.GetIPAddress ASTB.GetAddress ASTB.GetNetmask ASTB.GetGateway ASTB.GetDomain ASTB.GetDNS ASTB.GetDHCPAddress ASTB.GetDHCPNetmask ASTB.GetDHCPGateway ASTB.GetDHCPDomain ASTB.GetDHCPDNS ASTB.GetDHCPLease ASTB.GetDHCPRenew ASTB.GetDHCPRebind ASTB - upgrade ASTB.Upgrade ASTB.GetDI ASTB.GetUpgradeAddress ASTB.GetUpgradePort ASTB.GetUpgradeDI ASTB - Trusted domains ASTB.SetTrustedDomain ASTB.GetTrustedDomain Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Other restriction
AmiScript
10
Hardware restriction
ASTB.GetTrustedDomain_Do main ASTB.GetTrustedDomain_Jav ascript ASTB.GetTrustedDomain_Mac rovision ASTB.SaveTrustedDomains ASTB - configuration ASTB.SetConfig ASTB.GetConfig ASTB.CommitConfig ASTB.SetBrowserConfig ASTB.GetBrowserConfig ASTB - production ASTB.Reflash ASTB.Format ASTB.HDDTest ASTB.SetRFChannel ASTB.SetRFPassthrough ASTB.GetSmartCardSN ASTB.SetFanState ASTB.GetFanState ASTB.SmartportTest ASTB.SmartportProgram ASTB.TestModem Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Y Y Y Y
Y Y Y Y Y
Y Y Y
Y Y Y Y Y Y Y Y Y
Y hard disk
production builds only production builds only production builds only production builds only production builds only production builds only A500 only A500 only production builds only production builds only
H models only production builds only H models only production builds only A130 and A530 only production builds only
Other restriction
AmiScript
11
Hardware restriction
Y Y Y Y Y Y Y
Y Y Y Y Y Y PPC platforms not ami_wm builds only (A103, A110, A110H, A210, A500) Y Y Y H models only H models only H models only
ASTB.GetString ASTB.SetKeyboardState ASTB.GetKeyboardState ASTB.SetKBDelay ASTB.SetKBRepeat ASTB.DeleteAllBookmarks ASTB.DeleteAllCookies ASTB.DeleteAllHistory ASTB.Reboot ASTB.VNC ASTB.DebugString ASTB.ErrorString ASTB.SetLEDState ASTB.GetLEDState ASTB.SetInternalVLANid ASTB.GetInternalVLANid ASTB.SetExternalVLANid ASTB.GetExternalVLANid ASTB.SetPortRateLimit ASTB.GetPortRateLimit ASTB.EnableVLANTagging ASTB.Sleep ASTB.GetCAID ASTB.FileExists
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y H models only H models only H models only H models only H models only H models only H models only H models only Y Y
ASTB.Enable2ndEthernetPort Y
Other restriction
AmiScript
12
AVMedia class See AVMedia for descriptions. Hardware restriction Other restriction AmiScript Function/attribute Escape Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Fresco AVMedia.Event AVMedia.EventString AVMedia.onEvent AVMedia.onConnectionLost AVMedia.onEndOfMedia AVMedia.Play AVMedia.Stop AVMedia.Pause AVMedia.Continue AVMedia.Kill AVMedia.SetPosition AVMedia.SetPos AVMedia.GetPosition AVMedia.GetPos AVMedia.SetMSecPosition AVMedia.SetMSecPos AVMedia.GetMSecPosition AVMedia.GetMSecPos AVMedia.SetSpeed AVMedia.GetCurrentSpeed AVMedia.GetPlaySpeed AVMedia.GetFormat AVMedia.SetFadeoutTime AVMedia.GetContentName AVMedia.GetProtocol Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y AVMedia.SetDefaultRTSPServ Y er AVMedia.GetDefaultRTSPServ Y er AVMedia.SetDefaultVideoServ er AVMedia.GetDefaultVideoServ er AVMedia.SetAudioPID AVMedia.GetAudioPIDs AVMedia.GetAudioPIDList AVMedia.GetAudioPID Y Y Y Y Y Y Opera Y Y Y
13
Hardware restriction
AVMedia.VideoHide
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
AVMedia.SetPrimaryAudioLan Y guage AVMedia.GetPrimaryAudioLan Y guage AVMedia.SetSecondaryAudioL Y anguage AVMedia.GetSecondaryAudioL Y anguage AVMedia.SetPrimarySubtitleLa Y nguage AVMedia.GetPrimarySubtitleLa Y nguage AVMedia.SetSecondarySubtitl Y eLanguage AVMedia.GetSecondarySubtitl Y eLanguage AVMedia.DownloadKey AVMedia.SetKeyID AVMedia.SetHighDef AVMedia.GetVideoPID AVMedia.GetPmtProgramInfo AVMedia.GetPMTPID Y Y Y Y Y
VideoDisplay class See VideoDisplay for descriptions. Hardware restriction Other restriction AmiScript Function/attribute Escape Fresco Opera
Y Y Y Y Y Y Y Y Y
Y Y Y Y Y Y Y Y Y
Y Y Y Y Y Y Y Y Y
Other restriction
AmiScript
14
Hardware restriction
VideoDisplay.SetChromaKey VideoDisplay.GetChromaKey VideoDisplay.SetChromaRGB VideoDisplay.GetChromaRGB VideoDisplay.GetMode VideoDisplay.SetMode VideoDisplay.SetAlphaLevel VideoDisplay.GetAlphaLevel VideoDisplay.SetAspect VideoDisplay.GetAspect
Y Y
Y Y
Y Y Y Y
Y Y Y Y
Y Y Y Y Y Y Y Y Y Y
Y Y Y Y
VideoDisplay.SetAVAspectSwit Y ching VideoDisplay.SetAVAspect VideoDisplay.GetAVAspect VideoDisplay.SetTVStandard VideoDisplay.GetTVStandard VideoDisplay.SetOutputFmt VideoDisplay.GetOutputFmt VideoDisplay.SetOutput VideoDisplay.GetOutput VideoDisplay.SetMacrovision VideoDisplay.GetMacrovision VideoDisplay.IgnoreUpdates Y Y Y Y Y Y Y Y
Y Y Y
Y Y
Macrovision builds only Macrovision builds only Opera: ami_wm builds only
Y Y Y Y
Y Y Y Y Y Y Y Y Y
Y Y Y Y
Other restriction
AmiScript
15
Hardware restriction
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
VideoDisplay.GetRFModFrequ Y encyTable VideoDisplay.SetSubtitlesPrefe Y rredLanguage VideoDisplay.GetSubtitlesPref Y erredLanguage VideoDisplay.SetSubtitlesSeco Y ndaryLanguage VideoDisplay.GetSubtitlesSeco Y ndaryLanguage VideoDisplay.SetAPS VideoDisplay.GetAPS VideoDisplay.SetAlphaRect VideoDisplay.SetTeletextFullsc reen VideoDisplay.GetTeletextFullsc reen VideoDisplay.IgnoreSlaveUpda tes AudioControl class See AudioControl for descriptions. Y Y
Hardware restriction
AudioControl.Event
Y Y Y Y Y Y
Y Y Y Y Y Y
Y Y
Other restriction
AmiScript
Other restriction
AmiScript
16
Hardware restriction
AudioControl.SetMaxVolume AudioControl.GetMaxVolume
Y Y
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Y Y Y Y Y Y
AudioControl.SetAC3Downmix Y AudioControl.GetAC3Downmix Y AudioControl.SetAC3Dualmon Y o AudioControl.GetAC3Dualmon Y o AudioControl.SetRFAudioBoos Y t Browser class See Browser for descriptions.
Hardware restriction
Browser Browser.SetCacheSize Browser.GetCacheSize Browser.CacheFlush Browser.SetToolbarState Browser.GetToolbarState Browser.GoBack Browser.GoHome Browser.Go Browser.Action Browser.GogiAction Y Y Y Y Y Y Y Y Y Y Y Gogi Opera Y Y Y
Other restriction
AmiScript
Other restriction
AmiScript
17
Hardware restriction
Browser.Raise
Fresco 0.13.0 and later: ami_wm builds only Opera: ami_wm builds only
Browser.Lower
Fresco 0.13.0 and later: ami_wm builds only Opera: ami_wm builds only
Y Y
Hardware restriction
Y Y
Y Y Y Y
Hardware restriction
Other restriction
AmiScript
Other restriction
AmiScript
Other restriction
AmiScript
18
TVI class See TVI for descriptions. Hardware restriction Other restriction AmiScript Function/attribute Escape Fresco TVI.onEvent TVI.SetTvType TVI.DetectTV TVI.GetIsTvOn TVI.TVOn TVI.TVOff TVI.SetVolume TVI.GetVolume TVI.SetMinVolume TVI.GetMinVolume TVI.SetMaxVolume TVI.GetMaxVolume TVI.SetStartupVolume TVI.GetStartupVolume TVI.VolumeUp TVI.VolumeDown TVI.SetMute TVI.GetMute TVI.SetInput TVI.SetChannel TVI.SetOSD TVI.SetKeyLock TVI.SelectTeletext TVI.SetupClosedCaption TVI.DisplayNumber TVI.RemoteFormatIn TVI.Configure TVI.DisplayText TVI.SystemInfo TVI.GetVersion TVI.GetFeatures TVI.LoopbackTest TVI.ProcessUnhandledKey TVI.CustomCommand Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Opera Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only H models only not Zenith H models only Philips only H models only Philips only H models only Philips only H models only H models only H models only H models only H models only H models only H models only
19
PVR class See PVR for descriptions. Hardware restriction AmiScript Function/attribute Escape Fresco Opera Other build restriction
Y Y Y Y Y Y Y
hard disk models only hard disk models only hard disk models only hard disk models only hard disk models only hard disk models only hard disk models only
20
3 ASTB
3.1 ASTB class
The ASTB class allows interaction with general set-top box functionality.
Supported for backwards compatibility only. Supported platforms: Fresco, Opera, Escape. Deprecated. Parameters None. Return
void.
ASTB.GetDate
string ASTB.GetDate()
Returns the current date as a string. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns the set-top boxs date as a string in the format dd/mm/yyyy (e.g., 21/09/2006). ASTB.SetRTCTime
void ASTB.SetRTCTime(string newdate)
Sets the RTC date and time. Supported platforms: Fresco, Opera. Not currently supported. Parameters Parameters
newdate
Allowed values
Return
void.
21
ASTB
ASTB.GetRTCTime
void | string ASTB.GetRTCTime (Fresco) string ASTB.GetRTCTime() (Opera)
Returns the date and time from the real-time clock(RTC). Whether RTC is enabled and what it is set to is a customer-specific setting. By default, RTC is not enabled, so the date and time returned will not be correct. Supported platforms: Fresco, Opera. AmiNET 500 only. Parameters None. Return Fresco: Returns void if the Fresco kernel version is not 26. Otherwise, returns a date and time string in the format: dd/mm/yyyy hh:mm:ss, or BAD TIME\n. Opera: Returns a date and time string in the format: dd/mm/yyyy hh:mm:ss, or BAD
TIME\n.
Note that calls to this function on platforms other than the AmiNET 500 will return either BAD TIME\n or NULL, as these platforms dont have a real-time clock.
Returns an XML string containing version information. Supported platforms: Fresco, Opera. Added in Fresco 0.13.0, Opera 0.13.5. Parameters None. Return Returns FAIL on error. Otherwise, returns a string with content in the following format (note that line breaks are only included here to make it easier to read; they are not included in the return string):
<xml> <aminoVersion>version_string</aminoVersion> <aminoCVersion>custom_resources_string</aminoCVersion> <oemVersion>contents_of_oemversion_file</oemVersion> </xml>
Note that if there is no oemversion file in /mnt/nv, then the string will not include
<oemVersion>...</oemVersion>.
22
ASTB
Note: If you are adding an oemversion file to a set-top box, you will need to do it as part of the process of creating the software image that is installed on the set-top box. See the Set-Top Box Management Operations Guide for more information on this, and on the build and customisation processes. ASTB.GetSystemManufacturer
string ASTB.GetSystemManufacturer()
Returns the name of the set-top box manufacturer. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns Amino Communications Ltd or returns FAIL on error. ASTB.GetSystemModel
string ASTB.GetSystemModel()
Returns the set-top box type. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a box type such asaminet500 or returns FAIL on error. ASTB.GetBrowser
string ASTB.GetBrowser()
Returns the name of the browser software. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a browser name such as fresco or escape. ASTB.GetSoftwareVersion
string ASTB.GetSoftwareVersion()
Returns the full software version string. Supported platforms: Fresco, Opera, Escape.
23
ASTB
Parameters None. Return Returns a software version string such as 0.12.1-aminet110-frescoj27-1, or returns FAIL on error. ASTB.GetHardwareVersion
string ASTB.GetHardwareVersion()
Returns the PCB hardware version. Supported platforms: Fresco, Opera, Escape. Not currently supported. Parameters None. Return Returns a hardware version string such as 1 or returns FAIL on error. ASTB.GetSerialNumber
string ASTB.GetSerialNumber()
Returns the set-top boxs serial number. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a serial number string such as 104605D312633 or returns FAIL on error. ASTB.GetMacAddress
string ASTB.GetMacAddress()
Returns the set-top boxs MAC address. Supported platforms: Fresco, Opera, Escape, AmiScript. Parameters None. Return Returns the MAC address as a string or returns FAIL on error. ASTB.GetLocked
string ASTB.GetLocked()
Returns the NOR flashs lock status (whether the locking bit is set). Supported platforms: Fresco, Opera, Escape. Parameters None.
24
ASTB
Return Returns 0 for unlocked or 1 for locked, or returns FAIL on error. ASTB.GetUSBInfo
string ASTB.GetUSBInfo()
Finds out the configuration of a device plugged into the USB. Supported platforms: Fresco, Opera. Not AmiNET103. Parameters None. Return Returns the device descriptor, product ID and other configuration as a string, (e.g. Ver= 1.10 Cls=00(>ifc) Sub=00 Prot=00 MxPS= 8 #Dfgs 1Vendor=04d8 ProdID=0001 Rev= 0.00Manufacturer=Home ElectronicsProduct=tira-3 (beta)). Returns an empty string if there is no USB device plugged into the board.
25
ASTB
Off state The power is off. When the power is switched on, the set-top box may take up to 30 seconds to boot to active/idle state. The states are defined as integer constants: State
POWER_OFF POWER_SLEEP POWER_STANDBY POWER_IDLE POWER_ACTIVE
Integer 0 1 2 3 4
Note: Both POWER_SLEEP and POWER_IDLE are processor and PCB dependent, and are not generally supported. ASTB.SetPowerState
void ASTB.SetPowerState(int state)
Changes the set-top boxs state. Note: It isnt possible to set the state to POWER_OFF as this switches off mains power. The POWER_IDLE state is enabled automatically where there is no code to execute, so it is not possible to set the set-top box to this state. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
state
Allowed values
1 sleep 2 standby 4 active
Return
void
ASTB.GetPowerState
void | int ASTB.GetPowerState()
Retrieves the current state of the set-top box. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if this functionality is not compiled. Otherwise, returns one of the set-top box state constants listed in Power management on page 25, according to the state of the set-top box. Note: The set-top box will not respond if the state is POWER_OFF or POWER_IDLE, as the browser is not running in these states.
26
ASTB
Makes the mouse pointer visible or invisible. After the mouse pointer is made invisible, it is displayed again either by using this function to re-set it or by navigating to another page. Note: Due to the repeat rate differences between a Sejin remote and an Amino remote, you may find that the Sejin remote doesnt appear to move the cursor. You can resolve this by changing the POD_SENSITIVITY value in the settings file to 4 (e.g. using the ASTB.SetConfig function). Supported platforms: Fresco, Opera, Escape. Parameters Parameters Allowed values Description Set true to make mouse pointer visible; otherwise, set false.
Return
void.
ASTB.GetMouseState
long ASTB.GetMouseState()
Returns the current visibility state for the mouse pointer. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns 0 if the mouse pointer is invisible; 1 if it is visible.
Change the channel to the specified channel number. Supported platforms: Fresco, Opera, Escape. Parameters Parameters Allowed values Description Channel number to change to.
channel_numb 0 - 999 er
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns 0 if the specified channel exists in the channel list or returns -1 on error.
27
ASTB
ASTB.SetChannel
void | string ASTB.SetChannel(int channel_number, string url)
Associates the specified channel number with the specified URL. Supported platforms: Fresco, Opera, Escape. Parameters Parameters Allowed values Description Channel number that you want to set the URL for. URL to associate with the channel number.
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns OK if the change is successful; FAIL if there is an error. ASTB.GetChannel
void | string ASTB.GetChannel(int channel_number)
Retrieve the URL associated with the specified channel number. Supported platforms: Fresco, Opera. Escape - only supported in versions 0.9.4 - 24. Parameters Parameters Allowed values Description Channel number to retrieve URL for.
channel_numb 0 - 999 er
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns a URL string (NULL if there is an error). ASTB.SaveChannels
string ASTB.SaveChannels()
Saves the current channel list to the chnls.txt file, so that the values in the list are preserved when the set-top box reboots. Note that the channels list is in:/mnt/nv/. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns OK if the list is saved successfully; FAIL if there is an error.
28
ASTB
Finds out whether DHCP is enabled for a set-top box. This is useful to determine how to request other network settings - whether to request DHCP-assigned values or statically configured values. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns n if DHCP is disabled; y or other string value if it is enabled (any value other than n in configuration enables DHCP). Returns NULL if the value has not been set. ASTB.GetIPAddress
string ASTB.GetIPAddress()
Returns the current IP address. Supported platforms: Fresco, Opera. Parameters None. Return Returns a string containing the IP address (e.g. 123.4.5.67) or returns FAIL on error. ASTB.GetAddress
string ASTB.GetAddress()
Returns the statically configured IP address. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the IP address (NULL if none set).
29
ASTB
ASTB.GetNetmask
string ASTB.GetNetmask()
Returns the statically configured netmask. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the netmask (NULL if none set). ASTB.GetGateway
string ASTB.GetGateway()
Returns the statically configured gateway IP address. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the IP address (NULL if none set). ASTB.GetDomain
string ASTB.GetDomain()
Returns the statically configured domain name. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the domain name (NULL if none set). ASTB.GetDNS
string ASTB.GetDNS()
Returns the statically configured DNS IP address. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the IP address (NULL if none set). ASTB.GetDHCPAddress
string ASTB.GetDHCPAddress()
30
ASTB
Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the IP address (NULL if no value retrieved from DHCP server). ASTB.GetDHCPNetmask
string ASTB.GetDHCPNetmask()
Returns the netmask assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the netmask (NULL if no value retrieved from DHCP server). ASTB.GetDHCPGateway
string ASTB.GetDHCPGateway()
Returns the gateway IP address assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the IP address (NULL if no value retrieved from DHCP server). ASTB.GetDHCPDomain
string ASTB.GetDHCPDomain()
Returns the domain name assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the domain name (NULL if no value retrieved from DHCP server). ASTB.GetDHCPDNS
string ASTB.GetDHCPDNS()
Returns the DNS IP address assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters
31
ASTB
None. Return Returns a string containing the IP address (NULL if no value retrieved from DHCP server). ASTB.GetDHCPLease
string ASTB.GetDHCPLease()
Returns the lease time assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the lease time in seconds (NULL if no value retrieved from DHCP server). ASTB.GetDHCPRenew
string ASTB.GetDHCPRenew()
Returns the renew time assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the renew time in seconds (NULL if no value retrieved from DHCP server). ASTB.GetDHCPRebind
string ASTB.GetDHCPRebind()
Returns the rebind time assigned by the DHCP server. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns a string containing the rebind time in seconds (NULL if no value retrieved from DHCP server).
32
ASTB
Instructs the set-top box to upgrade its software using the software upgrade carousel that the Multicast server transmits (only multicast upgrade is supported). If IP address and port arent specified, then they are read from the DHCP servers configuration (AMINO.addr and AMINO.port vendor options in the fisys class). Supported platforms: Fresco, Opera, Escape. Parameters Parameters
[addr] [port]
Allowed values
Return Returns void if there is an error parsing the parameters entered; returns -1 if either the address or port entered is NULL; returns 0 on other error. Otherwise, the upgrade process has started. ASTB.GetDI
string ASTB.GetDI()
Retrieves the deployment index (DI) of the software currently installed on the set-top box, from the NOR flash. Supported platforms: Fresco, Opera. Parameters None. Return Returns a string containing the deployment index. Returns FAIL if the DI is a NULL (i.e. no value is set). ASTB.GetUpgradeAddress
string ASTB.GetUpgradeAddress()
Returns the IP address that the set-top box can read upgrades from (from DHCP server). Supported platforms: Fresco, Opera. Parameters None. Return Returns a string containing the IP address. Returns FAIL if this is NULL (no value set). ASTB.GetUpgradePort
string ASTB.GetUpgradePort()
Returns the port that the set-top box can read upgrades from (from DHCP server).
33
ASTB
Supported platforms: Fresco, Opera. Parameters None. Return Returns a string containing the port number. Returns FAIL if this is NULL (i.e. no value is set). ASTB.GetUpgradeDI
string ASTB.GetUpgradeDI()
Returns the deployment index (DI) of the available upgrade (as specified in the DHCP configuration file with the AMINO.dindex_min vendor option). Supported platforms: Fresco, Opera. Parameters None. Return Returns a string containing the IP address. Returns FAIL if this is not retrieved or is NULL (i.e. no value is set).
Configures a trusted domain entry at the specified position. See the trusted domains documentation for more information. Supported platforms: Fresco, Opera. Parameters Parameters
num domain
Allowed values
Description Position to add the trusted domain entry at. URL or IP address to set as the trusted domain. This can be a full address or a partial address prefixed or postfixed with *.
js
false or true
Set true to enable JMACX calls for this domain; false to disable JMACX calls. Set true to enable Macrovision for this domain; false to disable Macrovision.
macrovision
false or true
Return Returns void if there is an error parsing one of the input arguments. Otherwise, returns OK on success or FAIL on error.
34
ASTB
ASTB.GetTrustedDomain
object ASTB.GetTrustedDomain(int num) (Fresco) void |int ASTB.GetTrustedDomain(int num) (Opera)
Retrieves information about the specified trusted domain. Note: For Fresco, information about the trusted domains is included in the functions return value. For Opera, the return value only indicates success or failure, and you will have to make separate calls to the ASTB.GetTrustedDomain_Domain, ASTB.GetTrustedDomain_Javascript and ASTB.GetTrustedDomain_Macrovision functions to retrieve this information. Supported platforms: Fresco, Opera. Parameters Parameters
num
Allowed values
Description Position of trusted domain that you want to retrieve information about.
35
ASTB
Return Fresco: Returns an object that contains the following attributes:Note that if there is an Attribute
domain javascript macrovision
error parsing the parameter entered, the object returned will have a single attribute domain with a NULL as its value. Opera: Returns void if there is an error parsing the parameter entered; otherwise, returns 0 on success or -1 on error. Example of use in Opera:
if (0== ASTB.GetTrustedDomain(0)) { domain = ASTB.GetTrustedDomain_Domain(); javascript = ASTB.GetTrustedDomain_Javascript(); macrovision = ASTB.GetTrustedDomain_Macrovision(); } else { alert(an error occurred while reading trusted domains values); }
ASTB.GetTrustedDomain_Domain
string ASTB.GetTrustedDomain_Domain()
Retrieves the URL or IP address for a trusted domain. A call to this function must follow a call to ASTB.GetTrustedDomain, or no value will be held. Supported platforms: Opera. Parameters None. Return Returns string containing domain URL or IP address if successful; otherwise, returns
NULL.
ASTB.GetTrustedDomain_Javascript
int ASTB.GetTrustedDomain_Javascript()
Retrieves whether Javascript is enabled for a trusted domain. A call to this function must follow a call to ASTB.GetTrustedDomain, or no value will be held. Supported platforms: Opera. Parameters None.
36
ASTB
Return Returns 1 if Javascript calls are enabled for this domain, 0 if they are disabled. ASTB.GetTrustedDomain_Macrovision
int ASTB.GetTrustedDomain_Macrovision()
Retrieves whether Macrovision is enabled for a trusted domain. A call to this function must follow a call to ASTB.GetTrustedDomain, or no value will be held. Supported platforms: Opera. Parameters None. Return Returns 1 if Macrovision is enabled for this domain, 0 if it is disabled. ASTB.SaveTrustedDomains
void | string ASTB.SaveTrustedDomains(string password)
Saves the entered list of trusted domains to NV RAM as /mnt/nv/trsdmns.txt. Supported platforms: Fresco, Opera. Parameters Parameters
password
Allowed values
Description The password to enable the operations from the trusted domain (this is a cleartext password).
Return Returns OK if successful; otherwise, returns FAIL password if the password is incorrect or FAIL for other errors.
Description Enable or disable trusted domains (1 or 0, respectively). URL for browser home page. Example:
http://www.aminocom.com
37
ASTB
Configuration item
HELPPAGE USE_PROXY ACCEPT_COOKIES DISK_CACHE RAM_CACHE HTTP_PROXY
Enable or disable proxy server (1 or 0, respectively). Accept or dont accept cookies (1 or 0, respectively). Disk cache size. Example: 4096 RAM cache size. Example: 4096 HTTP proxy in format <host>:<port>. Example:
proxy1:2000
HTTPS_PROXY
FTP_PROXY
Enable or disable Smartcard (1 or 0, respectively). Opera only. Width of left margin (percentage). Example: 4. Width of right margin (percentage). Example: 4. Height of top margin (percentage). Example: 4. Height of bottom margin (percentage). Example: 4. Margin colour (decimal or hexadecimal RRGGBB value). Example: 6303776 (decimal). Opera only.
ASTB.SetConfig
void | string ASTB.SetConfig(string password, string element, string value)
Changes the value of the specified libconfig configuration element. Note that settings and values must be entered as strings. If you want the change to persist when the set-top box reboots, you should follow calls to ASTB.SetConfig with a call to ASTB.CommitChanges. Note: This function calls the libconfig-set command. Supported platforms: Fresco, Opera, Escape.
38
ASTB
Parameters Parameters
password
Description The password for mngwrite user. This is only required for changing management page settings; for other settings (e.g. preferences pages) you can set it to . By default, the password is snake; see the Set-top box Configuration Pages Administration Guide for more information. The libconfig configuration element to set (e.g. SETTINGS.SUBTITLES). The value to set the element to. Suitable values depend on the element you are setting.
element value
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns OK if the value is successfully set; FAIL password if the password is not valid, or FAIL on other error. ASTB.GetConfig
void | string ASTB.GetConfig(string element)
Reads the value that the specified libconfig configuration element is set to. Note: This function calls the libconfig-get command. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
element
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns the current value as a string or returns FAIL if the element is undefined. ASTB.CommitConfig
int ASTB.CommitConfig()
Commits the changed configuration values to non-volatile storage, so that they persist when the set-top box reboots. This function allows you to change several settings at once with several calls to ASTB.SetConfig, then commit all the changes at once. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns 0 if the changes are successfully stored; otherwise, returns -1.
39
ASTB
ASTB.SetBrowserConfig
void | string ASTB.SetBrowserConfig(string password, string config_item, string value)
Configures specified browser functionality. See ASTB configuration functions on page 37 for configuration settings and their allowed values. Note that settings and values must be entered as strings. If you want the change to persist when the set-top box reboots, you should follow calls to ASTB.SetBrowserConfig with a call to ASTB.CommitChanges. Supported platforms: Fresco, Opera. Parameters Parameters
password
Allowed values
Description The password for the mngwrite user, as required for changing settings on the set-top boxs Management pages. See the Set-top box Configuration Pages Administration Guide for more information. String containing the configuration item to set (see ASTB configuration functions on page 37 for list of configuration items and their values). String containing the value to set the specified configuration item. Suitable values depend on the specified config_item.
config_item
value
Return Returns void if there is an error parsing the first input parameter. Otherwise, returns 0K if successful; FAIL password if the password is incorrect; or FAIL on other error. Example:
ASTB.SetBrowserConfig(passwd, ACCEPT_COOKIES, 1);
ASTB.GetBrowserConfig
string ASTB.GetBrowserConfig(string config_item)
Reads the value of the specified browser configuration item. See ASTB configuration functions on page 37 for a list of configuration items. Supported platforms: Fresco, Opera. Parameters Parameters
config_item
Allowed values
Description String containing the name of the configuration item that you want to read the value of. See the ASTB configuration functions on page 37 for a list of configuration item names.
Return Returns the value of the specified configuration item if successful; otherwise, returns [UNKNOWN STRING] if the name of the configuration item is not recognised or returns [BAD KEY] if there is an error in parsing the value assigned to the configuration item.
40
ASTB
Removes the files from the NAND flash and reboots the set-top box. Note that on success, the set-top box will restart and attempt to download new bootstrap and upgrade images via the Multicast upgrade system (i.e. the DHCP server and Multicast server). Supported platforms: Fresco, Opera, AmiScript. Production builds only. Parameters None. Return Returns 0 if successful (but note that on success, the browser processes are closed as part of the reflashing process, so it is likely that no value will be returned); returns nonzero if there is an error. ASTB.Format
void | long ASTB.Format(int state)
Turns the rc.format script on or off. Supported platforms: Fresco, Opera. Set-top boxes with hard disks only - e.g. AmiNET500. Production builds only. Parameters Parameters
state
Allowed values
0 or 1
Description Set 0 to call script with stop mode; 1 to call script with force mode.
Runs a simple test on the HDD interface functionality. The test writes a 128k file with ascending 16-bit values, then reads it back and checks that its the same as the file it wrote. Supported platforms: Fresco, Opera. Production builds only. Parameters None. Return Returns 0 if the test is completed successfully; returns 1 if there is an error.
41
ASTB
ASTB.SetRFChannel
void ASTB.SetRFChannel(int channel)
Changes the RF channel to the specified channel. Supported platforms: Fresco, Opera. Production builds only. Parameters Parameters
channel
Allowed values
Description The channel to change to. The channel range available depends on the territory that the set-top box operates in.
Return
void.
ASTB.SetRFPassthrough
void ASTB.SetRFPassthrough(int passthrough)
Turns the RF passthrough on or off. Supported platforms: Fresco, Opera. Production builds only. Parameters Parameters
passthrough
Allowed values
0 or 1
Description Set 0 to disable passthrough (i.e. enable RF module); 1 to enable passthrough (i.e. disable RF module).
Return
void.
ASTB.GetSmartCardSN
string ASTB.GetSmartCardSN()
Reads the serial number from the smartcard. Supported platforms: Fresco, Opera. Production builds only. Parameters None. Return Returns the smartcards serial number as a string; if there is no card present, this string is returned as0000000000. ASTB.SetFanState
void ASTB.SetFanState(int speed)
Sets the fan speed. Supported platforms: Fresco, Opera. AmiNET500 only. Production builds only.
42
ASTB
Parameters Parameters
speed
Allowed values
0 - 100
Return
void.
ASTB.GetFanState
long ASTB.GetFanState()
Returns the current fan speed (percentage). Supported platforms: Fresco, Opera. AmiNET500 only. Production builds only. Parameters None. Return Returns the fan speed as a percentage. ASTB.SmartportTest
long ASTB.SmartportTest()
Runs a simple test on the TVI port. The test uses a loopback connector, where the Tx and GPIO19 outputs are connected to the Rx and Clk inputs; it cycles through all the possible outputs, testing that it reads the same thing as in the input. Note: The TVI port is only on hospitality set-top boxes, so this function only works on these platforms. Supported platforms: Fresco, Opera. Hospitality models only. Production builds only. Parameters None. Return Returns 0 if the test is completed successfully; otherwise, returns 1. ASTB.SmartportProgram
void | long ASTB.SmartportProgram(string filename)
Programs the TVI/SmartPort PIC. Supported platforms: Fresco. Hospitality models only. Production builds only. Parameters Parameters
filename
Allowed values
Description Name of the file (which has a hex extension and is found in /mnt/nv).
43
ASTB
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns 0 if programming is successful; non-zero value if there is an error. Example:
ASTB.SmartportProgram(mnt/nv/philips.hex);
ASTB.TestModem
string ASTB.TestModem(string dialling_string)
Tests the internal modem by dialling out to another modem, then reading and echoing back a test string. Note that in order to call this function, the following environment must be set up: the set-top box must be connected to a dual line simulator the dual line simulator must be connected to a modem set to 2400 baud 8N1 the modem must be connected to a test generator box that is set up for 2400 baud 7E1 ASCII output Supported platforms: Fresco. AmiNET130 and AmiNET530 only. Production builds only. Added in version 0.12.1. Parameters Parameters
dialling_str ing
Allowed values
This test string would perform the following: check modem ready hang up check modem ready set modem to UK phone system settings check modem ready tone-dial 120 Return Returns FAIL if the test is not successful. Otherwise, returns one or more iterations of the following string: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 1234567890 DE (the actual number of repetitions of this string depends on the buffer size).
44
ASTB
Configures whether the browser uses the default key interpretation. Supported platforms: Fresco, Opera. Parameters Parameters Allowed values Description Set true to enable default key interpretation; false to disable it.
Return
void.
ASTB.SetKeyFunction
void | string ASTB.SetKeyFunction(int key, int action, [string optional_arg])
Sets the function of the specified remote control key. Use ASTB.SaveKeyFunctions to save the new function mapping to persistent configuration. Supported platforms: Fresco, Opera. Parameters Parameters
key
Allowed values
Description
Available keys, as in separate list of key codes The key to set the function for. - List of key codes on page 153. Also see ASTB.SetChannel for how to map the number keys to channel URLs.
action
1 - 48
The action to associate with See separate list of action codes for details - List the key. of action codes on page 156.
Note that 1-48 can be used for both Fresco and Opera; 49-58 are Opera only.
[optional_a Depends on action set. See separate list of rg] action codes for details of which require this
Returns void on success or if there is an error parsing one of the parameters. Returns FAIL if the action number entered is greater than the highest action number allowed for the browser type.
45
ASTB
ASTB.SaveKeyFunctions
void ASTB.SaveKeyFunctions()
Saves the key functions set with ASTB.SetKeyFunction to the fkeys.conf file in /mnt/nv on the set-top box. Supported platforms: Fresco, Opera. Parameters None. Return
void.
ASTB.LoadCodeSet
int ASTB.LoadCodeSet(string filename)
Initialises the IRBlaster. Supported platforms: Fresco, Opera. Hospitality models only. Parameters Parameters
filename
Allowed values
Description This parameter is not currently used, so enter any non-NULL string value.
Return Returns 0 if successful; 1 for file not found; 2 for initialisation error; -1 for other error. ASTB.BlastCode
void | int ASTB.BlastCode(int code)
Sets the key code to be transmitted by the IRBlaster. Supported platforms: Fresco, Opera, AmiScript. Hospitality models only. Parameters Parameters
code
Allowed values
Return Returns void if theres an error parsing the parameter entered. Otherwise, returns 0 if successful; 2 on error. ASTB.SetRemoteType
void | int ASTB.SetRemoteType(int index)
Sets the IR blasting type, depending on the TV system in use. The value is written to /mnt/nv/irb_keys.txt on the set-top box. Supported platforms: Fresco, Opera. Hospitality models only.
46
ASTB
Parameters Parameters
index
Allowed values
Return Returns void if theres an error parsing the parameter entered. Otherwise, returns 0 if successful; 2 on error. ASTB.WithChannels
void ASTB.WithChannels(boolean channels)
Sets whether changing channels with the number keys on the remote control is enabled. Supported platforms: Fresco, Opera. Parameters Parameters
channels
Return
void.
ASTB.GCluster
void | string ASTB.GCluster(string gcluster_command)
Hands over control to a Gcluster games library. The parameter is passed directly into the library and the string returned is passed back to the Javascript. Supported platforms: Fresco. PPC platforms only (A103, A110, A110H, A210, A500). Not supported in ami_wm builds. Parameters Parameters gcluster_com mand Return Returns void if there is an error parsing the parameter entered. Returns a string passed by the games library on success. Returns FAIL if the set-top box doesnt support Gcluster, or returns one of the following standard return strings: This STB does not include support for remote games., This libcclientsso.so does not contain the GGPlayGame call. Note: This function will not return until the games library does (typically on a failed connection or if the user exits the game). Allowed values Description Command to pass to the Gcluster games library.
47
ASTB
ASTB.GetString
string ASTB.GetString(string pref_string)
Retrieves value of specified string from the HTML Management pages. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
pref_string
Allowed values
preferenceslang
Description The string to retrieve the value of. Note that these strings are not case-sensitive.
preferences language
historylang
history language
bookmarkslang
bookmarks language
bookmarksclose
48
ASTB
Parameters
Allowed values
preferenceskbmenu
Description
preferences: keyboard
preferenceskbrepeatdelay
preferences: volume
preferencesminvolume
49
ASTB
Parameters
Allowed values
preferencesoutcomprgb
Description
preferences: audio
preferencesprimarylang
preferences: cancel
preferencesreset
preferences: reset
preferencesfreqtable
preferences: broadcast
preferencescable
preferences: cable
preferencesrfchannel
preferences: RF channel
preferencesuserf
preferences: use RF
preferencesrcimemenu
50
ASTB
Parameters
Allowed values
preferencesrcimepagetitle
Description
preference: remote control IME default language Return Returns en, [UNKNOWN STRING] or [BAD KEY] on error. Otherwise, returns the value of the specified string. Example
string video = ASTB.GetString(preferencesoutvideo);
ASTB.SetKeyboardState
void ASTB.SetKeyboardState(boolean state)
Enables or disables the keyboard. Supported for backward compatibility only. Supported platforms: Fresco, Opera. Deprecated. Parameters Parameters
state
Allowed values
true or false
Return
void.
ASTB.GetKeyboardState
long ASTB.GetKeyboardState()
Returns the current keyboard state value. Supported for backwards compatibility only. Supported platforms: Fresco, Opera. Deprecated. Parameters None.
51
ASTB
Sets the keyboard delay rate. Supported platforms: Fresco, Opera. Parameters Parameters
delay
Allowed values
1-4
Description Delay rate. Each integer in the allowed range represents 22.5 centiseconds. The standard default is 2 (45 centi-seconds).
Return Returns -1 if there is an error parsing the parameter entered. Otherwise, returns 0 on success; 1 on error. ASTB.SetKBRepeat
int ASTB.SetKBRepeat(int repeat)
Sets the keyboard repeat rate. Supported platforms: Fresco, Opera. Parameters Parameters
delay
Allowed values
>0
Return Returns -1 if there is an error parsing the parameter entered. Otherwise, returns 0 on success; 1 on error. ASTB.DeleteAllBookmarks
void | int ASTB.DeleteAllBookmarks() (Fresco) int ASTB.DeleteAllBookmarks() (Opera)
Deletes all the bookmarks stored by the browser. Supported platforms: Fresco, Opera. Parameters None. Return Fresco: Returns void if AMI_BOOKMARKS_FILE is not set during compilation. Otherwise, returns 0 on success; -1 on error. Opera: Returns 0 on success; -1 on error.
52
ASTB
ASTB.DeleteAllCookies
int ASTB.DeleteAllCookies()
Deletes all the cookies stored by the browser. Supported platforms: Fresco, Opera. Parameters None. Return Returns 0. ASTB.DeleteAllHistory
void | int ASTB.DeleteAllHistory() (Fresco) int ASTB.DeleteAllHistory() (Opera)
Deletes all the history stored by the browser. Supported platforms: Fresco, Opera. Parameters None. Return Fresco: Returns void if AMI_BOOKMARKS_FILE is not set during compilation. Otherwise, returns 0. Opera: Returns 0. ASTB.Reboot
int ASTB.Reboot()
Reboots the set-top box. Supported platforms: Fresco, Opera, Escape, AmiScript. Parameters None. Return Returns 1 on error. If the reboot is successful, then returns 0 - but the return code may not be passed because the set-top box is in the process of killing processes (including the browser and its JMACX interpreter) and restarting. ASTB.VNC
void ASTB.VNC(string session)
Starts a VNC session to the specified session name. There must be a VNC client executable installed on the set-top box in order for this to be successful. Supported platforms: Fresco, Opera.
53
ASTB
Parameters Parameters
session
Allowed values
Return
void.
ASTB.DebugString
void ASTB.DebugString(string msg)
Writes the specified string as the message for DBG_WARN. This is the warning string that is printed to the debug serial port if debug is enabled during browser compilation. Supported platforms: Fresco, Opera. Parameters Parameters
msg
Allowed values
Return
void.
ASTB.ErrorString
void ASTB.ErrorString(string msg)
Writes the specified string as the message for DBG_ERR. Supported platforms: Fresco, Opera. Parameters Parameters
msg
Allowed values
Return
void.
ASTB.SetLEDState
int ASTB.SetLEDState(string ledtext, int status, [int flash_on, int flash_off])
Sets the state of an LED on the set-top box. Supported platforms: Fresco, Opera. Parameters Parameters
ledtext
Allowed values
LEFT, CENTRE or RIGHT 0 LED on 1 LED off 2 LED flashing
Description The LED that you want to set the value of. If the set-top box has only one LED, then use LEFT. The status to set the LED to.
status
54
ASTB
Parameters
flash_on
Allowed values
0 - 255
Description The period that the LED is on for, in centi-seconds (if the LED is set to flash) The period that the LED is off for, in centi-seconds (if the LED is set to flash).
flash_off
0 - 255
Return Returns void if there is an error parsing one of the parameters entered. Otherwise, returns 0 on success; -1 on error (-1 is only returned in Fresco). ASTB.GetLEDState
void | long ASTB.GetLEDState(string ledtext)
Retrieves the state of an LED on the set-top box. Supported platforms: Fresco, Opera. Parameters Parameters
ledtext
Allowed values
LEFT, CENTRE or RIGHT
Description The LED that you want to see the value of. If the set-top box has only one LED, then use LEFT.
Return Fresco: Returns void on error. Otherwise, returns one of the following values: Value
0 1 2
Opera: Returns void if there is an error parsing any of the parameters entered; -1 on other error. Otherwise, returns one of the status values listed for Fresco. ASTB.Enable2ndEthernetPort
int ASTB.Enable2ndEthernetPort(boolean state)
Enables or disables the second Ethernet port on the set-top box. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters Parameters
state
Description Set true to enable the Ethernet port; false to disable it.
Return Returns 0 if the port is enabled/disabled successfully; otherwise, returns -2 (if the function is called on a set-top box that doesnt have a second Ethernet port, a message is also output to the debug port).
55
ASTB
ASTB.SetInternalVLANid
int ASTB.SetInternalVLANid(int id)
Set the ID for the VLAN containing the set-top box and Ethernet port 1. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters Parameters
id
Allowed values
0 - 4095
Retrieve the ID for the VLAN containing the set-top box and Ethernet port 1. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters None. Return Returns the VLAN ID or returns -2 if there is an error. ASTB.SetExternalVLANid
int ASTB.SetExternalVLANid(int id)
Set the ID for the VLAN containing Ethernet port 2. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters Parameters
id
Allowed values
0 - 4095
Retrieve the ID for the VLAN containing Ethernet port 2. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters None. Return Returns the VLAN ID or returns -2 if there is an error.
56
ASTB
ASTB.SetPortRateLimit
int ASTB.SetPortRateLimit(int port, int rate)
Sets the data transfer rate limit for both receive and transmit for the specified port. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters Parameters
port
Allowed values
1, 2 or 3
Description The port to set the data transfer rate for. 1 is Ethernet port 1; 2 is Ethernet port 2; 3 is the set-top box. The rate limit to set, as multiples of 32kbps (e.g. 1 indicates a limit of 32kbps; 2 indicates a limit of 64kbps, and so on). Note: The minimum rate for the Ethernet port and the set-top box port is 32kbps; this is automatically set if you try to set a lower value.
rate
0 - 4095
Return Returns 0 if the rate is set successfully; otherwise, returns -2 on error. ASTB.GetPortRateLimit
int ASTB.GetPortRateLimit(int port)
Retrieve the data transfer rate limit for a specified port on the set-top box. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only. Parameters Parameters
port
Allowed values
1, 2 or 3
Description The port to read the data transfer rate for. 1 is Ethernet port 1; 2 is Ethernet port 2; 3 is the set-top box.
Return Returns the rate limit for both receive and transmit (units of 32 kilobytes per second (e.g. 1 indicates a limit of 32kbps; 2 indicates a limit of 64kbps). This can be a value in the range 0 - 4095. Returns -2 if there is an error. ASTB.EnableVLANTagging
int ASTB.EnableVLANTagging(boolean state)
Enables or disables the addition of VLAN tags to the packets transmitted from port 1. If this is enabled, the packets are given the VLAN ID of the port they were received from. Supported platforms: Fresco, Opera. Amiscript 0.9.4-20 only. Hospitality models only.
57
ASTB
Parameters Parameters
state
Allowed values
false or true
Instructs the set-top box to sleep (i.e. lock the browser and Javascript interpreter) for the specified time. Supported platforms: Fresco, Opera. Parameters Parameters
time
Allowed values
Return
void.
ASTB.GetCAID
string ASTB.GetCAID()
Retrieves the conditional access (CA) ID value. Supported platforms: Removed from Fresco in 0.14.0. Not currently supported in Opera. Parameters None. Return Returns the CA ID value as a string, or returns FAIL on error. ASTB.FileExists
int ASTB.FileExists(string filename)
Tests whether the specified file exists. Supported platforms: Fresco, Opera. Parameters Parameters
filename
Allowed values
58
4 AVMedia
4.1 AVMedia class
The AV media class allows control over AV media settings and play-back.
Callback for the last event code (see list in AVMedia event codes on page 60). Event codes are browser-specific. Supported platforms: Fresco, Opera, Escape. AVMedia.EventString
string AVMedia.EventString
Callback for the string part of the last event code. Event strings are browser-specific. Supported platforms: Fresco, Opera. AVMedia.onEvent
string AVMedia.onEvent
Enables a Javascript event handler to be associated with AVMedia events. AVMedia.onEvent is set with a string that contains the event handler function call. Supported platforms: Fresco, Opera, Escape. Usage example (Fresco):
AVMedia.onEvent=handle_event();; function handle_event() { alert(Event Code = + AVMedia.Event); }
59
AVMedia
AVMedia.onConnectionLost
string AVMedia.onConnectionLost
Assigns a Javascript event handler to be run when a video play has determined that the connection has been terminated. Set with a string that contains the event handler function call. Supported platforms: Fresco. Note: Deprecated: use AVMedia.onEvent instead. AVMedia.onEndOfMedia
string AVMedia.onEndOfMedia
Assigns a Javascript event handler to be run either when the underlying video layer has been notified by the server that the stream has finished or when a break in video packets reaches the defined timeout. Set with a string that contains the event handler function call. Supported platforms: Fresco. Note: Deprecated: use AVMedia.onEvent instead. AVMedia event codes
Code
1
Meaning RTSP_CONNECT_FAILED The connection to the RTSP server failed. Can be caused by no Ethernet cable to the set-top box, or a network error.
RTSP_SEND_FAILED An RTSP command couldnt be sent to the server. RTSP_READ_FAILED A response to an RTSP command couldnt be read. RTSP_CONNECTION_DIED The RTSP connection died. RTSP_STATUS_LINE Deprecated. RTSP_STATUS_PLAYING Media is playing. This message will be received approximately once every 20 seconds.
RTSP_STATUS_ANNOUNCE Message sent by the RTSP server. The only server message that dont fall into this category is the end of stream message 8.
RTSP_STATUS_END_OF_STREAM The current asset has finished playing. RTSP_STATUS_NOT_FOUND Asset not found on server.
60
AVMedia
Code
10
Meaning STATUS_NO_VIDEO Either video requested from a server that doesnt exist or the video asset requested doesnt exist.
11
IGMP_STATUS_END_OF_STREAM End of IGMP stream (or multicast connection lost). RTSP_CONNECTION_STOPPED The server stopped the connection. RTSP_STATUS_AUTHENTICATE The asset requested requires authentication. As this has not been given in the AVMedia.Play call, the asset will not be played.
12
13
14
RTSP_STATUS_REDIRECTED Further action must be taken to complete the request (e.g. go to another server for parts of the request).
15
IGMP_STATUS_PLAYING IGMP stream being played. UDP_STATUS_END_OF_STREAM End of a UDP stream detected. UDP_STATUS_PLAYING A UDP stream is playing MP3S_STATUS_END_OF_STREAM Reached the end of the current MP3 file. AUD_DESCRIP_READY Callback to indicate that the session description of the current asset has been read.
16
17
18
19
20
RTSP_STATUS_START_OF_STREAM Start of an RTSP stream detected. MP3S_STATUS_START_OF_STREAM Start of an MP3 stream detected. RTSP_STATUS_ANNOUNCE_PARTIAL Partial-asset ANNOUNCE event received. This occurs with the Kasenna server END_OF_STREAM ANNOUNCE message. In this instance it is possible to resume playing the stream, instead of stopping the stream.
21
22
23
STATUS_PMT_CHANGED The PMT in the incoming transport stream has changed. PVRS_STATUS_PLAYING A PVR clip is playing. PVRS_STATUS_END_OF_STREAM End of a UDP stream detected.
24
25
61
AVMedia
Code
31
Meaning WEBFETCH_STARTED Start of web fetch detected. WEBFETCH_CONNECT_FAILED Web fetch server connection failed. WEBFETCH_START_STREAMING Web fetch streaming detected. WEBFETCH_END_OF_STREAM End of web fetch stream detected. WEBFETCH_KILLED Web fetch killed.
32
33
34
36
Plays the media content from the specified source. Note that if the content is under Macrovision control, you need to call VideoDisplay. before trying to play the content. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
src
Allowed values
src=<URL>
Description The URL for the media content (for formats, see Media source URLs on page 150). For example:
src=igmp://123.4.5.67:11111
Return Returns 0 on success or if video support is not compiled (or the parameter entered is NULL). Otherwise returns a non-zero value. AVMedia.Stop
void AVMedia.Stop()
Stops playing the current media stream and removes the video from the screen. The connection to the RTSP server is kept alive, and the video can be resumed from the current position (with AVMedia.Continue()). Supported platforms: Fresco, Opera, Escape. Parameters None. Return
void.
62
AVMedia
AVMedia.Pause
void AVMedia.Pause()
Pauses the media stream and freezes the video on the screen. The connection to the RTSP server is kept alive, and the video can be resumed from the current position (with AVMedia.Continue()). Note that using AVMedia.SetSpeed(0) has a similar effect to this function, except that the previous speed is not retained in memory. Supported platforms: Fresco, Opera, Escape. Parameters None. Return
void.
AVMedia.Continue
void AVMedia.Continue()
Restarts the media stream at the position it was paused at (e.g. after use of AVMedia.Stop() or AVMedia.Pause()). Note that if the stream was previously playing at normal speed, this has the same effect as calling AVMedia.SetSpeed(1). Supported platforms: Fresco, Opera, Escape. Parameters None. Return
void.
AVMedia.Kill
void AVMedia.Kill()
Tears down the current session, stopping the current media stream. After calling this function, it is not possible to restart the current video stream (i.e. it is not possible to resume video from the current position with AVMedia.Continue()). Supported platforms: Fresco, Opera, Escape. Parameters None. Return
void.
AVMedia.SetPostion / AVMedia.SetPos
int AVMedia.SetPosition(long position) int AVMedia.SetPos(long position)
Sets the position in seconds, relative to the start of the current media stream. If the stream is currently paused, this call restarts it. It is recommended to check that the position has been set successfully by calling AVMedia.GetPos() or AVMedia.GetPosition() after trying to set a new position.
63
AVMedia
Allowed values
Description Position to play from, in seconds relative to the current position of the stream.
Return Returns 0 on success or if there is no current media stream; returns non-zero if there is an error parsing the parameter. AVMedia.GetPosition / AVMedia.GetPos
void | long AVMedia.GetPosition() void | long AVMedia.GetPos()
Returns the current position in the media stream, in seconds. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support has not been compiled. Otherwise, returns the current position as a number of seconds relative to the start of the stream. If the media stream is in trickplay mode, returns -2; for all other errors, returns -1. AVMedia.SetMSecPostion / AVMedia.SetMSecPos
int AVMedia.SetMSecPosition(long position) int AVMedia.SetMSecPos(long position)
Sets the position in milliseconds, relative to the start of the current media stream. If the media stream is currently pause this call restarts it. It is recommended to check that the position has been set successfully by calling AVMedia.GetMSecPos() or AVMedia.GetMSecPosition() after trying to set a new position. Supported platforms: Fresco, Opera. Parameters Parameters
position
Allowed values
Description Position to play from, in milliseconds relative to the current position of the stream.
Return Returns 0.
64
AVMedia
AVMedia.GetMSecPosition / AVMedia.GetMSecPos
long AVMedia.GetMSecPosition() long AVMedia.GetMSecPos()
Returns the current position in the media stream, in milliseconds. Supported platforms: Fresco, Opera. Parameters None. Return Returns the current position as a number of milliseconds relative to the start of the stream. If the media stream is in trickplay mode, returns -2; for all other errors, returns -1. AVMedia.SetSpeed
int AVMedia.SetSpeed(float speed)
Sets the play-back speed (this takes effect immediately). Supported platforms: Fresco, Opera, Escape. Parameters Parameters
speed
Allowed values
-6 to 6
Description Speed to set. Positive values are forward play; negative values are reverse play. Examples of possible values are:
6 forward at 6 x normal speed; 5 5 x normal speed, and so on 1 normal play 0.5 half speed 0 pause -1 reverse play -6 reverse at 6 x normal speed
Values can also be 3.75, 1.5, and so on; note that actual play speeds depend on the video decoder. Return Returns 0 on success or if video control support is not compiled. Otherwise, returns a non-zero value. AVMedia.GetCurrentSpeed
void | float AVMedia.GetCurrentSpeed()
Returns the current play-back speed.This should normally be 1.0 for non-RTSP streams. This is the speed set by AVMedia.SetSpeed. Supported platforms: Fresco, Opera, Escape.
65
AVMedia
Parameters None. Return Returns void if video control support has not been compiled. Otherwise, returns the current play-back speed. Example return values:
6 6 x normal speed; 5 5 x normal speed, and so on 1 normal play 0.5 half speed 0 pause -1 reverse play -6 reverse at 6 x normal speed
Returns the video play speed. Note that this speed may be overridden by the value returned by GetCurrentSpeed. Supported platforms: Fresco, Opera. Not currently supported. Parameters None. Return Returns void if video control support is not compiled. Returns the current video play speed. Example return values:
6 6 x normal speed; 5 5 x normal speed, and so on 1 normal play 0.5 half speed 0 pause -1 reverse play -6 reverse at 6 x normal speed
Retrieves the format of the current media stream. Supported platforms: Fresco, Opera, Escape. Parameters None.
66
AVMedia
Return Returns void if video control support is not compiled. Otherwise, returns one of the following values: Value
PAL NTSC Unknown
AVMedia.SetFadeoutTime
int AVMedia.SetFadeoutTime(int fade_out_time)
Sets the length of time for the media stream fade-out. Supported platforms: Fresco, Opera. Not currently supported. Parameters Parameters
fade_out_tim e
Allowed values
Return Returns 0 on success or if video control has not been compiled. Otherwise, returns a nonzero value. AVMedia.GetContentName
void | string AVMedia.GetContentName()
Retrieves the name of the current media content. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support is not compiled or if RTSP support is not compiled. Returns NULL if there is no video playing; otherwise, returns a string containing the name of the current content. AVMedia.GetProtocol
void | string AVMedia.GetProtocol()
Retrieves the protocol for the current media stream. Supported platforms: Fresco, Opera, Escape. Parameters None.
67
AVMedia
Return Returns void if video control support is not compiled. Otherwise, returns one of the following protocol values: Value
RTSP MULTICAST Unknown
AVMedia.SetDefaultRTSPServer / AVMedia.SetDefaultVideoServer
int AVMedia.SetDefaultRTSPServer(string videoServer) Fresco/Opera int AVMedia.SetDefaultVideoServer(string videoServer) Opera
Supported platforms: Fresco, Opera, Escape. Note: SetDefaultVideoServer deprecated; use SetDefaultRTSPServer instead. Sets the default RTSP server. Parameters Parameters
videoServer
Allowed values
bitband infovalue mediabase ncube seachange oracle eona (from 0.14.0 on only, Fresco only) smartvision (from 0.13.0 on only; Fresco Thales builds only)
Description The name of the video server to set as the default. Note that these values are not case-sensitive (i.e. you could also enter Bitband or BITBAND).
Return Returns 0 on success; non-zero on error or if video control support is not compiled. AVMedia.GetDefaultRTSPServer / AVMedia.GetDefaultVideoServer
void | string AVMedia.GetDefaultRTSPServer() Fresco/Opera int AVMedia.GetDefaultVideoServer(string videoServer) Opera
Retrieves the name of the default RTSP server. Supported platforms: Fresco, Opera, Escape. Note: GetDefaultVideoServer deprecated; use GetDefaultRTSPServer instead. Parameters None.
68
AVMedia
Return Returns void if video control support is not compiled. Returns a string containing the name of the default RTSP server (this could be a NULL string). AVMedia.SetAudioPID
int AVMedia.SetAudioPID(int pid, [int ac3])
Sets the audio PID to use for decoding the audio stream as a multimedia stream / video stream / MPEG transport stream. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
pid ac3 0 MPEG
Allowed values
Description The PID to use. Stream type. If you dont include this parameter, the default value 0 is used.
1 AC3
Return Returns 0 on success or if video control support is not compiled. Otherwise, returns a non-zero value. AVMedia.GetAudioPIDs
void | object AVMedia.GetAudioPIDs()
Retrieves details of the audio PIDs. Note thatAVMedia.GetAudioPIDList enables similar for Opera. Supported platforms: Fresco. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns an object with the following attributes: Attribute
pids
Type int
Description Number of audio PIDS for the current stream. Array of objects (this array is only returned if the total number of PIDs is greater than zero). Value of this PID. Language tag associated with this PID.
Array[1 object ... PIDs] Array[x]. unsigned AudioPID int Array[x]. string AudioLang uage Array[x]. string AudioLang uage2
69
AVMedia
Attribute
Result
Type long
AVMedia.GetAudioPIDList
void | string AVMedia.GetAudioPIDList()
Retrieves details of the audio PIDs. Note that AVMedia.GetAudioPIDs enables similar for Fresco. Supported platforms: Opera. Parameters None. Return Returns void if video control support has not been compiled, Otherwise, returns an string concatenation containing the following for each PID in the current stream:
AudioPID=<PID_number>;AudioLanguage=<PID_language_tag>;
AVMedia.GetAudioPID
void | int AVMedia.GetAudioPID()
Supported platforms: Fresco, Opera, Escape. Retrieves the audio PID. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns the audio PID. AVMedia.VideoHide
int AVMedia.VideoHide(boolean state)
Enables or disables the video plane. Disabling the video plane has the effect of hiding video whilst the stream connection is maintained and audio playback continues. This can be useful, for example, for hiding video whilst drawing overlaid graphics, or if the PiG needs to be relocated without any video artefacts. The video layer can be re-enabled by calling this function or by calling AVMedia.Play. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
state
Allowed values
true or false
Description Set true to hide video plane output; false to display it.
70
AVMedia
Return Returns 0 on success or if AVMedia support is not compiled. Otherwise, returns a nonzero value. AVMedia.SetPrimaryAudioLanguage
void AVMedia.SetPrimaryAudioLanguage(string language, [int persist])
Sets the primary audio language. Supported platforms: Fresco, Opera. Parameters Parameters
language [persist] 1 or 0
Allowed values
Description Language to set. Can be any ISO 639-2 code. E.g.: rus or rus/ru. Specifies whether the setting is written to the set-top boxs stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you dont set this, then the default value 0 is used. Note that on Fresco versions earlier than 0.14.0, this parameter is not read and the setting is always written to configuration.
Return
void.
AVMedia.GetPrimaryAudioLanguage
string AVMedia.GetPrimaryAudioLanguage([int persist]) Fresco void | string AVMedia.GetPrimaryAudioLanguage([int persist]) Opera
Returns the primary audio language. Supported platforms: Fresco, Opera. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Specifies whether to retrieve the setting from the set-top boxs stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you dont set this, then the default value 0 is used. Note that on Fresco versions earlier than 0.14.0, this parameter is not read and the setting is always written to configuration.
71
AVMedia
Return Fresco: Returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. Opera: Returns void if the input parameter cant be parsed. Otherwise, returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. . AVMedia.SetSecondaryAudioLanguage
void AVMedia.SetSecondaryAudioLanguage(string language, [int persist])
Sets the secondary audio language. Supported platforms: Fresco, Opera. Parameters Parameters
language [persist] 1 or 0
Allowed values
Description Language to set. Can be any ISO 639-2 code. E.g.: rus or rus/ru. Specifies whether the setting is written to the set-top boxs stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you dont set this, then the default value 0 is used. Note that on Fresco versions earlier than 0.14.0, this parameter is not read and the setting is always written to configuration.
Return
void.
AVMedia.GetSecondaryAudioLanguage
string AVMedia.GetSecondaryAudioLanguage([int persist]) Fresco void | string AVMedia.GetSecondaryAudioLanguage([int persist]) Opera
72
AVMedia
Parameters Parameters
[persist]
Allowed values
1 or 0
Description Specifies whether to retrieve the setting from the set-top boxs stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you dont set this, then the default value 0 is used. Note that on Fresco versions earlier than 0.14.0, this parameter is not read and the setting is always written to configuration.
Return Fresco: Returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. Opera: Returns void if the input parameter cant be parsed. Otherwise, returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. AVMedia.SetPrimarySubtitleLanguage
string AVMedia.SetPrimarySubtitleLanguage(string language, [int persist]) Fresco void | long AVMedia.SetPrimarySubtitleLanguage(string language, [int persist]) Opera
Sets the primary subtitle language. Supported platforms: Fresco, Opera. Note: Preferred equivalent in Opera: VideoDisplay.SetSubtitlesPreferredLanguage. Current behaviour introduced in Fresco 0.14.0. Parameters Parameters
language [persist] 1 or 0
Allowed values
Description Language to set. Can be any ISO 639-2 code. E.g.: rus or rus/ru. Specifies whether the setting is written to the set-top boxs stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you dont set this, then the default value 0 is used.
73
AVMedia
Value
Failed to read persist parameter Failed to read language parameter Failed to set subtitles primary language Subtitles not supported
Meaning The persist parameter was not a valid number. The language parameter was not a valid string. Subtitle language couldnt be changed. Subtitles are not enabled in the build.
Returns the primary subtitle language. Supported platforms: Fresco, Opera. Note: Preferred equivalent in Opera: VideoDisplay.GetSubtitlesPreferredLanguage. Current behaviour introduced in Fresco 0.14.0. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Specifies whether to retrieve the setting from the set-top boxs stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you dont set this, then the default value 0 is used.
Return Fresco: Returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. On error, returns one of the following values: Value
Failed to read persist parameter Subtitles not supported
Meaning The persist parameter was not a valid number. Subtitles are not enabled in the build.
Opera: Returns void if subtitles are not supported or if there is an error parsing the input parameter. Otherwise, returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set.
74
AVMedia
AVMedia.SetSecondarySubtitleLanguage
string AVMedia.SetSecondarySubtitleLanguage(string language, [int persist]) Fresco void | long AVMedia.SetSecondarySubtitleLanguage(string language, [int persist])
Opera Sets the secondary subtitle language. Supported platforms: Fresco, Opera. Note: Preferred equivalent in Opera: VideoDisplay.SetSubtitlesSecondaryLanguage. Current behaviour introduced in Fresco 0.14.0. Parameters Parameters
language [persist] 1 or 0
Allowed values
Description Language to set. Can be any ISO 639-2 code. E.g.: rus or rus/ru. Specifies whether the setting is written to the set-top boxs stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you dont set this, then the default value 0 is used.
Meaning Successfully changed subtitle language. The persist parameter was not a valid number. The language parameter was not a valid string. Subtitle language couldnt be changed. Subtitles are not enabled in the build.
Returns the secondary subtitle language. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.14.0.
75
AVMedia
Allowed values
1 or 0
Description Specifies whether to retrieve the setting from the set-top boxs stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you dont set this, then the default value 0 is used.
Return Fresco: Returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. On error, returns one of the following values: Value
Failed to read persist parameter Subtitles not supported
Meaning The persist parameter was not a valid number. Subtitles are not enabled in the build.
Opera: Returns void if subtitles are not supported or if there is an error parsing the input parameter. Otherwise, returns a string containing the ISO 639-2 code for the language (e.g. rus or rus/ru), or NULL if no language is set. AVMedia.DownloadKey
void AVMedia.DownloadKey(string parameter)
Allowed values
Return
void.
AVMedia.SetKeyID
void AVMedia.SetKeyID(string parameter)
Allowed values
Return
void.
76
AVMedia
AVMedia.SetHighDef
int AVMedia.SetHighDef(int state)
Enables or disables high definition mode. In high definition mode, the high frequency pass-through filter is deactivated for normal HD playback. When high definition mode is disabled, standard definition mode is used instead. Supported platforms: Fresco, Opera. Note: This is only supported on AmiNET120 and AmiNET122 platforms. Parameters Parameters
state
Allowed values
0 or 1
Description Set 0 to set standard definition mode; set 1 to enable high definition mode.
Return Returns 0 on success or if Aminet 120 or Aminet122 support has not been enabled. Otherwise, returns a non-zero value (e.g. if the input parameter cant be parsed). AVMedia.GetVideoPID
void | int AVMedia.GetVideoPID()
Retrieves the MPEG PID of the current media stream Supported platforms: Fresco, Opera. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns the PID or NULL if there is no current media stream. AVMedia.GetPmtProgramInfo
void | string AVMedia.GetPmtProgramInfo()
Retrieves programme information from the MPEG PMT table. Supported platforms: Fresco, Opera. Note: Only supported if AMI_WITH_PMT_NOTIFICATION has been configured. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns the programme information as a NULL-terminated hexadecimal string.
77
AVMedia
AVMedia.GetPMTPID
void | int AVMedia.GetPMTPID()
Retrieves the PID of the PMT. Supported platforms: Opera. Conax builds only. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns PID of the PMT.
78
5 VideoDisplay
5.1 VideoDisplay class
The VideoDisplay class allows control over video display settings. It is possible to control the scaling and positioning of the video and to determine its relationship to the graphics. Graphics can be overlaid on top of the video, with alphablending, and with chroma-keying (including use of both at the same time). Scaled video can be displayed on top of the graphics, as a picture-in-graphics (PiG) display.
Enables or disables the full screen video display. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
state
Allowed values
1 or 0
Description Set 1 to enable the full screen video display; 0 or any other number to disable it.
79
VideoDisplay
Return
void.
VideoDisplay.SetPIG
long VideoDisplay.SetPIG(int state) int VideoDisplay.SetPIG(int state, int scale, int x, int y, [int mandisp, [int persist]])
Enables or disables the PiG display. The alternative function with additional parameters also sets up the scale and position of the PiG display. Note that position is defined by the position of the top-left corner of the PiG at specified coordinates relative to the bottom-left corner of the screen. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
state scale
Allowed values
1 or 0 -1 use previous value 1 full screen 2 half screen 4 quarter screen
Description Set 1 to enable the PiG display; 0 to disable it. The scale factor for the video in the PiG display.
See PiG display on page The horizontal position of the PiG 79. display. Set -1 to return to previous value. See PiG display on page The horizontal position of the PiG 79. display. Set -1 to return to previous value.
0 automatic
[mandisp]
configuration
1 manual configuration -1 return to previous
value
[persist] 0 use value until reboot 1 store value in persistent configuration -1 return to previous
value
Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. If you dont include this setting, the default value 1 is used. Note that mandisp must be set if you are setting persist.
Return Returns 0 on success, -1 on error (including if video support is not enabled in the build).
80
VideoDisplay
VideoDisplay.GetPIG
void | long VideoDisplay.GetPIG()
Retrieves the state of the PiG. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control has not been compiled. Otherwise, returns 1 if the PiG is enabled; 0 if it is not. VideoDisplay.SetPIGScale
void | long VideoDisplay.SetPIGScale(int scale)
Sets the scale factor for the video in the PiG display. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
scale
Allowed values
1 full screen 2 half screen 4 quarter screen
Return Returns void if video control has not been enabled. Otherwise, returns 0 on success; -1 on error. VideoDisplay.GetPIGScale
int VideoDisplay.GetPIGScale()
Retrieves the scale factor for the video in the PiG display. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters None. Return Returns -1 on error or if video control has not been enabled. Otherwise, returns the scale. This can be one of the following values: Value
1 2 4
81
VideoDisplay
VideoDisplay.SetPIGPosition
void | int VideoDisplay.SetPIGPosition(int x, int y)
Sets the position of the PiG display. Note that position is defined by the position of the top-left corner of the PiG at specified coordinates relative to the bottom-left corner of the screen. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
x y
Allowed values
Description
See PiG display on page The horizontal position of the PiG 79. display. See PiG display on page The horizontal position of the PiG 79. display.
Return Returns void if there is an error parsing one of the parameters entered or if video control is not compiled. Otherwise, returns 0 on success;-1 on error. VideoDisplay.GetPIGx
void | int VideoDisplay.GetPIGx()
Retrieves the horizontal position of the top-left corner of the PiG display, relative to the bottom-left of the screen. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns the x-coordinate for the PiG. VideoDisplay.GetPIGy
void | int VideoDisplay.GetPIGy()
Retrieves the vertical position of the top-left corner of the PiG display, relative to the bottom-left of the screen. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns the y-coordinate for the PiG.
82
VideoDisplay
VideoDisplay.GetPIGPosition
void | string VideoDisplay.GetPIGPosition()
Retrieves the position of the top-left corner of the PiG display, relative to the bottom-left of the screen. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns the x- and ycoordinates for the PiG, in the format (x,y). VideoDisplay.SetChromaKey
int VideoDisplay.SetChromaKey(long rgb) int VideoDisplay.SetChromaKey(int red, int green, int blue)
Sets the RGB colour to be used for chroma-keying to the given value, as a hexadecimal value. Note: You are recommended to set this at the start of your HTML page. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
rgb
Allowed values
Description The chroma-key value. This must be a hexadecimal value, in the format RRGGBB. For example:
VideoDisplay.SetChromaKey(0X60 3020)(hex) or VideoDisplay.SetChromaKey(6303 776)(decimal)
Hexadecimal or decimal equivalent for red colour value. Hexadecimal or decimal equivalent for green colour value. Hexadecimal or decimal equivalent for blue colour value.
Retrieves the chroma-key RGB colour value as a decimal. Supported platforms: Fresco, Opera, Escape. Parameters None.
83
VideoDisplay
Sets the RGB colour to be used for chroma-keying to the given value, as separate RGB values. Note: You are recommended to set this at the start of your HTML page. Supported platforms: Escape. Parameters Parameters
r g b
Allowed values
Description Hexadecimal or decimal equivalent for R colour value. Hexadecimal or decimal equivalent for G colour value. Hexadecimal or decimal equivalent for B colour value.
Return
void.
VideoDisplay.GetChromaRGB
int VideoDisplay.GetChromaRGB()
Retrieves the chroma-key RGB colour value, as separate RGB values. Supported platforms: Escape. Parameters None. Return Returns the RGB value as a decimal. VideoDisplay.SetMode
void VideoDisplay.SetMode(int mode)
Sets the graphics mode. Supported platforms: Fresco, Opera, Escape. Not currently supported. Parameters Parameters
mode
Description
84
VideoDisplay
Return
void.
VideoDisplay.GetMode
int VideoDisplay.GetMode()
Retrieves the current graphics mode. Supported platforms: Fresco, Opera, Escape. Not currently supported. Parameters None. Return Returns one of the following graphics mode values (will generally be 1): Value
0 1
Meaning 640x518 RGB555 with separate Alpha blend byte 640x438 RGB555 with separate Alpha blend byte
VideoDisplay.SetAlphaLevel
string VideoDisplay.SetAlphaLevel(int alpha)
Sets the overall alpha blend level used to control the blending between the full-screen video layer and the graphics layer. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
alpha
Allowed values
0 - 100
Description Blend level as a percentage, where 0 means graphics are fully transparent; 100 means graphics are fully opaque.
Return Returns Failed to read alpha level parameter on error; otherwise, returns OK on success. VideoDisplay.GetAlphaLevel
int VideoDisplay.GetAlphaLevel()
Retrieves the alpha blend level for blending between the full-screen video layer and the graphics layer. Supported platforms: Fresco, Opera, Escape. Parameters None.
85
VideoDisplay
Return Returns the blend level as a percentage, where 0 means graphics are fully transparent; 100 means graphics are fully opaque. VideoDisplay.SetAspect
string VideoDisplay.SetAspect(int aspect)
Sets the screen display presentation style. For screens with 16:9 content presentation style, this has no effect; for 4:3 screens, this sets an override for the 16:9 aspect. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
aspect
Allowed values
1 4:3 pan and scan 2 4:3 letterbox 3 16:9
Meaning Successfully changed aspect. Parameter entered was not in the range 0 - 3. Parameter entered was not a valid number. Aspect couldnt be changed. build.
VideoDisplay.GetAspect
void | long VideoDisplay.GetAspect()
Retrieves the screen display presentation style. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns one of the following values, or 0 on error: Value
1 2 3
86
VideoDisplay
VideoDisplay.SetAVAspectSwitching
string VideoDisplay.SetAVAspectSwitching(int mode)
Set AV (scart pin 8) aspect ratio switching behaviour. When auto-switching is enabled the aspect ratio signalling on scart pin 8 will automatically switch based on the monitor type selected and content type currently playing. When auto-switching is disabled the AV aspect ratio (scart pin 8) will have to be set manually. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
mode
Allowed values
0 or 1
Meaning Success. Parameter entered was not a valid number. Aspect switching couldnt be changed. build.
VideoDisplay.SetAVAspect
string VideoDisplay.SetAVAspect(int aspect)
Sets the AV (scart pin 8) aspect ratio. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
aspect
Allowed values
0 off 1 on (restores previous non-OFF value) 2 4:3 3 16:9
87
VideoDisplay
Meaning Successfully changed aspect. Parameter entered was not in the range 0 - 3. Parameter entered was not a valid number. Aspect couldnt be changed. build.
VideoDisplay.GetAVAspect
void | int VideoDisplay.GetAVAspect()
Retrieves the current AV (scart pin 8) aspect ratio. Supported platforms: Fresco, Opera. Parameters None. Return Returns void if video control support is not compiled, or -1 on error. Otherwise, returns one of the following values: Value
0 1 2 3
VideoDisplay.SetTVStandard
void VideoDisplay.SetTVStandard(string standard)
Sets the television standard. Supported platforms: Fresco, Opera. Not currently supported.
88
VideoDisplay
Parameters Parameters
standard
Allowed values
PAL-I PAL-M PAL-(c)N PAL-G PAL-B PAL-H PAL-D NTSC-J NTSC-M
Return
void.
VideoDisplay.GetTVStandard
void | string VideoDisplay.GetTVStandard()
Retrieves the television standard that the set-top box is set to. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns one of the following values: Value
PAL-I PAL-M PAL-(C)N PAL-G PAL-B PAL-H PAL-D NTSC-J NTSC-M Unknown
Meaning PAL (e.g. UK) PAL (e.g. Brazil) PAL (e.g. Argentina) PAL (Europe) PAL (e.g. Australia, Ghana) PAL (e.g. Belgium) PAL (e.g. China) NTSC (Japan) mode NTSC (US) mode set-top box is set to an unhandled mode
VideoDisplay.SetOutputFmt
string VideoDisplay.SetOutputFmt(string format, [int persist])
89
VideoDisplay
Allowed values
CVBS-RGBOFF
Description The format to set. The formats available depend on the set-top box type and cables connected - see the separate list of Output formats for details.
Composite
CVBS-RGBON
RGB
CVBS-LC Composite and S-Video CVBS-LBR Composite and Component (YPbPr) LBR-CVBS-LC
Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 0 is used.
Meaning Successfully changed output format. Parameter entered is not a recognised output format string. Parameter entered could not be read as a valid string. Parameter entered could not be read as a valid number
Failed to set output format Output format couldnt be changed. Video control not supported Video support is not enabled in the
build.
90
VideoDisplay
VideoDisplay.GetOutputFmt
void | string VideoDisplay.GetOutputFmt([int persist])
Retrieves the video output format. Supported platforms: Fresco, Opera. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you dont include this setting, the default value 0 is used.
Return Returns void if video control support is not compiled. Otherwise, returns one of the following values: Value
CVBS-RGBOFF CVBS-RGBON LC-RGBOFF LC-RGBON CVBS-LC CVBS-LBR LBR-CVBS-LC RGB-CVBS-LC
Meaning Composite Composite and RGB S-video S-video and RGB Composite and S-Video Composite and Component (YPbPr) Composite, S-Video and Component (YPbPr) Composite, S-Video and RGB
VideoDisplay.SetOutput
int VideoDisplay.SetOutput(int output)
Sets the video output format. Supported platforms: Fresco. Opera. Note: Deprecated. Use VideoDisplay.SetOutputFmt
91
VideoDisplay
Parameters Parameters
output
Allowed values
OR-concatenation of the
following:
1 RGB 2 UHF 4 Composite 8 S-Video 16 LBR
(YPbPr/Component) Return
void.
VideoDisplay.GetOutput
void | int VideoDisplay.GetOutput()
Returns the output method as a bitfield. Supported platforms: Fresco, Opera, Escape. Note: Deprecated. Use VideoDisplay.GetOutputFmt Parameters None. Return Returns void if video control support is not compiled. Otherwise, returns values as listed for input to VideoControl.SetOutput. VideoDisplay.SetMacrovision
void VideoDisplay.SetMacrovision(int mode)
Sets how the set-top box outputs video under Macrovision control. This can only be used if the video host is under Macrovision control and has been added to the trusted domains list. Supported platforms: Fresco, Opera, Escape. Macrovision builds only. Parameters Parameters
mode
Allowed values
Description
Mode byte to set. Refer to your Macrovision licence for the values to set for each mode.
Return
void.
92
VideoDisplay
VideoDisplay.GetMacrovision
int VideoDisplay.GetMacrovision()
Retrieves how the set-top box is set to handle video output under Macrovision control. Supported platforms: Fresco, Opera, Escape. Macrovision builds only. Parameters None. Return Returns the mode byte to indicate how video is output under Macrovision contro. Possible values for this byte depend on your Macrovision licence. VideoDisplay.IgnoreUpdates
void VideoDisplay.IgnoreUpdates(int ignore)
Disables (or enables) screen updates while a page renders. For example, disable screen updates from within the head of an HTML document, then enable updates again in the body onLoad handler, to re-enable updates and refresh the screen once the page has finished loading. Supported platforms: Fresco, Opera. ami_wm builds only on Opera. Parameters Parameters
ignore
Allowed values
1 or 0
Description Set 1 to disable updates; 0 to enable updates (any value other than 1 will also enable updates).
Return
void.
VideoDisplay.SetTeletext
string VideoDisplay.SetTeletext(int enable)
Enable or disable insertion of teletext data into the analogue VBI. The teletext status is only used at the start of a stream. Modification of the state requires the stream to be restarted. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
enable
Allowed values
1 or 0
Description Set true to enable teletext VBI insertion; false to disable it.
93
VideoDisplay
Value
Failed to read enable parameter Failed to set teletext enable Teletext not supported
Meaning Value entered for enable parameter is not a valid number. Teletext state couldnt be set. Teletext support is not enabled in the build.
VideoDisplay.GetTeletext
int VideoDisplay.GetTeletext()
Retrieves whether teletext VBI insertion is enabled or disabled. Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns 0 if VBI insertion is disabled; 1 if it is enabled. VideoDisplay.SetSubtitles
string VideoDisplay.SetSubtitles(int enable, [int persist])
Enables or disables subtitle display on the screen. The change takes effect immediately. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
enable [persist]
Allowed values
1 or 0 1 or 0
Description Set 1 to enable subtitle display; 0 to disable it. Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 1 is used.
Meaning Successfully set subtitles. Value entered for optional persist parameter is not a valid number. Value entered for enable parameter is not a valid number.
94
VideoDisplay
Value
Subtitles not supported
VideoDisplay.GetSubtitles
void | int VideoDisplay.GetSubtitles([int persist])
Retrieves whether the on-screen subtitle display is enabled or disabled. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you dont include this setting, the default value 1 is used.
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns 0 if the subtitle display is disabled; 1 if it is enabled. VideoDisplay.SetClosedCaption
string VideoDisplay.SetClosedCaption(int closedcaption)
Enables or disables closed caption display on the screen. The change takes effect immediately. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters Allowed values Description Set 1 to enable closed caption display; 0 to disable it.
closedcaptio 0 or 1 n
Failed to read closedcaption Value entered for closedcaption value parameter is not a valid number. Failed to set closed caption Closed captions couldnt be set. Closed caption not supported Closed captions support is not
95
VideoDisplay
VideoDisplay.GetClosedCaption
long VideoDisplay.GetClosedCaption()
Retrieves whether the on-screen closed caption display is enabled or disabled. Supported platforms: Fresco, Opera. Parameters None. Return Returns 0 if the closed caption display is disabled; 1 if it is enabled. VideoDisplay.RetainMouseState
int VideoDisplay.RetainMouseState(boolean state)
Sets whether the current mouse state is retained when moving between pages. Retaining the mouse state prevents the flashing that occurs when the mouse cursor is turned on when moving to a new page. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
state
Allowed values
false or true
Description Set true to retain the mouse state; false to reset the mouse state when a new page is displayed.
Sets whether the current alpha level is retained when moving between pages. Retaining the alpha level prevents the flashing that occurs when the alpha level is reset when moving to a new page. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
state
Allowed values
false or true
Description Set true to retain the alpha level; false to reset the alpha level when a new page is displayed.
96
VideoDisplay
VideoDisplay.UnloadVideo
string VideoDisplay.UnloadVideo(boolean unload)
Sets whether video is stopped when a page is unloaded. The value set is valid for the current page only. Note that the value set by VideoDisplay.UnloadVideo overrides the value set by VideoDisplay.DefaultUnloadVideo for the current page. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
unload
Allowed values
false or true
Description Set true to stop video while the page is unloaded; otherwise set false.
Meaning Success. Value entered for unload parameter is not a boolean. in the build.
VideoDisplay.DefaultUnloadVideo
void VideoDisplay.DefaultUnloadVideo(boolean unload)
Sets whether video is stopped when a page is unloaded. The value is set in configuration. Note that the value set by VideoDisplay.UnloadVideo overrides the value set by VideoDisplay.DefaultUnloadVideo for the current page. Supported platforms: Fresco, Opera. Parameters Parameters
unload
Allowed values
false or true
Description Set true to stop video while the page is unloaded; otherwise set false.
Return
void.
VideoDisplay.SetUHFChannel
string VideoDisplay.SetUHFChannel(int channel, [int persist])
Sets the output channel of the RF modulator. The change takes effect immediately. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0.
97
VideoDisplay
Parameters Parameters
channel [persist]
Allowed values 1 or 0
Description The RF output channel Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 0 is used.
Meaning Successfully set RF channel. Value entered for persist parameter is not 0 or 1. Value entered for channel parameter is not a valid number. Value entered for persist parameter is not a valid number. RF is not enabled in the build.
Failed to set RF mod channel RF channel couldnt be changed. RF control not supported
VideoDisplay.GetUHFChannel
void | int VideoDisplay.GetUHFChannel([int persist])
Retrieves the channel that the RF modulator is set to (either the current channel or the channel stored in configuration). Supported platforms: Fresco, Opera. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration setting; 0 for the current setting. If you dont include this setting, the default value 0 is used.
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns a channel number (note that 0 can indicate an error).
98
VideoDisplay
VideoDisplay.SetRFModState
string VideoDisplay.SetRFModState(int enable, [int persist])
Enables or disables the RF modulator output. The change takes effect immediately. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
enable [persist]
Allowed values
1 or 0
Description Set 1 to enable the RF modulator; 0 to disable it. Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 0 is used.
1 or 0
Meaning Successfully set RF modulator. Value entered for optional persist parameter is not a valid number. Value entered for enable parameter is not a valid number. RF modulator couldnt be set. RF is not enabled in the build.
VideoDisplay.GetRFModState
void | long VideoDisplay.GetRFModState([int persist])
Retrieves the state of the RF modulator. Supported platforms: Fresco, Opera. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you dont include this setting, the default value 0 is used.
99
VideoDisplay
Return Returns void if there is an error parsing the parameter entered. Otherwise, returns 0 if the RF modulator is disabled; 1 if it is enabled. VideoDisplay.SetRFModFrequencyTable
string VideoDisplay.SetRFModFrequencyTable(string table, [int persist])
Sets the RF modulator frequency table. The change takes effect immediately. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
table [persist]
Allowed values
CABLE or BROADCAST 1 or 0
Description The RF modulator frequency table. Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 0 is used.
Meaning Successfully set RF frequency table. Value entered for optional persist parameter is not a valid number. Value entered for table parameter is not one of the allowed strings. Value entered for table parameter cant be read as a string. RF frequency table couldnt be set. RF is not enabled in the build.
VideoDisplay.GetRFModFrequencyTable
void | string VideoDisplay.GetRFModFrequencyTable([int persist])
100
VideoDisplay
Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you dont include this setting, the default value 0 is used.
Return Returns void if there is an error parsing the parameter entered or if video control support is not compiled. Otherwise, returns the frequency table in use. Values can be CABLE or BROADCAST. VideoDisplay.SetSubtitlesPreferredLanguage
string VideoDisplay.SetSubtitlesPreferredLanguage(string language), [int persist])
Sets the preferred language for subtitles. Note that this is equivalent to AVMedia.SetPrimarySubtitleLanguage. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
language [persist] 0 or 1
Allowed values
Description The language to set (any ISO 639-2 language string). Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 0 is used.
Meaning Successfully set subtitle language. Value entered for optional persist parameter is not a valid number. Value entered for enable parameter is not a valid string. Subtitle language couldnt be set. Subtitle support is not enabled in the build.
101
VideoDisplay
VideoDisplay.GetSubtitlesPreferredLanguage
string VideoDisplay.GetSubtitlesPreferredLanguage([int persist])
Retrieves the current setting for the preferred language for subtitles. Note that this is equivalent to AVMedia.GetPrimarySubtitleLanguage. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you dont include this setting, the default value 0 is used.
Return Returns Failed to read persist parameter if the value of the persist parameter is not a valid number; Subtitles not supported if subtitle support is not enabled. Otherwise, returns the language as a string. VideoDisplay.SetSubtitlesSecondaryLanguage
string VideoDisplay.SetSubtitlesSecondaryLanguage(string language, [int persist])
Sets the secondary language for subtitles. Note that this is equivalent to AVMedia.SetSecondarySubtitleLanguage. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
language [persist] 0 or 1
Allowed values
Description The language to set (ISO 639-2 language string). Sets whether the value set is stored permanently in the set-top boxs configuration or is only used until the set-top box reboots. Set 1 for the setting to be stored in the configuration; otherwise, set 0. If you dont include this setting, the default value 0 is used.
102
VideoDisplay
Value
Failed to read persist parameter Failed to read language parameter Failed to set subtitles secondary language Subtitles not supported
Meaning Value entered for optional persist parameter is not a valid number. Value entered for enable parameter is not a valid string. Subtitle language couldnt be set. Subtitle support is not enabled in the build.
VideoDisplay.GetSubtitlesSecondaryLanguage
string VideoDisplay.GetSubtitlesSecondaryLanguage([int persist])
Retrieves the current setting for the secondary language for subtitles. Note that this is equivalent to AVMedia.GetSecondarySubtitleLanguage. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
[persist]
Allowed values
1 or 0
Description Sets whether to retrieve the current value or the value stored in the set-top boxs permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you dont include this parameter, the default value 0 is used.
Return Returns Failed to read persist parameter if the value of the persist parameter is not a valid number; Subtitles not supported if subtitle support is not enabled. Otherwise, returns the language as a string. VideoDisplay.SetAPS
int VideoDisplay.SetAPS(int mode)
Sets the Macrovision APS mode. This setting is only used when the TV standard is set to NTSC mode. Supported platforms: Fresco, Opera. Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0. Parameters Parameters
mode
Allowed values
0-3
Return Returns -1 if the parameter entered is invalid or if Macrovision is not supported. Otherwise, returns 0 on success.
103
VideoDisplay
VideoDisplay.GetAPS
int VideoDisplay.GetAPS()
Retrieves the Macrovision APS mode. Supported platforms: Fresco, Opera. Parameters None. Return Returns the mode (this is a value in the range 0 - 3, as per the APS specification). VideoDisplay.SetTeletextFullscreen
void | long VideoDisplay.SetTeletextFullscreen(int state)
Sets whether teletext is full screen. Supported platforms: Opera. Parameters Parameters
state
Allowed values
0 or 1
Return Returns void if there is an error parsing the parameter entered, or if full screen teletext is not supported. Otherwise, returns 0 on success; non-zero on error. VideoDisplay.GetTeletextFullscreen
long VideoDisplay.GetTeletextFullscreen()
Retrieves whether full screen teletext is enabled. Supported platforms: Opera. Parameters None. Return Returns 1 full screen teletext is enabled; 0 if it is disabled or not supported. VideoDisplay.SetAlphaRect
void VideoDisplay.SetAlphaRect(int x, int y, int w, int h, int alpha)
Sets the alpha rectangle so that video can be displayed through it (i.e. via the PiG). Supported platforms: Opera. Parameters Parameters
x
Allowed values
104
VideoDisplay
Parameters
y w h alpha
Allowed values
Description Vertical position of top-left corner of rectangle. Width of rectangle. Height of rectangle. Alpha blend value.
Return
void.
VideoDisplay.IgnoreSlaveUpdates
void VideoDisplay.IgnoreSlaveUpdates(int enable, [int id])
Enables or disables whether slave updates are ignored. Supported platforms: Opera. Parameters Parameters
enable [id]
Allowed values 1 or 0
Description Set 1 to ignore slave updates; otherwise set 0. ID. The default ID is 0.
Return
void.
105
6 AudioControl
6.1 AudioControl class
The AudioControl class enables interaction with the set-top boxs audio system.
Callback for the last event code. Event codes are browser-specific integer values. Supported platforms: Fresco, Opera, Escape, Amiscript. AudioControl.onVolumeChange
string AudioControl.onVolumeChange
Enables a Javascript event handler to be associated with set-top box volume changes. The call is invoked whenever the current volume changes. onVolumeChange is set with a string that contains the Javascript event-handler function call. Supported platforms: Fresco, Opera, Escape, Amiscript. Usage example (Fresco):
AudioControl.onVolumeChange = handle_volume_change(); ;
106
AudioControl
Sets the current set-top box volume level. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
type
Allowed values
0 - 100 (actual range
Description The volume level to set. This must be a value within the range set for minimum and maximum volume (or 0 - 100 if these values have not been set.)
Return Fresco: Returns 0 on success; returns non-zero on error. Opera: Returns 0 on success; returns non-zero on error. Returns void if the parameter entered cant be parsed. AudioControl.GetVolume
void | int AudioControl.GetVolume()
Retrieves the current set-top box volume level Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control is not compiled. Otherwise, returns the volume level. This is a value in the range specified by the minimum and maximum volume levels, or in the range 0 - 100 if these have not been set. AudioControl.SetMute
void | int AudioControl.SetMute(boolean state)
Mutes or un-mutes the set-top box audio output. When the audio is un-muted, the volume level prior to muting is restored. Note that muting the audio is similar to setting AudioControl.SetVolume(0) (see AudioControl.SetVolume on page 107), except that with muting, the previous volume value is retained. Supported platforms: Fresco, Opera, Escape. Current behaviour introduced in Fresco 0.14.0.
107
AudioControl
Parameters Parameters
state
Return Returns void if the parameter entered cant be parsed or non-zero for other error (Fresco only). Otherwise, returns 0. AudioControl.GetMute
void | long AudioControl.GetMute()
Retrieves the set-top boxs mute state (mute on or off). Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control is not compiled. Otherwise, returns 0 if audio is not muted; 1 if audio is muted. AudioControl.SetMaxVolume
int AudioControl.SetMaxVolume(int volume) Fresco void | int AudioControl.SetMaxVolume(int volume) Opera
Sets the maximum set-top box volume level (this value is preserved across reboots). Note that if the volume you set is less than or equal to the minimum volume, then the maximum volume is not reset. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
volume
Allowed values
0 - 100
Description The volume level to set. This value should be greater than the minimum value set.
Return Fresco: Returns 0 on success; non-zero on error. Opera: Returns void if the parameter entered cant be parsed. Otherwise, returns 0 on success; non-zero on error. AudioControl.GetMaxVolume
int AudioControl.GetMaxVolume() Fresco void | int AudioControl.GetMaxVolume() Opera
Retrieves the set-top box maximum volume level (this is 100 if no maximum volume level has been set).
108
AudioControl
Supported platforms: Fresco, Opera, Escape. Parameters None. Return Fresco: Returns the volume level. This is a value in the range 0 - 100. Opera: Returns void if video control is not compiled. Otherwise, returns the volume level. This is a value in the range 0 - 100. AudioControl.SetDefaultVolume
int AudioControl.SetDefaultVolume(int volume) Fresco void | int AudioControl.SetDefaultVolume(int volume) Opera
Sets the default set-top box volume level (this value is preserved across reboots). Supported platforms: Fresco, Opera, Escape. Parameters Parameters
volume
Allowed values
0 - 100 (actual range
Description The volume level to set. This must be a value within the range set for minimum and maximum volume, or 0 - 100 if these values have not been set.
Return Fresco: Returns 0 on success; non-zero on error. Opera: Returns void if the parameter entered cant be parsed. Otherwise, returns 0 on success; non-zero on error. AudioControl.GetDefaultVolume
void | long AudioControl.GetDefaultVolume()
Retrieves the set-top box default volume level (this is 100 if no default volume level has been set). Supported platforms: Fresco, Opera, Escape. Parameters None. Return Returns void if video control is not compiled. Otherwise, returns the volume level. This is a value in the range specified by the minimum and maximum volume levels, or 0 - 100 if these have not been set.
109
AudioControl
AudioControl.SetMinVolume
int AudioControl.SetMinVolume(int volume) Fresco void | int AudioControl.SetMinVolume(int volume) Opera
Sets the minimum set-top box volume level (this value is preserved across reboots). Note that if the volume you set is greater than or equal to the maximum volume, then the minimum volume is not reset. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
volume
Allowed values
0 - 100
Description The volume level to set. This value should be less than the maximum value set.
Return Fresco: Returns 0 on success or if the parameter entered cant be parsed; returns nonzero on other error. Opera: Returns void if the parameter entered cant be parsed. Otherwise, returns 0 on success; non-zero on other error. AudioControl.GetMinVolume
long AudioControl.GetMinVolume() Fresco void | long AudioControl.GetMinVolume() Opera
Retrieves the set-top box minimum volume level (this is 0 if no minimum volume level has been set). Supported platforms: Fresco, Opera, Escape. Parameters None. Return Fresco: Returns the volume level. This is a value in the range 0 - 100. Opera: Returns void if video control is not compiled. Otherwise, returns the volume level. This is a value in the range 0 - 100. AudioControl.SetAudioMix
void | int AudioControl.SetAudioMix(string mix)
Sets the mix type for the set-top box audio. Supported platforms: Fresco, Opera.
110
AudioControl
Parameters Parameters
mix
Allowed values
stereo both left and
Description
The audio mix type to set. (Note that the allowed values are not casesensitive, so variants such as left left channel only Stereo or STEREO are also right right channel allowed.) only right channels
monomix mix left and right channel together
Return Fresco: Returns 0 on success; non-zero on error. Opera: Returns void if the parameter entered cant be parsed or if the mix parameter is NULL. Otherwise, returns 0 on success; non-zero on error. AudioControl.SetAC3Outmode
void | int AudioControl.SetAC3Outmode(string outmode)
Sets the set-top boxs Dolby AC-3 audio output mode. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. Parameters Parameters
outmode
Allowed values
line AC-3 line mode rf AC-3 RF mode
Return Returns void if the input string is NULL or there is an internal Javascript error. Otherwise, returns 0 on success; non-zero on error (including if AC-3 support is not compiled in). AudioControl.GetAC3Outmode
string AudioControl.GetAC3Outmode()
Retrieves the set-top boxs AC-3 audio output mode. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. Parameters None. Return Returns one of the following strings: Value
failed line rf
Meaning error - cant get AC-3 audio output mode AC-3 Line Mode AC-3 RF Mode
111
AudioControl
AudioControl.SetAC3DRC
void | int AudioControl.SetAC3DRC(string ac3drc)
Sets the set-top boxs Dolby AC-3 DRC (Dynamic Range Control) audio mode. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. . Parameters Parameters
ac3drc
Description
Return Returns void if the input string is NULL or there is an internal Javascript error. Otherwise, returns 0 on success; non-zero on error (including if AC-3 support is not compiled in). AudioControl.GetAC3DRC
string AudioControl.GetAC3DRC()
Retrieves the set-top boxs Dolby C-3 dynamic range control mode. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. Parameters None. Return Returns one of the following strings: Value
failed linestd linemax rftv rfmin
Meaning internal error or AC-3 support not compiled in standard line output with full DRC line output without DRC RF TV output mode with internally applied 11dB boost RF Mode with 11dB cut (overrides the normal 11dB boost)
112
AudioControl
AudioControl.SetAC3Downmix
void | int AudioControl.SetAC3Downmix(string ac3downmix)
Sets the set-top boxs Dolby AC-3 downmix mode. Note that Dolby stereo relates to Dolby Pro Logic decoders. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. Parameters Parameters
ac3downmix
Allowed values
stereo stereo output
mode
dolby stereo Dolby
stereo output mode (supports Dolby matrix stereo) Return Returns void if the input string is NULL or there is an internal Javascript error. Otherwise, returns 0 on success; non-zero on error (including if AC-3 support is not compiled in). AudioControl.GetAC3DownMix
string AudioControl.GetAC3Downmix()
Retrieves the set-top boxs Dolby AC-3 downmix mode. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. Parameters None. Return Returns one of the following strings: Value
failed stereo
Meaning internal error or AC-3 support not compiled in normal stereo output matrix stereo)
AudioControl.SetAC3Dualmono
void | int AudioControl.SetAC3Dualmono(string ac3dualmono)
Sets the set-top boxs Dolby AC-3 dual mono output routing. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
113
AudioControl
Parameters Parameters
ac3downmix
Allowed values
Description
stream, the first mono channel is routed to the left channel and the other to the right channel
mix each mono
channel in the 1+1 stream is routed to both stereo channels Return Returns void if the input string is NULL or there is an internal Javascript error. Otherwise, returns 0 on success; non-zero on error (including if AC-3 support is not compiled in). AudioControl.GetAC3Dualmono
string AudioControl.GetAC3Dualmono()
Retrieves information on how the two mono channels (if present) are routed to stereo in the set-top boxs audio. Supported platforms: Fresco, Opera. Escape 0.9.2-24 only. Parameters None. Return Returns one of the following strings: Value
failed ll rr stereo mix
Meaning internal error in the 1+1 stream, the first mono channel is routed to both stereo channels in the 1+1 stream, the second mono channel is routed to both stereo channels in the 1+1 stream, the first mono channel is routed to the left channel and the other to the right channel each mono channel in the 1+1 stream is routed to both stereo channels
114
AudioControl
AudioControl.SetRFAudioBoost
int AudioControl.SetRFAudioBoost(boolean add6db)
Enables or disables the optional 6dB RF audio boost. Supported platforms: Fresco, Opera (Opera support from 0.14.1 only). Parameters Parameters
add6db
Allowed values
0 or 1
Description The RF audio boost state. Set 0 to disable the boost; 1 to enable it.
Return Returns 0 on success or if RF support has not been compiled in; returns non-zero on error.
115
7 Browser
7.1 Browser class
The Browser class allows interaction with the browser to control and customise display content.
Sets the cache size. Supported platforms: Fresco. Not currently supported. Parameters Parameters
cache
Allowed values
Return
void.
Browser.GetCacheSize
long Browser.GetCacheSize()
Returns the cache size. Supported platforms: Fresco. Not currently supported. Parameters None. Return The cache size. Browser.CacheFlush
void Browser.CacheFlush()
Flushes the contents of the cache. Supported platforms: Opera. Not currently supported in Fresco. Parameters None. Return
void.
116
Browser
Browser.SetToolbarState
void Browser.SetToolbarState(int state) (Fresco/Opera) boolean Browser.SetToolbarState(boolean state) (Escape)
Changes the visibility of the toolbar (only works on browsers that have a toolbar method). Supported platforms: Fresco, Opera, Escape. Parameters Parameters
state
Description Visibility state. 0 / false hides the toolbar; 1 / true enables the toolbar.
Returns the visibility state of the toolbar (only works on browsers that have a toolbar method). Supported platforms: Fresco, Opera, Escape. Parameters None. Return Fresco/Opera: Returns 0 if toolbar is invisible or hidden; returns 1 if toolbar is visible. Escape: Returns false if toolbar is invisible or hidden; returns true if toolbar is visible. Browser.GoBack
void Browser.GoBack() (Fresco/Escape) void Browser.GoBack([int n]) (Opera)
Moves the browser back to the previous page (using the browsers bookmarks and/or history). On Opera, it is also possible to specify how many pages to move back through the history. Supported platforms: Fresco, Opera, Escape. Parameters Parameters
[n]
Allowed values
Return
void.
117
Browser
Browser.GoHome
void Browser.GoHome()
Loads the home page. Supported platforms: Opera. Parameters None. Return
void.
Browser.Go
void Browser.Go(string url)
Loads the specified URL. This can be useful as a button action on a page, because the Opera core cant hyperlink to a media source URL - so it can be caught and played via JMACX instead. Supported platforms: Opera. Parameters Parameters
url
Return
void.
Browser.Action
void Browser.Action(int action_number, [string action])
Performs the specified action in the browser. Supported platforms: Opera. Parameters Parameters Allowed values Description
action_numbe 1 - 23; 32 - 58. See separate list of action Number that maps r codes - List of action codes on page 156. to defined action. [action]
Depends on action set. See separate list of action codes for details of which require this additional parameter to be set - List of action codes on page 156.
Additional parameter required for some of the actions specified with action_number.
Return
void.
118
Browser
Browser.GogiAction
void Browser.GogiAction(int action_number)
Passes an action number to the browser. The number indicates the button pressed on an HTML alert or confirm dialogue box. Supported platforms: Gogi Opera. Parameters Parameters Allowed values or Description The action number to pass to the browser.
Return
void.
Browser.Raise
void Browser.Raise()
Raises the browser window above any active subtitle window. Useful when subtitles are active and you want to see browser graphics Supported platforms: Fresco, Opera. On Opera and on Fresco versions 0.13.0 and later: ami_wm builds only (supported on non-ami_wm builds for earlier Fresco versions). Parameters None. Return
void.
Browser.Lower
void Browser.Lower()
Lowers the browser window behind any active subtitle window. Supported platforms: Fresco, Opera. On Opera and on Fresco versions 0.13.0 and later: ami_wm builds only (supported on non-ami_wm builds for earlier Fresco versions). Parameters None. Return
void.
119
Browser
Browser.FrameLoadResetsState
void Browser.FrameLoadResetsState(int reset_state)
Controls whether the Amino browser code resets various page settings when the browser performs partial page loads (such as reloading a frame). With the reset_state set to 1, whenever the browser reloads any page element, the Amino browser code resets values such as the following: JMACX event handlers trickplay speed unloading video (if this is not disabled) mouse pointer visibility state (if not disabled) border state (if not disabled); for Opera 8 this means scrolling toolbar state (if not disabled); for Opera 8 this means loading the status display Macrovision mode for URL whether default keys are used for the URL whether channel key processing is used for the URL the page loading finished code also adds the URL to the history This can mean it takes longer to load the page element and can cause behaviour such as losing video unexpectedly. With the reset_state set to 0, these resets are not performed when elements such as frames are reloaded. For this reason, FrameLoadResetsState(0) should normally be used for middleware integration where frames are used to perform partial page loads. The setting changes an internal Opera setting, and the change is valid until the session is terminated (i.e. the set-top box is switched off or rebooted). Supported platforms: Opera. Parameters Parameters
reset_state
Allowed values
0 or 1
Description Set whether frame loads are treated as page loads. Set 0 for the Amino code not to reset page values when a frame loads. Set 1 for the Amino code to treat frame loads as new page loads (this is the default state).
Return
void.
120
Browser
Browser.ShowOldContentPeriod
void Browser.ShowOldContentPeriod(int period)
Configures browser behaviour when moving between pages. Supported platforms: Escape. Parameters Parameters
period
Description
Return
void.
121
8 AminoGeneric
8.1 AminoGeneric class
Note: The AminoGeneric API is only for use by partner companies of Amino who are developing software to run on an AmiNET set-top box, using one of our Software Development Kits. The AminoGeneric class enables messages to be passed between Javascript and third party software daemons running on the set-top box. Asynchronous events can also be passed back by the daemon to a suitable Javascript event handler. All messages take the form of strings; you are advised to use XML-style strings for clarity. Partner companies using this API will be assigned a unique service ID for use with it.
Enables a Javascript event handler to be associated with AminoGeneric events; needs to be set with a string that contains the call to the Javascript function to use. service_ID is a service identifier integer in the range 1 - 30 Unless Amino has given you a specific service ID, use the test ID value of 2. Note: Use AminoGeneric.Register for similar functionality in AmiScript. Supported platforms: Fresco, Opera. Escape 0.9.2-20 only. Usage example - Fresco:
// The event handler itself function eventhandler(xml_event_string) { alert (Message sent to eventhandler + xml_event_string) ; } // Register the event handler for unique service identifier ID of 2 AminoGeneric.onEvent2=eventhandler ;
122
AminoGeneric
Sends the xmldata string to a third-party daemon, and blocks further operations until the daemon returns a response. Supported platforms: Fresco, Opera, Amiscript. Escape 0.9.2-20 only. Parameters Parameters
service_ID
Allowed values
1 - 30
Description Service identifier. Unless Amino has given you a specific service ID, use the test ID value of 2. XML data string to send to the daemon.
xmldata
Return Returns void if the specified daemon is not present on the set-top box (i.e. it is undefined). Otherwise, returns a NULL-terminated string containing the response (note that for the Escape API, this is a non-NULL-terminated unicode string). Usage example:
// Make a call to a non existent daemon s = AminoGeneric.Call(2, <XML><MSG>Hello</MSG></XML>) ; if ( typeof s == undefined ) alert(No such device); else alert(s) ;
AminoGeneric.Register
int AminoGeneric.Register(int service_ID, string callback)
Register a Javascript event handler (there are no onEvents in Amiscript, as there is no browser). Supported platforms: Amiscript. Parameters Parameters
service_ID
Allowed values
1 - 30
Description Service identifier. Unless Amino has given you a specific service ID, use the test ID value of 2. String representing Javascript event handler function to call.
callback
string
123
AminoGeneric
Usage example:
// The event handler itself function eventhandler(xml_event_string) { alert (Message sent to eventhandler + xml_event_string) ; } // Registering function eventhandler for AminoGeneric ID 2 (without checking error conditions) AminoGeneric.Register(2, eventhandler) ;
124
9 SmartCard
9.1 SmartCard class
The SmartCard class provides control over the smartcard device. The SmartCard API is intended for development use only, and has not been implemented for build versions 0.9.2 or later.
Checks whether the smartcard is in the set-top box. Supported platforms: Fresco, Opera. Not supported since 0.9.2. Parameters None. Return Returns 1 if smartcard is present; otherwise, returns 0. SmartCard.IsLoggedOn
void SmartCard.IsLoggedOn(int service_ID) (Fresco) void | int SmartCard.IsLoggedOn(int service_ID) (Opera)
Indicates whether the user has correctly logged in for the specified service ID. Supported platforms: Fresco, Opera. Not supported since 0.9.2. Parameters Parameters
service_ID
Return Fresco: Returns void. Opera: Returns void if parsing the input argument fails; otherwise, returns 0 (false).
125
SmartCard
SmartCard.Logon
void | long SmartCard.Logon(int service_ID) (Fresco) void | int SmartCard.Logon(int service_ID) (Opera)
Triggers the log-in process for the specified service ID. The set-top box initiates dialogue such as prompting for a 4-digit PIN code and checking it against a value on the smartcard. The following events are generated on the smartcard on insertion and removal:
SMC_INSERTED SMC_REMOVED
Use of the events prevents the application having to repeatedly poll for the presence of the card. Supported platforms: Fresco, Opera. Not supported since 0.9.2. Parameters Parameters
service_ID
Return For both Fresco and Opera: Returns void if the input argument fails. Returns 0 if log-in is not successful; returns 1 if log-in is successful. SmartCard.GetATR
string SmartCard.GetATR()
Retrieves the ATR (Answer-to-Reset) string from the smartcard. Supported platforms: Fresco, Opera, Escape. Not supported since 0.9.2. Parameters None. Return Returns the string derived from the smartcard ATR command. For Fresco and Opera, this is a NULL-terminated string; for Escape, this is a UTF string (which is not NULLterminated).
126
10TVI
10.1TVI class
The TVI class enables control of a television, via the TVI port on hospitality versions of AmiNET set-top boxes (e.g. 110H). This class replaces the deprecated SmartPort class.
Enables a Javascript event handler to be associated with a TVI event TVI.onEvent is set with a string that contains the Javascript event handler function call. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Usage example (Fresco):
TVI.onEvent = catchPacket(); ; function catchPacket ( b0, b1, b2 ) { // do stuff }
10.3Return codes
The following table lists the codes returned by many of the TVI functions: Value
0 1 2 3 4 8
127
TVI
10.4TVI functions
TVI.SetTvType
void | long TVI.SetTvType(int type)
Sets the protocol used by the PIC. The PIC translates commands from the internal serial port to the protocol required for the particular television type. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
type
Allowed values
0 Philips 1 Zenith 2 LG 3 Mate (Sony/Panasonic)
Return Returns void if TVI is not compiled or there is an error parsing the parameter entered. Otherwise, returns 0 for success. TVI.DetectTV
void | long TVI.DetectTV()
Detects whether a television is connected to the TVI port. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). TVI.GetIsTvOn
int TVI.GetIsTvOn()
Queries the television to find out its current state. Supported platforms: Fresco (from 0.14.0 only), Opera. Parameters None. Return Returns 0 if the television is switched off; 1 if its switched on. TVI.TVOn
void | long TVI.TVOn()
128
TVI
Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). TVI.TVOff
void | long TVI.TVOff()
Switches the television off via the TVI port. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). TVI.SetVolume
void | long TVI.SetVolume(int volume)
Sets the television volume level via the TVI port. Note that if the volume you set is less than the minimum volume, then the volume is set to the same as the minimum volume; if the volume you set is greater than the maximum volume, then the volume is set to the same as the maximum volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
volume
Allowed values
0 - 63
Description The volume to set. This must be a value in the range specified by the minimum and maximum volume settings, or 0 - 63 if these values have not been set.
Return Returns void if TVI is not compiled or there is an error parsing the parameter entered. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). TVI.GetVolume
void | long TVI.GetVolume()
Retrieves the current television volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None.
129
TVI
Return Returns void if TVI functionality his not compiled. Otherwise, returns the current volume (this is a value in the range 0 - 63). TVI.SetMinVolume
void TVI.SetMinVolume(int volume)
Sets the minimum volume level for the television, via the TVI port. Note that if the value you set is greater than the maximum volume, the minimum volume is set to be the same as the maximum volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
volume
Allowed values
0 - 63
Description The minimum volume. Note that this should be less than the maximum volume.
Retrieves the minimum television volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI support is not compiled. Otherwise, returns the current volume (this is a value in the range 0 - 63). TVI.SetMaxVolume
void TVI.SetMaxVolume(int volume)
Sets the maximum volume level for the television, via the TVI port. Note that if the value you set is less than the minimum volume, the maximum volume is set to be the same as the minimum volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
volume
Allowed values
0 - 63
Description The maximum volume. Note that this should be greater than the minimum volume.
130
TVI
TVI.GetMaxVolume
void | long TVI.GetMaxVolume()
Retrieves the maximum television volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns the current volume (this is a value in the range 0 - 63). TVI.SetStartupVolume
void TVI.SetStartupVolume(int volume)
Sets the default volume level for the television, via the TVI port. This defines the volume when the television is switched on. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
volume
Allowed values
0 - 63
Retrieves the default television volume (this is the volume used when the television is switched on). Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns the default volume (this is a value in the range 0 - 63). TVI.VolumeUp
void | long TVI.VolumeUp()
Increments the television volume by 1, up to the maximum volume set. An error is returned if you try to increment beyond the maximum volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None.
131
TVI
Return Returns void if TVI is not compiled. Otherwise, returns one of the standard return codes (see Return codes on page 127). TVI.VolumeDown
void | long TVI.VolumeDown()
Decrements the television volume by 1, down to the minimum volume set. An error is returned if you try to decrement beyond the minimum volume. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns one of the standard return codes (see Return codes on page 127). TVI.SetMute
void | long TVI.SetMute(int set)
Sets the television volume mute state on or off via the TVI port. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
set
Allowed values
0 or 1
Return Returns void if TVI is not compiled or there is an error parsing the parameter entered. Otherwise, returns one of the standard return codes (see Return codes on page 127). TVI.GetMute
void | long TVI.GetMute()
Retrieves the current mute state. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns 0 if the current state is non-mute; 1 if the current state is set to mute. TVI.SetInput
void | long TVI.SetInput(int mode)
Sets the television input mode. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only.
132
TVI
Parameters Parameters
mode
Allowed values
0 TVINPUT_TV 1 TVINPUT_INFO 2 TVINPUT_PAYTV 3 TVINPUT_RADIO 4 TVINPUT_DIGITAL 16 TVINPUT_AV1 17 TVINPUT_AV2 32 TVINPUT_SVIDEO1 33 TVINPUT_SVIDEO2 48 TVINPUT_
Description The input mode to set. Note that actual values available from this list depend on the television type.
COMPONENT1
49 TVINPUT_
COMPONENT2 Return Returns void if TVI is not compiled. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). Note that if the mode entered is not recognised, the return value is TVI.SetChannel
void | long TVI.SetChannel(int channel, [int mode]) (Fresco) long TVI.SetChannel(int channel, [int mode]) (Opera)
Sets the television channel, via the TVI port. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
channel [mode] 0 or 1
Allowed values
Description The channel to set. The mode that the channel is received in. Set 0 for Broadcast mode; 1 for Cable mode. If you dont include this parameter, the default value 0 is used.
Return Fresco: Returns void if TVI is not compiled or there is an error parsing the parameter entered. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). Opera: Returns 0.
133
TVI
TVI.SetOSD
void | long TVI.SetOSD(int state)
Sets or disables the televisions on-screen display. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
state
Allowed values
0 or 1
Return Returns void if TVI is not compiled. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). TVI.SetKeyLock
void | long TVI.SetKeyLock(int lockmode)
Sets the key lock on the television to be on or off. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
lockmode
Allowed values
0 or 1
Description Key lock mode to set. Set 0 to switch the key lock off; 1 to switch the key lock on.
Return Returns void if TVI is not compiled. Otherwise, returns one of the standard TVI return codes (see Return codes on page 127). TVI.SelectTeletext
void | long TVI.SelectTeletext(int mode, [int page])
Controls the televisions teletext decoder via the TVI port. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
mode
Allowed values
0 off 1 mix 2 on
[page]
0 - 899
The teletext page to display. If you dont include this parameter, the default value 0 is used.
Return Returns void if TVI is not compiled or one of the parameters cant be parsed. Otherwise, returns 0.
134
TVI
TVI.SetupClosedCaption
void | long TVI.SetupClosedCaption(int mode)
Controls the televisions closed caption decoder, via the TVI port. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Not supported for Zenith PIC type. Parameters Parameters
mode
Allowed values
0 off 1 Caption channel 1 field 1 2 Caption channel 2 field 2 9 Caption channel 1 activated when television set to mute
Return Returns void if TVI is not compiled or the parameter cant be parsed. Otherwise, returns 0. TVI.DisplayNumber
void | long TVI.DisplayNumber(int number, int control)
Controls the way the television displays a partial or full channel number, as if the user were entering digits on the remote control. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Philips protocol only. Hospitality platforms only. Parameters Parameters
number control
Allowed values
0- 999 32 Display channel
number
64 Display CHANNEL
NOT AVAILABLE
128 Display channel
number followed by a dash (-) Return Returns void if TVI is not compiled or the parameter cant be parsed. Otherwise, returns 0.
135
TVI
TVI.RemoteFormatIn
void | long TVI.RemoteFormatIn(int system, int keycode)
Sends a command that the television interprets as if it was generated by pressing a key on the remote control. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Philips protocol only. Hospitality platforms only. Parameters Parameters
system keycode
Allowed values
Description RC5 system value. Typical values are 0 or 7. RC5 keycode number.
Return Returns void if TVI is not compiled or the parameter cant be parsed. Otherwise, returns 0. Usage examples:
//Emulates the Vol+ key TVI.RemoteFormatIn(0,16); // Emulates the Vol- key TVI.RemoteFormatIn(0,17); // Emulates the 3 key TVI.RemoteFormatIn(0,3);
TVI.Configure
void | long TVI.Configure(int byte1, int byte2)
Sends configuration data to the PIC. The data that can be sent depends on the PIC type. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Philips protocol only. Hospitality platforms only. Parameters Parameters
byte 1 byte 2
Return Returns void if TVI is not compiled or the parameter cant be parsed. Otherwise, returns 0.
136
TVI
TVI.DisplayText
void | long TVI.DisplayText()
Outputs a Hello world string to the television as a test of communication with the TVI port. Note: Implemented for test purposes only. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled. Otherwise, returns a numerical value. TVI.SystemInfo
void | object TVI.SystemInfo() Fresco int TVI.SystemInfo()Opera
Retrieves TVI port system and implementation information. On Opera, all that is retrieved is a return code indicating success or error; on success, the information values can then be retrieved using the TVI.GetVersion and TVI.GetFeatures functions. Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters None. Return Fresco: Returns void if TVI is not compiled. Otherwise, returns an object with the following attributes: Attribute
Result
Type long
Description One of the standard TVI return codes (see Return codes on page 127). This is the minimum attribute returned in the object; the remaining attributes are only included if the Result value is 0 (i.e. the system information is retrieved successfully). The current version of the TVI PIC. Hexadecimal value indicating the features that are active. The meaning of the value returned depends on the PIC type.
Version Features
long long
137
TVI
Opera: Returns 0; otherwise returns one of the standard return codes (see Return codes on page 127) To access the version and feature values, use the TVI.GetVersion and TVI.GetFeatures functions. TVI.GetVersion
long TVI.GetVersion()
Retrieves the version number of the TVI PIC. TVI.GetVersion can only be called after a successful call to TVI.SystemInfo. Supported platforms: Opera. Hospitality platforms only. Parameters None. Return Returns the version number. TVI.GetFeatures
long TVI.GetFeatures()
Retrieves the PIC features that are active for the TVI port. TVI.GetFeatures can only be called after a successful call to TVI.SystemInfo. Supported platforms: Opera. Hospitality platforms only. Parameters None. Return Returns a hexadecimal value indicating the features that are active. The meaning of the value returned depends on the PIC type. TVI.LoopbackTest
void | long TVI.LoopbackTest()
Performs a loopback test to test commands sent to the TVI port without needing a television to be connected to the port. Note: Implemented for test purposes only. Supported platforms: Fresco. Hospitality platforms only. Parameters None. Return Returns void if TVI is not compiled; otherwise, returns one of the standard TVI return codes (see Return codes on page 127).
138
TVI
TVI.ProcessUnhandledKey
void | int TVI.ProcessUnhandledKey(int byte1, int byte2, int byte3) Opera void TVI.ProcessUnhandledKey(int byte1, int byte2, int byte3) (Escape)
Returns key codes sent from a callback that are not handled by the defined system default Javascript key handler on the current page. Supported platforms: Opera. Escape 0.9.4-26 only. Hospitality platforms only. Parameters Parameters
byte1 byte2 byte3
Allowed values
0 - 255 0 - 255 0 - 255
Description Byte value returned from event handler. Byte value returned from event handler. Byte value returned from event handler.
Return Opera: Returns 0 if the full call process is completed. Escape: Returns void. Usage example (example handler for hospitality televisions (Philips)):
TVI.onEvent = catchPacket();; function catchPacket() { b0 = TVI.byte0 ; b1 = TVI.byte1 ; b2 = TVI.byte2 ;
function catchPacket( b0, b1, b2 ) { switch ( b0 ) { case 3:/* digit entered */ digit = ( b1 & 0x0F ) ; TVI.RemoteFormatIn ( 0, digit ) ; return 0 ; break ;
139
TVI
if ( b1 & 0x01 ) { TVI.RemoteFormatIn ( 0, 17 ) ; return 0 ; } break ; } return -1 ;// key not handled here use the default handler } /* vol- */
TVI.CustomCommand
void | int TVI.CustomCommand(string data)
Sends television-specific codes into the TVI PIC for transmission to the television. For example, to set a television mode that cant be set by a generic call. Supported platforms: Opera. Hospitality platforms only. Parameters Parameters
data
Allowed values
0 - 255 or 0x00 - 0xff
Description The code to pass into the television. The allowed codes depend on the PIC type. Enter a string formed from sequence of bytes separated by delimiters (such as a comma or a colon) with no spaces. The bytes can be represented in decimal or hexadecimal formats.
Return Returns void if TVI isnt compiled or the parameter cant be parsed. Otherwise, returns 0. Usage examples:
rc = TVI.CustomCommand(0x01,0x05,0x10,0x2b) ; rc = TVI.CustomCommand(1,5,16,43) ;
140
11PVR
11.1 PVR class
The PVR class provides for interaction with personal video recorder, including the recorded assets available. This is supported on Fresco only, when installed on set-top box that includes a hard disk (i.e. AmiNET500). Note: JMACX PVR system only supports recording a single asset at one time. Attempting to record multiple assets simultaneously will result in failure.
Retrieves an object that contains the global system information for the programmable video recorder. Supported platforms: Fresco. Hard disk models only. Parameters None. Return Returns void if this JMACX call is not supported on this platform or theres an error. Otherwise, returns an object with the following attributes: Attribute
Version DiscSize FreeSize
Description Version number of the personal video recorder, in the format <nn>.<nn>. Total disk size of the personal video recorder (in kilobytes). The amount of free space available on the disk (in kilobytes). The maximum number of assets available to the personal video recorder at any one time. Current status; one of the following values:
Idle Recording Playing Unknown
string
PVR.Record
void | int PVR.Record (string URL, string Name)
141
PVR
Allowed values
Description
String URL of stream to record. This should starting with have the following format:
src= src=igmp://<IPaddr ess>:<port>
Name
Any string
Return Returns void if an abnormal error condition occurs. Otherwise returns 0 if successful or non-zero if there is an error. PVR.ListAssets
void | object PVR.ListAssets()
Retrieves an object that contains the total number of assets and an array of embedded objects with the details of each asset. Supported platforms: Fresco. Hard disk models only. Parameters None. Return Returns void if this JMACX call is not supported on this platform. Otherwise, returns an object with the following attributes: Attribute
Assets
Type long
Description Total number of assets. Array of asset objects (this array is only returned if the total number of assets is greater than zero). Each object has Name and URL attributes, as follows: Asset name (for each asset returned in array) URL for asset playback (for each asset returned in array).
Name URL
string string
Note: In the table above, x refers to the array index between 1 and Assets. There is no array if the number of assets is zero (i.e. there are no assets recorded onto the hard disk). Example of use:
var assets = PVR.ListAssets(); for(i = 1; i < assets.Assets; i++) { alert(Name = + assets[i].Name); }
142
PVR
PVR.GetAssetInfo
void | object PVR.GetAssetInfo(string name)
Retrieves the specified asset. Supported platforms: Fresco. Hard disk models only. Parameters Parameters
name
Description The name of the asset (this is the name it was tagged with during recording).
Return Returns void if this JMACX call is not supported on this platform. Otherwise, returns an object with the following attributes: Attribute
Size
Description Size of asset. Total size of the asset (in kilobytes). Duration of the asset (in seconds). URL for asset playback (for each asset returned in array).
PVR.DeleteAsset
void | int PVR.DeleteAsset(string name)
Deletes the specified asset. Supported platforms: Fresco. Hard disk models only. Parameters Parameters
name
Description The name of the asset (this is the name it was tagged with during recording).
Return Returns void if this JMACX call is not supported on this platform. Otherwise, returns 0 for success or non-zero value for an error.
PVR.RenameAsset
void | int PVR.RenameAsset(string name, string new_name)
Renames the specified asset with a new name. After renaming, all operations on the asset must use the new name. Supported platforms: Fresco. Hard disk models only.
143
PVR
Parameters Parameters
name
Description The original name of the asset (this is the name it was tagged with during recording). New name for the asset.
new_name
any string
Return Returns void if this JMACX call is not supported on this platform or the operation encounters an abnormal error. Otherwise, returns 0 for success or non-zero value for an error. PVR.StopRecording
void | int PVR.StopRecording()
Stops recording the current asset. Supported platforms: Fresco. Hard disk models only. Parameters None. Return Returns void if this JMACX call is not supported on this platform. Otherwise, returns 0 for success; 1 on error.
144
145
HTML extensions
RETAIN_NOBORDER=yes/no NOHISTORY NOBACK AUDIORATE BGALPHA FGALPHA LCDTEXT AUDIOPID=string VIDEOPID=string PCRPID=string FADETIME=string FADEOUTTIME=int BUTTON=string MODE=string URL=string RESET=void >
Attributes
Attribute
SRC TCR
Equivalent function
AVMedia.Play
Specifies an RGB colour value to be programmed into the VideoDisplay.Se transparency colour register. All pixels of that colour on tChromaKey the HTML page will be transparent and so the image on the video plane can be seen. This is useful for overlaying a formatted HTML page on top of streaming video. Upon changing page the TCR colour is set to the default TCR value. Valid for the page. video. Valid for page.
event handler set by AVMedia.OnEvent
UNLOADVID Sets whether video is stopped on page unload. Valid for event handler set by EO page. AVMedia.OnEvent BROWSERTO If this attribute is present, it enables the use of TV/WWW GGLE button to hide/show the browser. This is useful if overlay
text is initially displayed over video content as it allows the user to hide the text if they wish. Valid for page.
HIDEBROWS The presence of this attribute causes the entire browser ER to be hidden from view. This is useful if a full screen
streaming video picture is being displayed. The TV/WWW key may be used to restore the browser and toggle between the two states. Valid for page.
HIDEPOINT The presence of this attribute will cause the mouse ER pointer to be hidden on this Web page. Valid for page.
146
HTML extensions
Attribute
Description
Equivalent function
RETAIN_NO Requests that the browser does not automatically return ASTB.SetMouseSt MOUSE the mouse pointer on a page change. The tag remains in ate effect until RETAIN_NOMOUSE=no is encountered. Valid
TOOLS key may be used to toggle the toolbar state. The barState toolbar will re-appear when the browser is navigated to another page, unless RETAIN_NOTOOLBAR is also specified. Valid for page.
RETAIN_NO Requests that the browser does not automatically restore Browser.SetTool TOOLBAR the toolbar on a page change. The tag remains in effect barState until RETAIN_NOTOOLBAR=no is encountered. Valid until
next set.
TRICKPLAY Sets the scale factor to use when fast-forwarding or SPEED rewinding a streaming on the current page. MVMODE AVMedia.SetSpee d
Enables MacroVision copy protection. The parameter for VideoDisplay. this attribute is the Macrovision Mode Byte. Valid for page.
VIDEOSERV Specifies the type of RTSP server being used as the AVMedia.SetDefa ERTYPE ultServer streaming video source for content on this page. Valid string values are oracle mediabase and ncube. Valid for
page.
VSCROLLPO S
VSCROLLWI Sets the width of the scroll region. Valid for page. DTH VSCROLLRA Sets the number of pixels to scroll the region vertically by, TE each time. If these attributes are set for a page, then when
the user hits ALT-S, the browser will be placed into a 'preview mode' and will continuously scroll a vertical strip of the screen as defined by the above parameters. Pressing ALT-S again will stop the scroll and fade out the graphics. Valid for page.
HSCROLLPO S
HSCROLLWI Sets the height of the scroll region. Valid for page. DTH HSCROLLRA Sets the number of pixels to scroll the region horizontally TE by, each time. If these attributes are set for a page, then
when the user hits ALT-S, the browser will be placed into a 'preview mode' and will continuously scroll a horizontal strip of the screen as defined by the above parameters. Pressing ALT-S again will stop the scroll and fade out the graphics. Valid for page.
NODEFAULT By default the browser has functions defined for certain KEYS keys, this options allows for these keys to be disabled. ASTB.DefaultKey s
This is useful if a different key mapping is required or if the additional functions are required upon key presses. Valid until DEFAULTKEYS tag encountered.
147
HTML extensions
Attribute
Description
Equivalent function
ASTB.DefaultKey s
DEFAULTKE Re-enables the default key handling after it has been YS disabled. Valid until NODEFAULTKEYS tag encountered.
WITH_CHAN Enables the numeric keys to choose channels. Valid until ASTB.WithChanne NELS ls next set. RETAIN_AL When value equals yes, requests that the browser retains VideoDisplay.Se PHA the alpha level from one page to the next. This stops the tAlphaLevel
browser from automatically reverting to 100% when a new page is loaded. The tag remains in effect untilRETAIN_ALPHA=no is encountered. Valid until next set.
NOBORDER
If the browser is configured to have a border, the presence of this attribute will hide the borders whilst this page is being displayed. Valid for page unless RETAIN_NOBORDER is also set.
RETAIN_NO Requests that the browser does not automatically return BORDER the border on a page change. The tag remains in effect until RETAIN_NOBORDER=no is encountered. Valid until
next set.
NOHISTORY Requests that the browser does not store this web page ASTB.DeleteAllH istory in the history file. NOBACK
Requests that the browser does not allow the ability to return to this web page using the back and/or forward buttons. When used with NOHISTORY means that once this page has been served, it is impossible to return to that page using either history or back/forward buttons.
AUDIORATE BGALPHA FGALPHA LCDTEXT AUDIOPID VIDEOPID PCRPID FADETIME FADEOUTTI ME BUTTON MODE URL RESET AVMedia.SetFade outTime AVMedia.SetAudi oPID AVMedia.SetVide oPID AVMedia.GetPmtP rogramInfo
148
HTML extensions
Attributes
Attribute
HEIGHT SRC WIDTH
Description The width of the picture-in-graphics (PiG), in pixels. The URL for a streaming video source. The width of the picture-in-graphics (PiG), in pixels.
149
vidoe-on-demand RTSP server in this case, and the port that the server listens on for connections is 554. The other information included is a path to the media source and additional attributes. IGMP URLs for an IGMP stream can be as follows:
igmp://239.255.250.2:11111 igmp://239.255.250.2:11111;audiopid=17;pcrpid=16;videopid=17 igmp indicates that this is an IGMP stream. The stream has an associated IP address 239.255.250.2 in the examples above - and the URL also includes the port number for the multicast stream - 11111 in the examples. The URL can also include additional
150
Streaming MP3s URLs for a streaming MP3 have the following format:
mp3://server.domain.com:8000/music mp3 indicates that this is a n MP3 URL. server.domain.com is the hostname of the server streaming the MP3s, and 8000 is the port that it listens on for connections. Lastly, the pathname of the streaming source is required - music in the example above.
MP3s from a web service URLs for an MP3 residing on a web server have the following format:
mp3://server.domain.com/music/song.mp3 mp3 indicates that this is an MP3 URL. server.domain.com is the hostname of the web server. music/song.mp3 is the path and filename of the MP3 file. Note that the example here assumes the default HTTP port (80). If another port is to be used, it can be included in the URL. For example, to use port 8080, the URL would be as follows: mp3://server.domain.com:8080/music/song.mp3
MP3s from a Mediabase URLs for an MP3 residing on Mediabase server have the following format:
rtsp://server.domain.com:554/assetname;servertype=Mediabase;t ype=MP3 rtsp indicates that this is an RTSP URL. server.domain.com is the hostname of the
video-on-demand RTSP server, and the server listens for connections on port
554.assetname is the path to the the MP3 and the remaining values are attributes that
151
asset.
username username to log onto servers that require a username before they
stream video.
password password to log onto servers that require a password before they
stream video.
transport used for streams that use a different transport method, for example tcp. This is build and hardware dependent. avsyncwait - Used to control how a channel change operates. If this value is set to yes then the video will only start playing when the stream has properly synced. However there will be a time delay. When set to no the channel change
will be immediate but there is no guarantee that the video will be properly synced when it starts playing. It will then sync at the earliest opportunity.
speed for PVR builds that can be used to specify what speed the content should be played at. The argument needs to be of a float type, e.g. 1.0. iframes indicates if a stream has iframes or not. Valid options are yes and no. rtpskip when set using yes the demux will skip over (i.e ignore) an RTP
header between the UDP and Transport stream data. Normally the RTP header is not present, but some encoders add it to the packets, we do not need to process it but do need to skip over it if it is present. The option is needed as the presence or absence of RTP headers cannot be reliable determined from just looking at the packets.
useragent takes in a string value that is used to force the user agent string
to a specific value instead of using the default string held in the browser.
152
Code
300 302 303 304 305 306 307 308 309 310 312 313 314 316 317 318 319 320 321 322 323
Internal code
0X4000012C Channel up 0X4000012E Channel down 0X4000012F Volume up 0X40000130 Volume down 0X40000131 Mute 0X40000132 TV power 0X40000133 Video play 0X40000134 Video forward 0X40000135 Video stop 0X40000136 Video reverse 0X40000138 Video pause 0X40000139 Video/play pause (Sejin / old Amino
remote control)
0X4000013A Refresh 0X4000013B Page forward 0X4000013D Help (Sejin remote control) 0X4000013E Record 0X4000013F Page back 0X40000140 Red 0X40000141 Green 0X40000142 Yellow 0X40000143 Blue
153
Code
324 325 326 327 328 330 331 332 333 334 341 358 359 360 361 362 363 364 365 366
Internal code
0X40000144 STB (old Amino remote control) 0X40000145 Browser home 0X40000146 History (Sejin remote control) 0X40000147 Bookmarks (Sejin remote control) 0X40000148 Stop (Sejin remote control) 0X4000014A Tools (Sejin / old Amino remote
control)
0X4000014B Top left (old Amino remote control) 0X4000014C Top right (old Amino remote control) 0X4000014D Page up 0X4000014E Page down 0X40000155 OK 0X40000166 Movies 0X40000167 Music 0X40000168 Media 0X40000169 Record it 0X4000016A Promotions 0X4000016B Phone 0X4000016C Input 0X4000016D Hospitality 1 0X4000016E Hospitality 2
Remote control key codes in Teletext mode (Opera only) The following table lists the key codes for the remote control keys when Teletext mode is selected. Note that the value that you need to enter here is the same as the code used internally.
Code
0X4200012C Channel up 0X4200012E Channel down 0X4200012F Volume up 0X42000130 Volume down 0X42000131 Mute 0X42000132 TV power 0X42000133 Video play 0X42000134 Video forward 0X42000135 Video stop 0X42000136 Video reverse 0X42000138 Video pause 0X42000139 Video play/pause (Sejin / old Amino remote control)
154
Code
0X4200013A Reload 0X4200013B Page forward 0X4200013D Help (Sejin remote control) 0X4200013E Record 0X4200013F Page back 0X42000140 Red. 0X42000141 Green 0X42000142 Yellow 0X42000143 Blue 0X42000144 STB (old Amino remote control) 0X42000145 Browser home 0X42000146 History (Sejin remote control) 0X42000147 Bookmarks (Sejin remote control) 0X42000148 Stop (Sejin remote control) 0X4200014A Tools (Sejin / old Amino remote control) 0X4200014B Top left (old Amino remote control) 0X4200014C Top right (old Amino remote control) 0X4200014D Page up 0X4200014E Page down 0X42000155 OK 0X42000166 Movies 0X42000167 Music 0X42000168 Media 0X42000169 Record it 0X4200016A Promotions 0X4200016B Phone 0X4200016C Input 0X4200016D Hospitality 1 0X4200016E Hospitality 2
155
Build
Code
Additional parameter?
Browser GoTo. Go to previous page. Go to next page. Browser stop function. Browser reload page. Display browser Management pages. Display bookmarks page. Add bookmark. Open delete bookmarks page. Display browser history page. Delete browser history. Hide toolbar. Toggle between full screen and PiG browser display.
FE_ACTION_BROWSER_SCROLL_GFX
Browser scroll. GFX Open User Preferences Configuration page. Display browser help page. Channel up. Channel down. Channel select. Go to URL. If setting this action, you also URL need to set the URL to go to. Browser scroll up function. Browser scroll down function. Play video. Stop video. Pause video. Fast-forward video (default speed). Rewind video (default speed). Fast forward video (2x default speed).
156
Build
Code
38 39 40 41 42 43 45 46
Meaning Fast rewind video (2x default speed). Toggle play/pause video. Toggle mute. Increase volume. Decrease volume. Standby. Closed caption toggle on/off. Fresco: FE_ACTION_IME_MAIN_MENU Opera: Teletext: change mode.
Additional parameter?
If you dont specify a mode, key presses cycle through the modes in turn.
47
Fresco: FE_ACTION_IME_FIXED_PHRASE Opera: Teletext: display index page. Fresco: Browser: exit. Opera: Teletext: display next page. Teletext: display previous page. Teletext: display the specified page. If setting this action, you will also need to set the page number to go to. Teletext: red key function. Teletext: green key function. Teletext: yellow key function. Teletext: cyan (blue) key function. Teletext: toggle Hold function. Teletext: toggle Reveal function. Teletext: toggle Zoom function. Teletext: input digit. Digit to input Page number
48
Opera 49 only
50
51 52 53 54 55 56 57 58
157
D.1 AmiNET103
Part no.
Output format configuration options Composite Composite + RGB S-video Composite + S-video
Composite + S-video
10 pin Mini DIN to Composite Composite (3RCA) 10 pin Mini DIN to Component (5RCA) 10 pin Mini DIN to 6RCA Component video and Composite Note that Sync is on Yellow (Sync on Green is not supported). Composite + Component Composite Composite + RGB Composite + Component Composite + S-video S-video S-video
obsolete
158
D.3 AmiNET120
With the AmiNET120, you dont need to select output format in configuration - it is selected automatically. The following table shows the output format possibilities.
Cables 10 pin Mini DIN to S-video and Composite 10 pin mini DIN to Component (5RCA)
D.4 AmiNET124
Note that Component video output is not supported on older AmiNET124 hardware (US board revision number 17; EU board revision number 02).
Output format configuration options Composite Composite + RGB Composite + S-video Composite + Component
Composite + S-video
10 pin Mini DIN to Composite Composite (3RCA) 10 pin Mini DIN to Component (5RCA) 10 pin Mini DIN to 6RCA Component video and Composite Composite + Component Composite Composite + RGB Composite + Component Composite + S-video
D.5 AmiNET125
Output format configuration options Composite Composite + RGB Composite + S-video Composite + Component
159
10 pin Mini DIN to Composite Composite (3RCA) 10 pin Mini DIN to Component (5RCA) 10 pin Mini DIN to 6RCA Component video and Composite Composite + Component Composite Composite + RGB Composite + Component Composite + S-video
Output format configuration options Composite Composite + RGB Composite + S-video Composite + Component
Composite + S-video
10 pin Mini DIN to Composite Composite (3RCA) 10 pin Mini DIN to 6RCA Component video and Composite Composite Composite + RGB Composite + Component Composite + S-video
510-885
HDMI
Composite + Component
D.7 AmiNET500
Any combination of the following cables:
160
Configuration options (output format) Depends on cables used. E.g. if S-video and Composite cables are connected, you can set Composite + S-video or just S-video or just Composite; if all three cables are connected, you can set Composite + Component + S-video - or any combination of the formats.
161
<body text="#ffffff" bgcolor="#00ff00" onload="getdata();"> <form name="simple"> <table border="0" width="100%"> <tr> <td width="5%">Info:</td> <td width="95%"><input type="text" name="information" size="70" value=" "></td> </tr> </table> </form>
<script language="javascript"> var hb = null ; var videostatus = 0 ; var eventString = "some textual data" ; var continuous = 1 ;
Browser.SetToolbarState(0) ;
AVMedia.Play("src=rtsp://mbase04.aminocom.com/LOTR;servertype =MediaBase") ;
162
Example code
function getdata() { document.simple.information.value = ("My MAC address is "+ASTB.GetMacAddress()+" and version is "+ASTB.GetSoftwareVersion() ); }
case 6: break;
163
Example code
case 7: if (eventString.search("2104")) { break; } else { alert("RTSP status ANNOUNCE (7) "+eventString); break; }
case 8: if (continuous) { document.simple.information.value = ("RTSP status END OF STREAM "+eventString + "restarting..") ; PlayLoop(); } else { alert("RTSP status END OF STREAM "+eventString); } break;
164
Example code
165
Example code
<html>
ASTB.WithChannels(true) ;
ASTB.SetKeyFunction(309, 21, "http://www.bbc.co.uk") ; ASTB.SetKeyFunction(307, 21, "igmp://239.255.250.2:11111" ) ; //309 is the code for the the video stop button //307 is the code for the video play button //21 is the code for the set browser URL action ASTB.SaveKeyFunctions();
</script> </head>
<body> <H1>JMACX Default Button Remapper page</H1> <h3>This page remaps the channel buttons (if ASTB.WithChannels(1)) and changes default play and stop keys to jump to a certain pages. </H3>
</body> </html>
166
Example code
{ case 48: // Key 0 ASTB.SaveKeyFunctions(); window.alert("Saved key definitions\n"); rtn = false; break;
case 49: // Key 1 ASTB.SetKeyFunction(320, 21, "http://www.google.co.uk"); window.alert("Set red to url\n"); rtn = false; break;
case 50: // Key 2 ASTB.SetKeyFunction(323, 1); window.alert("Set blue to home\n"); rtn = false; break;
case 51: // Key 3 ASTB.SetKeyFunction(322, 21, "http://news.bbc.co.uk/"); window.alert("Set yellow to url\n"); rtn = false; break;
167
Example code
</script>
</head> <body> <p> This page tests the save keys feature. It uses a javascript keyhandler to trap keys 0, 1, 2 & 3 which perform the noted actions.
<p> Press 0: This will commit the changes and permanently set the new key functions. <b>Only press 0 if you are sure you want to save these changes.</b> </body> </html>
168
Example code
<body> <h1>JMACX PVR Test Page</h1> <hr> <h2>System Information</h2> <script language="JavaScript">
169
Example code
document.write('<pre>'); document.write('Version document.write('FreeSize document.write('DiscSize document.write('State document.write('</pre>'); : ' + item.Version + '<br>'); : ' + item.FreeSize + ' KBytes<br>'); : ' + item.DiscSize + ' KBytes<br>'); : ' + item.Status + '<br>'); document.write('MaxAssets : ' + item.MaxAssets + '<br>');
</script>
Asset Name: <input type="text" name="AssetName" size="20" value=""><br> <input type="button" value=" BBC News 24 " onclick="js_Start('src=igmp://239.255.250.1:11111')"> <input type="button" value=" BBC 2 " onclick="js_Start('src=igmp://239.255.250.2:11111')"> <input type="button" value=" ITV " onclick="js_Start('src=igmp://239.255.250.3:11111')"><br> <input type="button" value=" Stop Recording " onclick="js_Stop()">
<hr> <h2>Current Assets:</h2> Rename Name: <input type="text" name="RenameName" size="20" value=""><br>
<script language="JavaScript">
var list = PVR.ListAssets(); var n = list.Assets; var s = ""; var tmp = "";
for (loop=1; loop <=n; loop++) { var asset = PVR.GetAssetInfo(list[loop].Name); var newURL = new Array();
170
Example code
s = "Name: " + list[loop].Name + "<br>" s = s + "URL: " + asset.URL + "<br>" s = s + "Duration: " + asset.Duration + " Seconds <br>" s = s + "TotalSize: " + asset.TotalSize + " Kbytes <br>" s = s + "Size: " + asset.Size + " Kbytes <br>" document.write(s);
document.write('<a href="' + tmp +'">Play Asset</a>'); document.write('<input type="button" value="Delete" onclick="js_DeleteAsset(\'' + list[loop].Name + '\')">'); document.write('<input type="button" value="Rename" onclick="js_RenameAsset(\'' + list[loop].Name + '\')"><p>'); }
171
Index
A Action (Browser function) 118 AminoGeneric.Call 123 AminoGeneric.onEvent 122 AminoGeneric.Register 123 ASTB.BlastCode 46 ASTB.CommitConfig 39 ASTB.DebugString 54 ASTB.DefaultKeys 45 ASTB.DeleteAllBookmarks 52 ASTB.DeleteAllCookies 53 ASTB.DeleteAllHistory 53 ASTB.Enable2ndEthernetPort 55 ASTB.EnableVLANTagging 57 ASTB.ErrorString 54 ASTB.FileExists 58 ASTB.Format 41 ASTB.GCluster 47 ASTB.GetAddress 29 ASTB.GetBrowser 23 ASTB.GetBrowserConfig 40 ASTB.GetCAID 58 ASTB.GetChannel 28 ASTB.GetConfig 39 ASTB.GetDate 21 ASTB.GetDHCP 29 ASTB.GetDHCPAddress 30 ASTB.GetDHCPDNS 31 ASTB.GetDHCPDomain 31 ASTB.GetDHCPGateway 31 ASTB.GetDHCPLease 32 ASTB.GetDHCPNetmask 31 ASTB.GetDHCPRebind 32 ASTB.GetDHCPRenew 32 ASTB.GetDI 33 ASTB.GetDNS 30 ASTB.GetDomain 30 ASTB.GetExternalVLANid 56 ASTB.GetFanState 43 ASTB.GetGateway 30 ASTB.GetHardwareVersion 24 ASTB.GetInternalVLANid 56 ASTB.GetIPAddress 29 ASTB.GetKeyboardState 51 ASTB.GetLEDState 55 ASTB.GetLocked 24 ASTB.GetMacAddress 24 ASTB.GetMouseState 27 ASTB.GetNetmask 30 ASTB.GetPortRateLimit 57 ASTB.GetPowerState 26 ASTB.GetRTCTime 22 ASTB.GetSerialNumber 24 ASTB.GetSmartCardSN 42 ASTB.GetSoftwareVersion 23 ASTB.GetString 48 ASTB.GetSystemInfo 22 ASTB.GetSystemManufacturer 23 ASTB.GetSystemModel 23 ASTB.GetTrustedDomain 35 ASTB.GetTrustedDomains_Domain 36 ASTB.GetTrustedDomains_Javascript 36 ASTB.GetTrustedDomains_Macrovision 37 ASTB.GetUpgradeAddress 33 ASTB.GetUpgradeDI 34 ASTB.GetUpgradePort 33 ASTB.GetUSBInfo 25 ASTB.HDDTest 41 ASTB.LoadCodeSet 46 ASTB.Reboot 53 ASTB.Reflash 41 ASTB.SaveChannels 28 ASTB.SaveKeyFunctions 46 ASTB.SaveTrustedDomains 37 ASTB.SelectChannel 27 ASTB.SetBrowserConfig 40 ASTB.SetChannel 28 ASTB.SetConfig 38 ASTB.SetDate 21 ASTB.SetExternalVLANid 56 ASTB.SetFanState 42 ASTB.SetInternalVLANid 56 ASTB.SetKBDelay 52 ASTB.SetKBRepeat 52 ASTB.SetKeyboardState 51 ASTB.SetKeyFunction 45 ASTB.SetLEDState 54 ASTB.SetMouseState 27 ASTB.SetPortRateLimit 57 ASTB.SetPowerState 26 ASTB.SetRemoteType 46 ASTB.SetRFChannel 42 ASTB.SetRFPassthrough 42 ASTB.SetRTCTime 21 ASTB.SetTrustedDomain 34 ASTB.Sleep 58 ASTB.SmartportProgram 43 ASTB.SmartportTest 43 ASTB.TestModem 44 ASTB.Upgrade 33 ASTB.VNC 53 ASTB.WithChannels 47 AudioControl.Event 106 AudioControl.GetAC3Downmix 113 AudioControl.GetAC3DRC 112 AudioControl.GetAC3Dualmono 114
172
AudioControl.GetAC3Outmode 111 AudioControl.GetDefaultVolume 109 AudioControl.GetMaxVolume 108 AudioControl.GetMinVolume 110 AudioControl.GetMute 108 AudioControl.GetVolume 107 AudioControl.onVolumeChange 106 AudioControl.SetAC3Downmix 113 AudioControl.SetAC3DRC 112 AudioControl.SetAC3Dualmono 113 AudioControl.SetAC3Outmode 111 AudioControl.SetAudioMix 110 AudioControl.SetDefaultVolume 109 AudioControl.SetMaxVolume 108 AudioControl.SetMinVolume 110 AudioControl.SetMute 107 AudioControl.SetRFAudioBoost 115 AudioControl.SetVolume 107 AVMedia event codes 60 AVMedia.Continue 63 AVMedia.DownloadKey 76 AVMedia.Event 59 AVMedia.EventString 59 AVMedia.GetAudioPID 70 AVMedia.GetAudioPIDList 70 AVMedia.GetAudioPIDs 69 AVMedia.GetContentName 67 AVMedia.GetCurrentSpeed 65 AVMedia.GetDefaultRTSPServer 68 AVMedia.GetDefaultVideoServer 68 AVMedia.GetFormat 66 AVMedia.GetMSecPos 65 AVMedia.GetMSecPosition 65 AVMedia.GetPlaySpeed 66 AVMedia.GetPMTPID 78 AVMedia.GetPmtProgramInfo 77 AVMedia.GetPos 64 AVMedia.GetPosition 64 AVMedia.GetPrimaryAudioLanguage 71 AVMedia.GetPrimarySubtitleLanguage 74 AVMedia.GetProtocol 67 AVMedia.GetSecondaryAudioLanguage 72 AVMedia.GetSecondarySubtitleLanguage 75 AVMedia.GetVideoPID 77 AVMedia.Kill 63 AVMedia.onConnectionLost 60 AVMedia.onEndOfMedia 60 AVMedia.onEvent 59 AVMedia.Pause 63 AVMedia.Play 62 AVMedia.SetAudioPID 69 AVMedia.SetDefaultRTSPServer 68 AVMedia.SetDefaultVideoServer 68 AVMedia.SetFadeoutTime 67 AVMedia.SetHighDef 77 AVMedia.SetKeyID 76
AVMedia.SetMSecPos 64 AVMedia.SetMSecPosition 64 AVMedia.SetPos 63 AVMedia.SetPosition 63 AVMedia.SetPrimaryAudioLanguage 71 AVMedia.SetPrimarySubtitleLanguage 73 AVMedia.SetSecondaryAudioLanguage 72 AVMedia.SetSecondarySubtitleLanguage 75 AVMedia.SetSpeed 65 AVMedia.Stop 62 AVMedia.VideoHide 70 B BlastCode (ASTB function) 46 Browser.Action 118 Browser.CacheFlush 116 Browser.FrameLoadResetsState 120 Browser.GetCacheSize 116 Browser.GetToolbarState 117 Browser.Go 118 Browser.GoBack 117 Browser.GogiAction 119 Browser.GoHome 118 Browser.Lower 119 Browser.Raise 119 Browser.SetCacheSize 116 Browser.SetToolbarState 117 Browser.ShowOldContentPeriod 121 C CacheFlush (Browser function) 116 Call (AminoGeneric function) 123 Channels ASTB functions (JMACX) 27 See also JMACX classes CommitConfig (ASTB function) 39 Configuration ASTB functions (JMACX) 37 See also JMACX classes Configure (TVI function) 136 Continue (AVMedia function) 63 CustomCommand (TVI function) 140 D ASTB functions (JMACX) 21 See also JMACX classes DebugString (ASTB function) 54 DefaultKeys (ASTB function) 45 DefaultUnloadVideo (VideoDisplay function) 97 DeleteAllBookmarks (ASTB function) 52 DeleteAllCookies (ASTB function) 53 DeleteAllHistory (ASTB function) 53 DeleteAsset (PVR function) 143 Date
173
DetectTV (TVI function) 128 DisplayNumber (TVI function) 135 DisplayText (TVI function) 137 DownloadKey (AVMedia function) 76 E Enable2ndEthernetPort (ASTB function) 55 EnableVLANTagging (ASTB function) 57 ErrorString (ASTB function) 54 Event (AudioControl attribute) 106 Event (AVMedia attribute) 59 Event codes (AVMedia) 60 EventString (AVMedia attribute) 59 F FileExists (ASTB function) 58 Format (ASTB function) 41 FrameLoadResetsState (Browser function) 120 FullScreen (VideoDisplay function) 79 G GCluster (ASTB function) 47 GetAC3Downmix (AudioControl function) 113 GetAC3DRC (AudioControl function) 112 GetAC3Dualmono (AudioControl function) 114 GetAC3Outmode (AudioControl function) 111 GetAddress (ASTB function) 29 GetAlphaLevel (VideoDisplay function) 85 GetAPS (VideoDisplay function) 104 GetAspect (VideoDisplay function) 86 GetAssetInfo (PVR function) 143 GetAudioPID (AVMedia function) 70 GetAudioPIDList (AVMedia function) 70 GetAudioPIDs (AVMedia function) 69 GetAVAspect (VideoDisplay function) 88 GetBrowser (ASTB function) 23 GetBrowserConfig (ASTB function) 40 GetCacheSize (Browser function) 116 GetCAID (ASTB function) 58 GetChannel (ASTB function) 28 GetChromaKey (VideoDisplay function) 83 GetChromaRGB (VideoDisplay function) 84 GetClosedCaption (VideoDisplay function) 96 GetConfig (ASTB function) 39 GetContentName (AVMedia function) 67 GetCurrentSpeed (AVMedia function) 65 GetDate (ASTB function) 21 GetDefaultRTSPServer (AVMedia function) 68 GetDefaultVideoServer (AVMedia function) 68 GetDefaultVolume (AudioControl function) 109 GetDHCP (ASTB function) 29 GetDHCPAddress (ASTB function) 30 GetDHCPDNS (ASTB function) 31 GetDHCPDomain (ASTB function) 31
GetDHCPGateway (ASTB function) 31 GetDHCPLease (ASTB function) 32 GetDHCPNetmask (ASTB function) 31 GetDHCPRebind (ASTB function) 32 GetDHCPRenew (ASTB function) 32 GetDI (ASTB function) 33 GetDNS (ASTB function) 30 GetDomain (ASTB function) 30 GetExternalVLANid (ASTB function) 56 GetFanState (ASTB function) 43 GetFeatures (TVI function) 138 GetFormat (AVMedia function) 66 GetGateway (ASTB function) 30 GetHardwareVersion (ASTB function) 24 GetInternalVLANid (ASTB function) 56 GetIPAddress (ASTB function) 29 GetIsTvOn (TVI function) 128 GetKeyboardState (ASTB function) 51 GetLEDState (ASTB function) 55 GetLocked (ASTB function) 24 GetMacAddress (ASTB function) 24 GetMacrovision (VideoDisplay function) 93 GetMaxVolume (AudioControl function) 108 GetMaxVolume (TVI function) 131 GetMinVolume (AudioControl function) 110 GetMinVolume (TVI function) 130 GetMode (VideoDisplay function) 85 GetMouseState (ASTB function) 27 GetMSecPos (AVMedia function) 65 GetMSecPosition (AVMedia function) 65 GetMute (AudioControl function) 108 GetMute (TVI function) 132 GetNetmask (ASTB function) 30 GetOutput (VideoDisplay function) 92 GetOutputFmt (VideoDisplay function) 91 GetPIG (VideoDisplay function) 81 GetPIGPosition (VideoDisplay function) 83 GetPIGScale (VideoDisplay function) 81 GetPIGx (VideoDisplay function) 82 GetPIGy (VideoDisplay function) 82 GetPlaySpeed (AVMedia function) 66 GetPMTPID (AVMedia function) 78 GetPmtProgramInfo (AVMedia function) 77 GetPortRateLimit (ASTB function) 57 GetPos (AVMedia function) 64 GetPosition (AVMedia function) 64 GetPowerState (ASTB function) 26 GetPrimaryAudioLanguage (AVMedia function) 71 GetPrimarySubtitleLanguage (AVMedia function) 74 GetProtocol (AVMedia function) 67 GetRFModFrequencyTable (VideoDisplay function) 100 GetRFModState (VideoDisplay function) 99 GetRTCTime (ASTB function) 22 GetSecondaryAudioLanguage (AVMedia function)
174
72 GetSecondarySubtitleLanguage (AVMedia function) 75 GetSerialNumber (ASTB function) 24 GetSmartcardSN (ASTB function) 42 GetSoftwareVersion (ASTB function) 23 GetStartupVolume (TVI function) 131 GetString (ASTB function) 48 GetSubtitles (VideoDisplay function) 95 GetSubtitlesPreferredLanguage (VideoDisplay function) 102 GetSubtitlesSecondaryLanguage (VideoDisplay function) 102 GetSystemInfo (ASTB function) 22 GetSystemInfo (PVR function) 141 GetSystemManufacturer (ASTB function) 23 GetSystemModel (ASTB function) 23 GetTeletext (VideoDisplay function) 94 GetTeletextFullscreen (VideoDisplay function) 104 GetToolbarState (Browser function) 117 GetTrustedDomain (ASTB function) 35 GetTrustedDomains_Domain (ASTB function) 36 GetTrustedDomains_Javascript (ASTB function) 36 GetTrustedDomains_Macrovision (ASTB function) 37 GetTVStandard (VideoDisplay function) 89 GetUHFChannel (VideoDisplay function) 98 GetUpgradeAddress (ASTB function) 33 GetUpgradeDI (ASTB function) 34 GetUpgradePort (ASTB function) 33 GetUSBInfo (ASTB function) 25 GetVersion (TVI function) 138 GetVideoPID (AVMedia function) 77 GetVolume (AudioControl function) 107 GetVolume (TVI function) 129 Go (Browser function) 118 GoBack (Browser function) 117 GogiAction (Browser function) 119 GoHome (Browser function) 118 H HDDTest (ASTB function) 41 I IgnoreSlaveUpdates (VideoDisplay function) 105 IgnoreUpdates (VideoDisplay function) 93 IsLoggedOn (SmartCard attribute) 125 IsPresent (SmartCard attribute) 125 J JMACX classes AminoGeneric 122 ASTB 21
AudioControl 106 AVMedia 59 Browser 116 PVR 141 SmartCard 125 TVI 127 VideoDisplay 79 K Kill (AVMedia function) 63 L LED Flashing codes List 153, 156 ListAssets (PVR function) 142 LoadCodeSet (ASTB function) 46 LoopbackTest (TVI function) 138 Lower (Browser function) 119 M Mouse pointer ASTB functions (JMACX) 27 See also JMACX classes N Network ASTB functions (JMACX) 29 See also JMACX classes O onConnectionLost (AVMedia attribute) 60 onEndOfMedia (AVMedia attribute) 60 onEvent (AminoGeneric attribute) 122 onEvent (AVMedia attribute) 59 onEvent (TVI attribute) 127 onVolumeChange (AudioControl attribute) 106 P Pause (AVMedia function) 63 PiG Position 79 PiG display 79 Play (AVMedia function) 62 Power management ASTB functions (JMACX) 25 See also JMACX classes Power mangement 25 ProcessUnhandledKey (TVI function) 139 Production ASTB functions (JMACX) 41 See also JMACX classes
175
PVR.DeleteAsset 143 PVR.GetAssetInfo 143 PVR.GetSystemInfo 141 PVR.ListAssets 142 PVR.Record 141 PVR.RenameAsset 143 PVR.StopRecording 144 R Raise (Browser function) 119 Reboot (ASTB function) 53 Record (PVR function) 141 Reflash (ASTB function) 41 Register (AminoGeneric function) 123 RemoteFormatIn (TVI function) 136 RenameAsset (PVR function) 143 RetainAlphaLevel (VideoDisplay function) 96 RetainMouseState (VideoDisplay function) 96 S SaveChannels (ASTB function) 28 SaveKeyFunctions (ASTB function) 46 SaveTrustedDomains (ASTB function) 37 SelectChannel (ASTB function) 27 SelectTeletext (TVI function) 134 SetAC3Downmix (AudioControl function) 113 SetAC3DRC (AudioControl function) 112 SetAC3Dualmono (AudioControl function) 113 SetAC3Outmode (AudioControl function) 111 SetAlphaLevel (VideoDisplay function) 85 SetAlphaRect (VideoDisplay function) 104 SetAPS (VideoDisplay function) 103 SetAspect (VideoDisplay function) 86 SetAudioMix (AudioControl function) 110 SetAudioPID (AVMedia function) 69 SetAVAspect (VideoDisplay function) 87 SetAVAspectSwitching (VideoDisplay function) 87 SetBrowserConfig (ASTB function) 40 SetCacheSize (Browser function) 116 SetChannel (ASTB function) 28 SetChannel (TVI function) 133 SetChromaKey (VideoDisplay function) 83 SetChromaRGB (VideoDisplay function) 84 SetClosedCaption (VideoDisplay function) 95 SetConfig (ASTB function) 38 SetDate (ASTB function) 21 SetDefaultRTSPServer (AVMedia function) 68 SetDefaultVideoServer (AVMedia function) 68 SetDefaultVolume (AudioControl function) 109 SetExternalVLANid (ASTB function) 56 SetFadeoutTime (AVMedia function) 67 SetFanState (ASTB function) 42 SetHighDef (AVMedia function) 77 SetInput (TVI function) 132
SetInternalVLANid (ASTB function) 56 SetKBDelay (ASTB function) 52 SetKBRepeat (ASTB function) 52 SetKeyboardState (ASTB function) 51 SetKeyFunction (ASTB function) 45 SetKeyID (AVMedia function) 76 SetKeyLock (TVI function) 134 SetLEDState (ASTB function) 54 SetMacrovision (VideoDisplay function) 92 SetMaxVolume (AudioControl function) 108 SetMaxVolume (TVI function) 130 SetMinVolume (AudioControl function) 110 SetMinVolume (TVI function) 130 SetMode (VideoDisplay function) 84 SetMouseState (ASTB function) 27 SetMSecPos (AVMedia function) 64 SetMSecPosition (AVMedia function) 64 SetMute (AudioControl function) 107 SetMute (TVI function) 132 SetOSD (TVI function) 134 SetOutput (VideoDisplay function) 91 SetOutputFmt (VideoDisplay function) 89 SetPIG (VideoDisplay function) 80 SetPIGPosition (VideoDisplay function) 82 SetPIGScale (VideoDisplay function) 81 SetPortRateLimit (ASTB function) 57 SetPos (AVMedia function) 63 SetPosition (AVMedia function) 63 SetPowerState (ASTB function) 26 SetPrimaryAudioLanguage (AVMedia function) 71 SetPrimarySubtitleLanguage (AVMedia function) 73 SetRemoteType (ASTB function) 46 SetRFAudioBoost (AudioControl function) 115 SetRFChannel (ASTB function) 42 SetRFModFrequencyTable (VideoDisplay function) 100 SetRFModState (VideoDisplay function) 99 SetRFPassthrough (ASTB function) 42 SetRTCTime (ASTB function) 21 SetSecondaryAudioLanguage (AVMedia function) 72 SetSecondarySubtitleLanguage (AVMedia function) 75 SetSpeed (AVMedia function) 65 SetStartupVolume (TVI function) 131 SetSubtitles (VideoDisplay function) 94 SetSubtitlesPreferredLanguage (VideoDisplay function) 101 SetSubtitlesSecondaryLanguage (VideoDisplay function) 103 SetTeletext (VideoDisplay function) 93 SetTeletextFullscreen (VideoDisplay function) 104 SetToolbarState (Browser function) 117 SetTrustedDomain (ASTB function) 34 SetTVStandard (VideoDisplay function) 88
176
SetTvType (TVI function) 128 SetUHFChannel (VideoDisplay function) 97 SetupClosedCaption (TVI function) 135 SetVolume (AudioControl function) 107 SetVolume (TVI function) 129 ShowOldContentPeriod (Browser function) 121 Sleep (ASTB function) 58 SmartCard.IsLoggedOn 125 SmartCard.IsPresent 125 SmartportProgram (ASTB function) 43 SmartportTest (ASTB function) 43 Stop (AVMedia function) 62 StopRecording (PVR function) 144 System information ASTB functions (JMACX) 22 See also JMACX classes SystemInfo (TVI function) 137 T TestModem (ASTB function) 44 Troubleshooting LED flashing codes List 153, 156 Trusted domains ASTB functions (JMACX) 34 See also JMACX classes TVI.Configure 136 TVI.CustomCommand 140 TVI.DetectTV 128 TVI.DisplayNumber 135 TVI.DisplayText 137 TVI.GetFeatures 138 TVI.GetIsTvOn 128 TVI.GetMaxVolume 131 TVI.GetMinVolume 130 TVI.GetMute 132 TVI.GetStartupVolume 131 TVI.GetVersion 138 TVI.GetVolume 129 TVI.LoopbackTest 138 TVI.onEvent 127 TVI.ProcessUnhandledKey 139 TVI.RemoteFormatIn 136 TVI.SelectTeletext 134 TVI.SetChannel 133 TVI.SetInput 132 TVI.SetKeyLock 134 TVI.SetMaxVolume 130 TVI.SetMinVolume 130 TVI.SetMute 132 TVI.SetOSD 134 TVI.SetStartupVolume 131 TVI.SetTvType 128 TVI.SetupClosedCaption 135 TVI.SetVolume 129
TVI.SystemInfo 137 TVI.TVOff 129 TVI.TVOn 128 TVI.VolumeDown 132 TVI.VolumeUp 131 TVOff (TVI function) 129 TVOn (TVI function) 128 U UnloadVideo (VideoDisplay function) 97 Upgrade ASTB functions (JMACX) 33 See also JMACX classes Upgrade (ASTB function) 33 V VideoDisplay.DefaultUnloadVideo 97 VideoDisplay.FullScreen 79 VideoDisplay.GetAlphaLevel 85 VideoDisplay.GetAPS 104 VideoDisplay.GetAspect 86 VideoDisplay.GetAVAspect 88 VideoDisplay.GetChromaKey 83 VideoDisplay.GetChromaRGB 84 VideoDisplay.GetClosedCaption 96 VideoDisplay.GetMacrovision 93 VideoDisplay.GetMode 85 VideoDisplay.GetOutput 92 VideoDisplay.GetOutputFmt 91 VideoDisplay.GetPIG 81 VideoDisplay.GetPIGPosition 83 VideoDisplay.GetPIGScale 81 VideoDisplay.GetPIGx 82 VideoDisplay.GetPIGy 82 VideoDisplay.GetRFModFrequencyTable 100 VideoDisplay.GetRFModState 99 VideoDisplay.GetSubtitles 95 VideoDisplay.GetSubtitlesPreferredLanguage 102 VideoDisplay.GetSubtitlesSecondaryLanguage 102 VideoDisplay.GetTeletext 94 VideoDisplay.GetTeletextFullscreen 104 VideoDisplay.GetTVStandard 89 VideoDisplay.GetUHFChannel 98 VideoDisplay.IgnoreSlaveUpdates 105 VideoDisplay.IgnoreUpdates 93 VideoDisplay.RetainAlphaLevel 96 VideoDisplay.RetainMouseState 96 VideoDisplay.SetAlphaLevel 85 VideoDisplay.SetAlphaRect 104 VideoDisplay.SetAPS 103 VideoDisplay.SetAspect 86 VideoDisplay.SetAVAspect 87 VideoDisplay.SetAVAspectSwitching 87
177
VideoDisplay.SetChromaKey 83 VideoDisplay.SetChromaRGB 84 VideoDisplay.SetClosedCaption 95 VideoDisplay.SetMacrovision 92 VideoDisplay.SetMode 84 VideoDisplay.SetOutput 91 VideoDisplay.SetOutputFmt 89 VideoDisplay.SetPIG 80 VideoDisplay.SetPIGPosition 82 VideoDisplay.SetPIGScale 81 VideoDisplay.SetRFModFrequencyTable 100 VideoDisplay.SetRFModState 99 VideoDisplay.SetSubtitles 94 VideoDisplay.SetSubtitlesPreferredLanguage 101 VideoDisplay.SetSubtitlesSecondaryLanguage 103 VideoDisplay.SetTeletext 93 VideoDisplay.SetTeletextFullscreen 104 VideoDisplay.SetTVStandard 88 VideoDisplay.SetUHFChannel 97 VideoDisplay.UnloadVideo 97 VideoHide (AVMedia function) 70 VNC (ASTB function) 53 VolumeDown (TVI function) 132 VolumeUp (TVI function) 131 W WithChannels (ASTB function) 47
178
Document history
Changes No document history stored. Reformat document. Update of all functions against current code. Cosmetic fixes. Update to ASTB.SetBrowserConfig (add more detail to values in list of available config settings) and ASTB.SetConfig (added example). Added this document history. Marked as Confidential.
0.12.x rev2
R. Potts
28/9/2006
179
Date
Changes Additional formatting for HTML version. Available as HTML for first time. Updated for 0.14.x releases: list. Added new remote control key-mapping example. Updated language strings (subtitles, audio) to ISO 639-2. Changed/new functions (some changes affect the document only - the code is unchanged): Browser: Action, GogiAction, Raise, Lower, FrameLoadResetsState ASTB: GetTrustedDomain_Domain, GetTrustedDomain_Macrovision, GetTrustedDomain_Javascript, SetLEDState, FileExists, GetSystemInfo, SetKeyFunction, GetCAID, TestModem, GetRTCTime, GetDHCP, GetDate, SetExternalVLANID, GetExternalVLANID PVR: ListAssets, GetAssetInfo TVI: GetIsTvOn AVMedia: Event, EventString, SetSpeed, SetAudioPID, SetPos / SetPosition, SetSpeed, SetAudioPID, SetPrimaryAudioLanguage, GetPrimaryAudioLanguage, SetSecondaryAudioLanguage, GetSecondaryAudioLanguage, GetPrimarySubtitleLanguage, SetPrimarySubtitleLanguage, GetSecondarySubtitleLanguage, SetSecondarySubtitleLanguage, GetPMTPID, SetDefaultRTSPServer, event codes - webfetch codes added to list VideoDisplay: IgnoreUpdates, FullScreen, SetPIG, GetPIGScale, SetAPS, SetAspect, SetAVAspect, SetAVAspectSwitching, SetOUtputFmt, SetUHFChannel, SetRFModFrequencyTable, SetRFModState, SetSubtitles, SetSubtitlesPreferredLanguage, GetSubtitlesPreferredLanguage, SetSubtitlesSecondaryLanguage, GetSubtitlesSecondaryLanguage, SetAlphaLevel, SetClosedCaption, GetClosedCaption, SetTeletext, RetainMouseState, RetainAlphaLevel, UnloadVideo, , GetMacrovision
0.14.x rev1
R.Potts
Added video output formats appendix. Fixed PDF document issues (bookmarks and blank pages). PDF release only (there is no 0.14.x rev1 of HTML version).
180