Upload
rgx112
View
545
Download
20
Embed Size (px)
Citation preview
JMACX: Javascript Media Access Control Extensions
API specificationVersion 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 2
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 Amino’s 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: [email protected]
Document feedback: If you have comments on this document, please submit feedback via the Customer area of the Amino support site.
Contents
About Amino ............................................................................................................................2Contact ....................................................................................................................................2Copyright and trademarks .......................................................................................................5Conventions ............................................................................................................................5
1 Introduction .................................................................................................................61.1 About this document ........................................................................................... 61.2 Overview of classes............................................................................................ 71.3 Availability of functions ....................................................................................... 71.4 Using the API...................................................................................................... 8
2 JMACX functions - supported platforms ..................................................................92.1 Platforms supported............................................................................................ 9
3 ASTB ..........................................................................................................................213.1 ASTB class ....................................................................................................... 213.2 ASTB date functions ......................................................................................... 213.3 ASTB system information functions.................................................................. 223.4 ASTB power management functions ................................................................ 253.5 ASTB mouse pointer functions ......................................................................... 273.6 ASTB channel functions ................................................................................... 273.7 ASTB network functions ................................................................................... 293.8 ASTB upgrade functions................................................................................... 333.9 ASTB trusted domains functions ...................................................................... 343.10 ASTB configuration functions ........................................................................... 373.11 ASTB production functions ............................................................................... 413.12 ASTB miscellaneous functions ......................................................................... 45
4 AVMedia .....................................................................................................................594.1 AVMedia class .................................................................................................. 594.2 AVMedia event-handler attributes .................................................................... 594.3 AVMedia functions............................................................................................ 62
5 VideoDisplay .............................................................................................................795.1 VideoDisplay class............................................................................................ 795.2 VideoDisplay functions ..................................................................................... 79
6 AudioControl ...........................................................................................................1066.1 AudioControl class.......................................................................................... 1066.2 AudioControl event-handler attributes ............................................................ 1066.3 AudioControl functions.................................................................................... 107
7 Browser ....................................................................................................................1167.1 Browser class ................................................................................................. 1167.2 Browser functions ........................................................................................... 116
8 AminoGeneric .........................................................................................................1228.1 AminoGeneric class........................................................................................ 1228.2 AminoGeneric event-handler attributes .......................................................... 1228.3 AminoGeneric functions.................................................................................. 123
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 3
9 SmartCard ................................................................................................................1259.1 SmartCard class ............................................................................................. 1259.2 SmartCard functions ....................................................................................... 125
10 TVI ............................................................................................................................12710.1 TVI class ......................................................................................................... 12710.2 TVI event-handler attributes ........................................................................... 12710.3 Return codes .................................................................................................. 12710.4 TVI functions................................................................................................... 128
11 PVR ...........................................................................................................................14111.1 PVR class ....................................................................................................... 14111.2 PVR functions ................................................................................................. 141
Appendix A:HTML extensions .........................................................................................145A.1 <AMINOATTR> tag ........................................................................................ 145A.2 <IMG> tag....................................................................................................... 149
Appendix B:Media source URLs ......................................................................................150B.1 Media source types......................................................................................... 150B.2 Media source attributes .................................................................................. 152
Appendix C:Key codes and action codes .......................................................................153C.1 List of key codes ............................................................................................. 153C.2 List of action codes ......................................................................................... 156
Appendix D:Video output formats ...................................................................................158D.1 AmiNET103 .................................................................................................... 158D.2 AmiNET110, 110H.......................................................................................... 158D.3 AmiNET120 .................................................................................................... 159D.4 AmiNET124 .................................................................................................... 159D.5 AmiNET125 ................................................................................................... 159D.6 AmiNET130, 130H.......................................................................................... 160D.7 AmiNET500 .................................................................................................... 160
Appendix E:Example code ...............................................................................................162E.1 ASTB, AVMedia, VideoDisplay general example ........................................... 162E.2 Mapping actions and channels to remote control buttons .............................. 166E.3 Mapping remote control coloured keys to new actions................................... 167E.4 PVR control example ...................................................................................... 169
Index ...................................................................................................................................172Document history ................................................................................................................179
4 CONFIDENTIAL. Copyright © Amino Communications Ltd 2006
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 5
Conventions
Copyright and trademarks
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006
Amino, AmiNET and the Amino logo are trademarks of Amino Communications Ltd.
All other trademarks are the property of their respective owners.
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.
Formatting Usage< ...> Indicates a value that you need to replace with a system-
specific 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.
code font Indicates input and output values (for example, at a command line), as well as function, configuration, parameter and file names.
bold text Used for emphasis and for cross-references to other sections and other documents.
grey text Commands or settings which are not in general use (for example, configuration settings that are reserved for Amino internal use).
underlined blue text
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:
Quick start
If you are already familiar with the JMACX API, use the relevant sections of the document as a reference.
Chapter OutlineIntroduction on page 6 This chapter continues by providing general
information about the contents of the API and how to use it.
JMACX functions - supported platforms on page 9
Lists the available functionality and details the platforms, browsers and other build options that functionality is available on.
Individual classes The main chapters list the functions and event-handling attributes available in each class.
HTML extensions on page 145
Details deprecated HTML attributes and available equivalents.
Media source URLs on page 150
Provides information on constructing media stream URLs.
Key codes and action codes on page 153
Lists remote control keycodes and actions that can be associated with them.
Video output formats on page 158
Lists the output format possibilities for each of the AmiNET set-top box types.
Example code on page 162
Provides examples of JMACX API use.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 6
Introduction
1.2 Overview of classes
The API is divided into classes that enable communication with various components in the set-top box. An overview of the classes is shown in the table below. The main chapters of this document give details for each class.
1.3 Availability of functions
Support for browser, hardware platform and some other functionality areas is dictated by whether the functionality is included in the software build. Other functionality is dependent on the software version. The table in JMACX functions - supported platforms on page 9 and notes in the function descriptions indicate which functions are supported for each browser as well as indicating whether the function is limited to particular hardware platforms or build options.
Deprecated / removed functions
This document details the functionality available in the current version as well as listing deprecated functionality, for backwards compatibility. Note that where functions are described as “Not currently supported”, this means that the function still exists and is available to support backwards compatibility, but should not be called in new versions. “Removed” indicates that the function has been removed completely, and is not available to call. Where a new function now supports the functionality, this is indicated in the description of the function.
For details of older versions of functions for which behaviour has changed since 0.12.0, see the HTML version of this API Specification, or see earlier versions of this API Specification, in which the older behaviour was supported.
Browser support
The JMACX extensions are actually several separate APIs, for communication with the Fresco, Opera and Escape browsers, and additional support for control of set-top boxes that don’t have a browser, using the Amiscript API.
The Fresco and Opera APIs use standard Javascript.The Escape API communicates with a Java application.The Amiscript API uses a limited version of Javascript.
Class Enables communication with:ASTB General set-top box functionality areas.AVMedia AV media settings and play-back.VideoDisplay Video display settings.AudioControl The set-top box’s audio system.Browser The browser - to control and customise display content.SmartCard The smartcard device.AminoGeneric Third party software daemons running on the set-top box.
(Restricted to partner companies; for use with SDK.)TVI Television, via the TVI port on Hospitality set-top boxes.PVR The personal video recorder, including the recorded assets
available.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 7
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.
1.4 Using the API
The JMACX extensions are designed to be embedded in HTML pages loaded by the set-top box. Navigation to the page that the set-top box loads is handled by the browser. Examples of JMACX API calls are available in the Appendix to this document, and from the Amino support site, subject to NDA.
The Fresco and Opera versions of the API use Javascript; the Escape API uses Java; Amiscript uses an Amino version of Javascript.
Data types
The document uses the following conventions to represent the different data types in Javascript, Java and the C code that underlies this API:
Numeric types: Javascript uses a single numeric data type, rather than separate integer, floating point etc. In this documentation, the data types shown in function declarations are the data types that the underlying C code uses and returns. For practical purposes, float, long and int in this document indicate the numeric Javascript data type.
Boolean types: In this documentation, boolean indicates the boolean Javascript or Java data type, and values are specified here as true and false.
Event handling
Class-specific event handlers are defined for some classes. In these cases, the event handlers generally include an Event attribute that can be used as a callback to retrieve the event code and an onEvent attribute that allows you to specify an event-handler function to call.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 8
2 JMACX functions - supported platforms
2.1 Platforms supported
The following table lists which JMACX functions are supported by which browsers and platforms in version 0.14.x releases. In the table, Y indicates that the function is supported; grey text indicates that the function is not supported in version 0.14.x. Where a function is supported for earlier release versions only, it is not indicated in this table, but is included in the individual function descriptions. Also included there are alternative functions to use in place of deprecated functions.
ASTB class
See ASTB for descriptions.
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
ASTB - dateASTB.SetDateASTB.GetDate Y Y YASTB.SetRTCTime A500 onlyASTB.GetRTCTime Y Y A500 only
ASTB - system informationASTB.GetSystemInfo Y YASTB.GetSystemManufacturer Y Y YASTB.GetSystemModel Y Y YASTB.GetBrowser Y Y YASTB.GetSoftwareVersion Y Y YASTB.GetHardwareVersionASTB.GetSerialNumber Y Y YASTB.GetMacAddress Y Y Y YASTB.GetLocked Y Y YASTB.GetUSBInfo Y Y Not A103
ASTB - power managementASTB.SetPowerState Y Y YASTB.GetPowerState Y Y Y
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 9
JMACX functions - supported platforms
ASTB - mouse pointer controlASTB.SetMouseState Y Y YASTB.GetMouseState Y Y Y
ASTB - channel informationASTB.SelectChannel Y Y YASTB.SetChannel Y Y YASTB.GetChannel Y YASTB.SaveChannels Y Y Y
ASTB - networkASTB.GetDHCP Y Y YASTB.GetIPAddress Y YASTB.GetAddress Y Y YASTB.GetNetmask Y Y YASTB.GetGateway Y Y YASTB.GetDomain Y Y YASTB.GetDNS Y Y YASTB.GetDHCPAddress Y Y YASTB.GetDHCPNetmask Y Y YASTB.GetDHCPGateway Y Y YASTB.GetDHCPDomain Y Y YASTB.GetDHCPDNS Y Y YASTB.GetDHCPLease Y Y YASTB.GetDHCPRenew Y Y YASTB.GetDHCPRebind Y Y Y
ASTB - upgradeASTB.Upgrade Y Y YASTB.GetDI Y YASTB.GetUpgradeAddress Y YASTB.GetUpgradePort Y YASTB.GetUpgradeDI Y Y
ASTB - Trusted domainsASTB.SetTrustedDomain Y YASTB.GetTrustedDomain Y Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 10
JMACX functions - supported platforms
ASTB.GetTrustedDomain_Domain
Y
ASTB.GetTrustedDomain_Javascript
Y
ASTB.GetTrustedDomain_Macrovision
Y
ASTB.SaveTrustedDomains Y Y
ASTB - configurationASTB.SetConfig Y Y YASTB.GetConfig Y Y YASTB.CommitConfig Y Y YASTB.SetBrowserConfig Y YASTB.GetBrowserConfig Y Y
ASTB - productionASTB.Reflash Y Y Y production
builds onlyASTB.Format Y Y hard disk production
builds onlyASTB.HDDTest Y Y production
builds onlyASTB.SetRFChannel Y Y production
builds onlyASTB.SetRFPassthrough Y Y production
builds onlyASTB.GetSmartCardSN Y Y production
builds onlyASTB.SetFanState Y Y A500 only production
builds onlyASTB.GetFanState Y Y A500 only production
builds onlyASTB.SmartportTest Y Y H models only production
builds onlyASTB.SmartportProgram Y H models only production
builds onlyASTB.TestModem Y A130 and
A530 onlyproduction builds only
ASTB - miscellaneousASTB.DefaultKeys Y Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 11
JMACX functions - supported platforms
ASTB.SetKeyFunction Y YASTB.SaveKeyFunctions Y YASTB.LoadCodeSet Y Y H models onlyASTB.BlastCode Y Y Y H models onlyASTB.SetRemoteType Y Y H models onlyASTB.WithChannels Y YASTB.GCluster Y PPC platforms
only (A103, A110, A110H, A210, A500)
not ami_wm builds
ASTB.GetString Y Y YASTB.SetKeyboardStateASTB.GetKeyboardStateASTB.SetKBDelay Y YASTB.SetKBRepeat Y YASTB.DeleteAllBookmarks Y YASTB.DeleteAllCookies Y YASTB.DeleteAllHistory Y YASTB.Reboot Y Y Y YASTB.VNC Y YASTB.DebugString Y YASTB.ErrorString Y YASTB.SetLEDState Y YASTB.GetLEDState Y YASTB.Enable2ndEthernetPort Y Y H models onlyASTB.SetInternalVLANid Y Y H models onlyASTB.GetInternalVLANid Y Y H models onlyASTB.SetExternalVLANid Y Y H models onlyASTB.GetExternalVLANid Y Y H models onlyASTB.SetPortRateLimit Y Y H models onlyASTB.GetPortRateLimit Y Y H models onlyASTB.EnableVLANTagging Y Y H models onlyASTB.Sleep Y YASTB.GetCAIDASTB.FileExists Y Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 12
JMACX functions - supported platforms
AVMedia class
See AVMedia for descriptions.
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
AVMedia.Event Y Y YAVMedia.EventString Y YAVMedia.onEvent Y Y YAVMedia.onConnectionLostAVMedia.onEndOfMediaAVMedia.Play Y Y YAVMedia.Stop Y Y YAVMedia.Pause Y Y YAVMedia.Continue Y Y YAVMedia.Kill Y Y YAVMedia.SetPosition Y Y YAVMedia.SetPos Y Y Y AVMedia.GetPosition Y Y YAVMedia.GetPos Y Y YAVMedia.SetMSecPosition Y YAVMedia.SetMSecPos Y YAVMedia.GetMSecPosition Y YAVMedia.GetMSecPos Y YAVMedia.SetSpeed Y Y YAVMedia.GetCurrentSpeed Y Y YAVMedia.GetPlaySpeedAVMedia.GetFormat Y Y YAVMedia.SetFadeoutTimeAVMedia.GetContentName Y Y YAVMedia.GetProtocol Y Y YAVMedia.SetDefaultRTSPServer
Y Y Y
AVMedia.GetDefaultRTSPServer
Y Y Y
AVMedia.SetDefaultVideoServerAVMedia.GetDefaultVideoServerAVMedia.SetAudioPID Y Y YAVMedia.GetAudioPIDs YAVMedia.GetAudioPIDList YAVMedia.GetAudioPID Y Y Y
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 13
JMACX functions - supported platforms
VideoDisplay class
See VideoDisplay for descriptions.
AVMedia.VideoHide Y Y YAVMedia.SetPrimaryAudioLanguage
Y Y
AVMedia.GetPrimaryAudioLanguage
Y Y
AVMedia.SetSecondaryAudioLanguage
Y Y
AVMedia.GetSecondaryAudioLanguage
Y Y
AVMedia.SetPrimarySubtitleLanguage
Y Y
AVMedia.GetPrimarySubtitleLanguage
Y Y
AVMedia.SetSecondarySubtitleLanguage
Y Y
AVMedia.GetSecondarySubtitleLanguage
Y Y
AVMedia.DownloadKey Y Y Flexcipher onlyAVMedia.SetKeyID Y Y Flexcipher onlyAVMedia.SetHighDef Y Y A120 & A122
onlyAVMedia.GetVideoPID Y YAVMedia.GetPmtProgramInfo Y YAVMedia.GetPMTPID Y Conax builds
only
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
VideoDisplay.FullScreen Y Y YVideoDisplay.SetPIG Y Y YVideoDisplay.GetPIG Y Y YVideoDisplay.SetPIGScale Y Y YVideoDisplay.GetPIGScale Y Y YVideoDisplay.SetPIGPosition Y Y YVideoDisplay.GetPIGx Y Y YVideoDisplay.GetPIGy Y Y YVideoDisplay.GetPIGPosition Y Y Y
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 14
JMACX functions - supported platforms
VideoDisplay.SetChromaKey Y Y YVideoDisplay.GetChromaKey Y Y YVideoDisplay.SetChromaRGB YVideoDisplay.GetChromaRGB YVideoDisplay.GetModeVideoDisplay.SetModeVideoDisplay.SetAlphaLevel Y Y YVideoDisplay.GetAlphaLevel Y Y YVideoDisplay.SetAspect Y Y YVideoDisplay.GetAspect Y Y YVideoDisplay.SetAVAspectSwitching
Y Y
VideoDisplay.SetAVAspect Y YVideoDisplay.GetAVAspect Y YVideoDisplay.SetTVStandardVideoDisplay.GetTVStandard Y Y YVideoDisplay.SetOutputFmt Y YVideoDisplay.GetOutputFmt Y YVideoDisplay.SetOutputVideoDisplay.GetOutputVideoDisplay.SetMacrovision Y Y Y Macrovision
builds onlyVideoDisplay.GetMacrovision Y Y Y Macrovision
builds onlyVideoDisplay.IgnoreUpdates Y Y Opera:
ami_wm builds only
VideoDisplay.SetTeletext Y Y YVideoDisplay.GetTeletext Y Y YVideoDisplay.SetSubtitles Y Y YVideoDisplay.GetSubtitles Y Y YVideoDisplay.SetClosedCaption
Y Y
VideoDisplay.GetClosedCaption
Y Y
VideoDisplay.RetainMouseState
Y Y
VideoDisplay.RetainAlphaLevel
Y Y
VideoDisplay.UnloadVideo Y Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 15
JMACX functions - supported platforms
AudioControl class
See AudioControl for descriptions.
VideoDisplay.DefaultUnloadVideo
Y Y
VideoDisplay.SetUHFChannel Y YVideoDisplay.GetUHFChannel Y YVideoDisplay.SetRFModState Y YVideoDisplay.GetRFModState Y YVideoDisplay. SetRFModFrequencyTable
Y Y
VideoDisplay.GetRFModFrequencyTable
Y Y
VideoDisplay.SetSubtitlesPreferredLanguage
Y Y
VideoDisplay.GetSubtitlesPreferredLanguage
Y Y
VideoDisplay.SetSubtitlesSecondaryLanguage
Y Y
VideoDisplay.GetSubtitlesSecondaryLanguage
Y Y
VideoDisplay.SetAPS Y YVideoDisplay.GetAPS Y YVideoDisplay.SetAlphaRect YVideoDisplay.SetTeletextFullscreen
Y
VideoDisplay.GetTeletextFullscreen
Y
VideoDisplay.IgnoreSlaveUpdates
Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
Function/attribute callback
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
AudioControl.Event Y Y Y YAudioControl.onVolumeChange
Y Y Y Y
AudioControl.SetVolume Y Y YAudioControl.GetVolume Y Y YAudioControl.SetMute Y Y YAudioControl.GetMute Y Y Y
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 16
JMACX functions - supported platforms
Browser class
See Browser for descriptions.
AudioControl.SetMaxVolume Y Y YAudioControl.GetMaxVolume Y Y YAudioControl.SetDefaultVolume
Y Y Y
AudioControl.GetDefaultVolume
Y Y Y
AudioControl.SetMinVolume Y Y YAudioControl.GetMinVolume Y Y YAudioControl.SetAudioMix Y YAudioControl.SetAC3Outmode Y YAudioControl.GetAC3Outmode Y YAudioControl.SetAC3DRC Y YAudioControl.GetAC3DRC Y YAudioControl.SetAC3Downmix Y YAudioControl.GetAC3Downmix Y YAudioControl.SetAC3Dualmono
Y Y
AudioControl.GetAC3Dualmono
Y Y
AudioControl.SetRFAudioBoost
Y Y
Function/attribute callback
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
BrowserBrowser.SetCacheSizeBrowser.GetCacheSizeBrowser.CacheFlush YBrowser.SetToolbarState Y Y YBrowser.GetToolbarState Y Y YBrowser.GoBack Y Y YBrowser.GoHome YBrowser.Go YBrowser.Action YBrowser.GogiAction Y Gogi Opera
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 17
JMACX functions - supported platforms
AminoGeneric class
See AminoGeneric for descriptions.
Smartcard class
See SmartCard for descriptions.
Browser.Raise Y Y Fresco 0.13.0 and later: ami_wm builds only
Opera: ami_wm builds only
Browser.Lower Y Y Fresco 0.13.0 and later: ami_wm builds only
Opera: ami_wm builds only
Browser.FrameLoadResetsState
Y
Browser.ShowOldContentPeriod
Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
nAminoGeneric.OnEventXX Y YAminoGeneric.Call Y Y YAminoGeneric.Register Y
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
SmartCard.IsPresentSmartCard.IsLoggedOnSmartCard.LogonSmartCard.GetATR
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 18
JMACX functions - supported platforms
TVI class
See TVI for descriptions.
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er
rest
rictio
n
TVI.onEvent Y Y H models onlyTVI.SetTvType Y Y H models onlyTVI.DetectTV Y Y H models onlyTVI.GetIsTvOn Y Y H models onlyTVI.TVOn Y Y H models onlyTVI.TVOff Y Y H models onlyTVI.SetVolume Y Y H models onlyTVI.GetVolume Y Y H models onlyTVI.SetMinVolume Y Y H models onlyTVI.GetMinVolume Y Y H models onlyTVI.SetMaxVolume Y Y H models onlyTVI.GetMaxVolume Y Y H models onlyTVI.SetStartupVolume Y Y H models onlyTVI.GetStartupVolume Y Y H models onlyTVI.VolumeUp Y Y H models onlyTVI.VolumeDown Y Y H models onlyTVI.SetMute Y Y H models onlyTVI.GetMute Y Y H models onlyTVI.SetInput Y Y H models onlyTVI.SetChannel Y Y H models onlyTVI.SetOSD Y Y H models onlyTVI.SetKeyLock Y Y H models onlyTVI.SelectTeletext Y Y H models onlyTVI.SetupClosedCaption Y Y H models only not ZenithTVI.DisplayNumber Y Y H models only Philips onlyTVI.RemoteFormatIn Y Y H models only Philips onlyTVI.Configure Y Y H models only Philips onlyTVI.DisplayText Y Y H models onlyTVI.SystemInfo Y Y H models onlyTVI.GetVersion Y H models onlyTVI.GetFeatures Y H models onlyTVI.LoopbackTest Y H models onlyTVI.ProcessUnhandledKey Y H models onlyTVI.CustomCommand Y H models only
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 19
JMACX functions - supported platforms
PVR class
See PVR for descriptions.
Function/attribute
Fres
co
Ope
ra
Esca
pe
Am
iScr
ipt
Har
dwar
e re
stric
tion
Oth
er b
uild
re
stric
tion
PVR.GetSystemInfo Y hard disk models only
PVR.Record Y hard disk models only
PVR.ListAssets Y hard disk models only
PVR.GetAssetInfo Y hard disk models only
PVR.DeleteAsset Y hard disk models only
PVR.RenameAsset Y hard disk models only
PVR.StopRecording Y hard disk models only
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 20
3 ASTB
3.1 ASTB class
The ASTB class allows interaction with general set-top box functionality.
3.2 ASTB date functions
ASTB.SetDate
void ASTB.SetDate()
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 box’s 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
Return
void.
Parameters Allowed values Descriptionnewdate The RTC date and time to set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 don’t have a real-time clock.
3.3 ASTB system information functions
System information
System information includes details such as version number, MAC address and middleware.
ASTB.GetSystemInfo
string ASTB.GetSystemInfo()
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>.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 22
ASTB
Example of return string:
“<xml><aminoVersion>0.13.7-A110-opera8-1</aminoVersion><aminoCVersion>0.13.6-opera8-1</aminoCVersion></xml>”
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 as“aminet500” 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 box’s 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 box’s 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 flash’s lock status (whether the locking bit is set).
Supported platforms: Fresco, Opera, Escape.
Parameters
None.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
3.4 ASTB power management functions
Power management
The ASTB defines the following modes of operation:
ActiveIdleStand-bySleepOff (this state is dependant on mains power, and so is not under the control of the set-top box software; note also that this state is PCB- and processor-dependent).
Active and Idle states
These are the set-top box’s running states; for both, the screen display and LED on the set-top box are both powered. The set-top box automatically switches between these two states depending on whether it is performing any action requiring input, output or processing. For example, when it boots up, the set-top box runs in active mode (consuming maximum electrical power) until it has completed booting. It then automatically drops to idle mode, reducing the power used. If an action that requires the box to perform some processing it switches back to active mode until it is completed, and then the box returns to idle. No programmatic control or distinction is made between these two states - the switching is fully automatic.
Stand-by state
In this state, the screen output and LED are switched off, and power consumption is reduced to a minimum level. The box can be switched between stand-by and active/idle using the on/off function button on the IR remote control and by the SetPowerState function.
Sleep state
In this state, all external boards are powered down and the box is put in a deeper state of power saving. It takes longer for the box to be activated from sleep than from stand-by.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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:
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 box’s state.
Note: It isn’t 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
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.
State IntegerPOWER_OFF 0POWER_SLEEP 1POWER_STANDBY 2POWER_IDLE 3POWER_ACTIVE 4
Parameters Allowed values Descriptionstate 1 sleep
2 standby
4 active
The power state required.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 26
ASTB
3.5 ASTB mouse pointer functions
ASTB.SetMouseState
void ASTB.SetMouseState(boolean displaystate)
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 doesn’t 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
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.
3.6 ASTB channel functions
ASTB.SelectChannel
void | int ASTB.SelectChannel(int channel_number)
Change the channel to the specified channel number.
Supported platforms: Fresco, Opera, Escape.
Parameters
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.
Parameters Allowed values Descriptiondisplaystate true or false Set true to make mouse pointer
visible; otherwise, set false.
Parameters Allowed values Descriptionchannel_number
0 - 999 Channel number to change to.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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
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.
Parameters Allowed values Descriptionchannel_number
0 - 999 Channel number that you want to set the URL for.
url URL to associate with the channel number.
Parameters Allowed values Descriptionchannel_number
0 - 999 Channel number to retrieve URL for.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 28
ASTB
3.7 ASTB network functions
Network information includes details such as IP addresses and other values for the set-top box, domain name server and other network components, as well as currently assigned DHCP values assigned. A number of functions enable access to this information, depending on whether DHCP is enabled or disabled in the set-top box; for each detail there is a function to access it if DHCP is disabled, and a function to access it DHCP is enabled, including DHCP-specific values. and finding out whether DHCP is enabled. The values are generally derived from values in the NOR flash or the settings file.
ASTB.GetDHCP
string ASTB.GetDHCP()
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).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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()
Returns the IP address assigned by the DHCP server.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 32
ASTB
3.8 ASTB upgrade functions
ASTB.Upgrade
void | int ASTB.Upgrade([string addr, string port])
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 aren’t specified, then they are read from the DHCP server’s configuration (AMINO.addr and AMINO.port vendor options in the fisys class).
Supported platforms: Fresco, Opera, Escape.
Parameters
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).
Parameters Allowed values Description[addr] Multicast upgrade IP address.[port] Multicast upgrade port number.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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).
3.9 ASTB trusted domains functions
ASTB.SetTrustedDomain
void | string ASTB.SetTrustedDomain(int num, string domain, boolean js, boolean macrovision)
Configures a trusted domain entry at the specified position. See the trusted domains documentation for more information.
Supported platforms: Fresco, Opera.
Parameters
Return
Returns void if there is an error parsing one of the input arguments. Otherwise, returns “OK” on success or “FAIL” on error.
Parameters Allowed values Descriptionnum Position to add the trusted domain
entry at. domain 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.
macrovision false or true Set true to enable Macrovision for this domain; false to disable Macrovision.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 function’s 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 Allowed values Descriptionnum Position of trusted domain that you
want to retrieve information about.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 35
ASTB
Return
Fresco: Returns an object that contains the following attributes:Note that if there is an
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.
Attribute Type Descriptiondomain string The full or partial URL or IP address that is trusted.javascript boolean true if JMACX calls are enabled for this domain;
false if JMACX calls are disabled.macrovision boolean true if Macrovision is enabled for this domain;
false if Macrovision is disabled.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns “OK” if successful; otherwise, returns “FAIL password” if the password is incorrect or “FAIL” for other errors.
3.10ASTB configuration functions
Configuration functions allow you to create and set values in the set-top box’s configuration files.
The ASTB.SetConfig and ASTB.GetConfig functions can instruct libconfig to set or read any of the values that it can access in the settings file, hostname file, netconf file and NOR flash. See the Set-top Box Management Configuration Guide for details of the settings.
The ASTB.SetBrowserConfig and ASTB.GetBrowserConfig functions can set or read the following browser configuration (note both settings and values must be entered as strings):
Parameters Allowed values Descriptionpassword The password to enable the
operations from the trusted domain (this is a cleartext password).
Configuration item DescriptionWITH_TRUSTED_DOMAINS Enable or disable trusted domains
(1 or 0, respectively).HOMEPAGE URL for browser home page.
Example: http://www.aminocom.com
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 37
ASTB
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.
HELPPAGE URL for help page. Example: http://www.aminocom.com
USE_PROXY Enable or disable proxy server (1 or 0, respectively).
ACCEPT_COOKIES Accept or don’t accept cookies (1 or 0, respectively).
DISK_CACHE Disk cache size. Example: 4096RAM_CACHE RAM cache size. Example: 4096HTTP_PROXY HTTP proxy in format
<host>:<port>. Example: proxy1:2000
HTTPS_PROXY HTTPS proxy in format <host>:<port>. Example: proxy2:2000
FTP_PROXY FTP proxy in format <host>:<port>. Example: proxy3:2000
NO_PROXY Y for no proxy; N for allow proxy. USE_SMARTCARD Enable or disable Smartcard (1 or 0,
respectively). Opera only.LEFT_MARGIN Width of left margin (percentage).
Example: 4.RIGHT_MARGIN Width of right margin (percentage).
Example: 4.TOP_MARGIN Height of top margin (percentage).
Example: 4.BOTTOM_MARGIN Height of bottom margin
(percentage). Example: 4.COLOUR_MARGIN Margin colour (decimal or
hexadecimal RRGGBB value). Example: 6303776 (decimal). Opera only.
Configuration item Description
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 38
ASTB
Parameters
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
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.
ParametersNone.
ReturnReturns 0 if the changes are successfully stored; otherwise, returns -1.
Parameters Allowed values Descriptionpassword any string 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.
element any string The libconfig configuration element to set (e.g. “SETTINGS.SUBTITLES”).
value any string The value to set the element to. Suitable values depend on the element you are setting.
Parameters Allowed values Descriptionelement any string The libconfig configuration element
(e.g. “NORFLASH.DI”).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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
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.
Parameters Allowed values Descriptionpassword The password for the mngwrite user,
as required for changing settings on the set-top box’s Management pages. See the Set-top box Configuration Pages Administration Guide for more information.
config_item String containing the configuration item to set (see ASTB configuration functions on page 37 for list of configuration items and their values).
value String containing the value to set the specified configuration item. Suitable values depend on the specified config_item.
Parameters Allowed values Descriptionconfig_item 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 40
ASTB
3.11ASTB production functions
The ASTB production functions are available only in builds that include production in their version name. These are intended for development and test only and should be not be available after manufacture.
ASTB.Reflash
long ASTB.Reflash()
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 non-zero 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
Return
Returns 0 if successful; returns 1 if there is an error.
ASTB.HDDTest
long ASTB.HDDTest()
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 it’s 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.
Parameters Allowed values Descriptionstate 0 or 1 Set 0 to call script with stop mode; 1 to
call script with force mode.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
void.
ASTB.SetRFPassthrough
void ASTB.SetRFPassthrough(int passthrough)
Turns the RF passthrough on or off.
Supported platforms: Fresco, Opera. Production builds only.
Parameters
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 smartcard’s serial number as a string; if there is no card present, this string is returned as”0000000000”.
ASTB.SetFanState
void ASTB.SetFanState(int speed)
Sets the fan speed.
Supported platforms: Fresco, Opera. AmiNET500 only. Production builds only.
Parameters Allowed values Descriptionchannel The channel to change to. The
channel range available depends on the territory that the set-top box operates in.
Parameters Allowed values Descriptionpassthrough 0 or 1 Set 0 to disable passthrough (i.e.
enable RF module); 1 to enable passthrough (i.e. disable RF module).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 42
ASTB
Parameters
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 Allowed values Descriptionspeed 0 - 100 The percentage to set fan speed to.
Parameters Allowed values Descriptionfilename Name of the file (which has a hex
extension and is found in /mnt/nv).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 simulatorthe dual line simulator must be connected to a modem set to 2400 baud 8N1the 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
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).
Parameters Allowed values Descriptiondialling_string
The init/dialling string to use for testing. For example: “AT\rATH0\rAT\rATSF5=28SF6=23\rAT\rATDT120\r”
This test string would perform the following:
check modem readyhang upcheck modem readyset modem to UK phone system settingscheck modem readytone-dial 120
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 44
ASTB
3.12ASTB miscellaneous functions
ASTB.DefaultKeys
void ASTB.DefaultKeys(boolean default_keys)
Configures whether the browser uses the default key interpretation.
Supported platforms: Fresco, Opera.
Parameters
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
Return
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.
Parameters Allowed values Descriptiondefault_keys true or false Set true to enable default key
interpretation; false to disable it.
Parameters Allowed values Descriptionkey Available keys, as in separate list of key codes
- List of key codes on page 153.
Also see ASTB.SetChannel for how to map the number keys to channel URLs.
The key to set the function for.
action 1 - 48
See separate list of action codes for details - List of action codes on page 156.
Note that 1-48 can be used for both Fresco and Opera; 49-58 are Opera only.
The action to associate with the key.
[optional_arg]
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 actions.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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
Return
Returns void if there’s 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.
Parameters Allowed values Descriptionfilename This parameter is not currently used,
so enter any non-NULL string value.
Parameters Allowed values Descriptioncode The keycode to be transmitted.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 46
ASTB
Parameters
Return
Returns void if there’s 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
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
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 doesn’t 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).
Parameters Allowed values Descriptionindex The IR blasting type suitable for the
current TV system.
Parameters Allowed values Descriptionchannels false or true Set true to enable; false to disable.
Parameters Allowed values Descriptiongcluster_command
Command to pass to the Gcluster games library.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 Allowed values Descriptionpref_string preferenceslang
preferences language
historylang
history language
bookmarkslang
bookmarks language
bookmarksclose
bookmarks: close button
bookmarksheadingtitle
string above the bookmark's title
bookmarksheadinglocation
string above the bookmark's location
historypagetitle
history: page title
The string to retrieve the value of. Note that these strings are not case-sensitive.
historyclose
history: close button
historyheadingtitle
history: heading title string
historyheadinglocation
history: heading location string
historyheadingfirst
history: heading first string
historyheadinglast
history: heading last string
historyheadingvisits
history: heading number of visits string
preferencespagetitle
preferences: page title
preferencespageoption
preferences: option text
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 48
ASTB
preferenceskbmenu
preferences: keyboard menu
preferencesaudmenu
preferences: audio menu
preferencessubtitlemenu
preferences: subtitle menu
preferencesmainpage
preferences: back to main page
preferencespageexit
preferences: how to exit
preferenceskeyboard
preferences: keyboard
preferenceskbrepeatdelay
preferences: keyboard repeat delay
preferenceskbrepeatrate
preferences: keyboard repeat rate
preferenceskbtextentry
preferences: keyboard remote text entry
preferencesvolume
preferences: volume
preferencesminvolume
preferences: minimum volume
preferencesoutputformat
preferences: video output format
preferencesmaxvolume
preferences: maximum volume
preferencesmpanscan
preferences: TV display format - panscan
preferencesdmletterbox
preferences: TV display format - letterbox
preferencesmwidescreen
preferences: display format - widescreen
preferencesoutcomposite
preferences: video output - composite
preferencesoutsvideo
preferences: video output - S-Video
Parameters Allowed values Description
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 49
ASTB
preferencesoutcomprgb
preferences: video output - composite+RGB
preferencesoutcompsvideo
preferences: video output - composite+Svideo
preferencesoutcomplbr
preferences: video output - composite+LBR
preferencesaudiochoices
preferences: audio
preferencesprimarylang
preferences: audio - primary language
preferencessecondarylang
preferences: audio - secondary language
preferencessubenable
preferences: audio - subtitles on/off
preferencessublangmain
preferences: audio - subtitle primary language
preferencessublangsec
preferences: audio - subititle secondary language
preferencessubmit
preferences: save changes
preferencescancel
preferences: cancel
preferencesreset
preferences: reset
preferencesfreqtable
preferences: frequency table
preferencesbroadcast
preferences: broadcast
preferencescable
preferences: cable
preferencesrfchannel
preferences: RF channel
preferencesuserf
preferences: use RF
preferencesrcimemenu
preferences: remote control IME menu
Parameters Allowed values Description
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 50
ASTB
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
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.
preferencesrcimepagetitle
preferences: remote control IME page title
preferencesrcimelowercase
preferences: remote control IME lowercase mode table
preferencesrcimeuppercase
preferences: remote control IME uppercase mode table
preferencesrcimenumerics
preferences: IME numerics mode table
preferencestimeout
preferences: remote control IME timeout
preferencesdefmode
preferences: RC IME default mode table
preferencesrcimedeflang
preference: remote control IME default language
Parameters Allowed values Description
Parameters Allowed values Descriptionstate true or false State to set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 51
ASTB
Return
Returns 0.
ASTB.SetKBDelay
int ASTB.SetKBDelay(int delay)
Sets the keyboard delay rate.
Supported platforms: Fresco, Opera.
Parameters
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
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.
Parameters Allowed values Descriptiondelay 1 - 4 Delay rate. Each integer in the
allowed range represents 22.5 centi-seconds. The standard default is 2 (45 centi-seconds).
Parameters Allowed values Descriptiondelay >0 Repeat rate, in centi-seconds. The
standard default is 8.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 53
ASTB
Parameters
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
Return
void.
ASTB.ErrorString
void ASTB.ErrorString(string msg)
Writes the specified string as the message for DBG_ERR.
Supported platforms: Fresco, Opera.
Parameters
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 Allowed values Descriptionsession The VNC session name to start.
Parameters Allowed values Descriptionmsg The message to write to DBG_WARN.
Parameters Allowed values Descriptionmsg The message to write to DBG_ERR.
Parameters Allowed values Descriptionledtext “LEFT”, “CENTRE” or
“RIGHT”The LED that you want to set the value of. If the set-top box has only one LED, then use “LEFT”.
status 0 LED on
1 LED off
2 LED flashing
The status to set the LED to.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 54
ASTB
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
Return
Fresco: Returns void on error. Otherwise, returns one of the following values:
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
Return
Returns 0 if the port is enabled/disabled successfully; otherwise, returns -2 (if the function is called on a set-top box that doesn’t have a second Ethernet port, a message is also output to the debug port).
flash_on 0 - 255 The period that the LED is on for, in centi-seconds (if the LED is set to flash)
flash_off 0 - 255 The period that the LED is off for, in centi-seconds (if the LED is set to flash).
Parameters Allowed values Description
Parameters Allowed values Descriptionledtext “LEFT”, “CENTRE” or
“RIGHT”The LED that you want to see the value of. If the set-top box has only one LED, then use “LEFT”.
Value Meaning0 LED off1 LED on2 LED flashing
Parameters Allowed values Descriptionstate false or true Set true to enable the Ethernet port;
false to disable it.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns 0 if successful; returns -2 on error.
ASTB.GetInternalVLANid
int ASTB.GetInternalVLANid()
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
Return
Returns 0 if successful; returns -2 on error.
ASTB.GetExternalVLANid
int ASTB.GetExternalVLANid()
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.
Parameters Allowed values Descriptionid 0 - 4095 The VLAN ID to set.
Parameters Allowed values Descriptionid 0 - 4095 The VLAN ID to set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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
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.
Parameters Allowed values Descriptionport 1, 2 or 3 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.
rate 0 - 4095 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.
Parameters Allowed values Descriptionport 1, 2 or 3 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 57
ASTB
Parameters
Return
Returns 0 if successful; otherwise, returns -2 on error.
ASTB.Sleep
void ASTB.Sleep(string time)
Instructs the set-top box to sleep (i.e. lock the browser and Javascript interpreter) for the specified time.
Supported platforms: Fresco, Opera.
Parameters
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
Return
Returns 0 if the file doesn’t exist; 1 if it does.
Parameters Allowed values Descriptionstate false or true Set false to disable VLAN tagging;
true to enable it.
Parameters Allowed values Descriptiontime The length of time to sleep for (in
seconds).
Parameters Allowed values Descriptionfilename File name or fully qualified path to
test.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 58
4 AVMedia
4.1 AVMedia class
The AV media class allows control over AV media settings and play-back.
4.2 AVMedia event-handler attributes
AVMedia.Event
int AVMedia.Event
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);
}
Usage example (Opera/Escape):
AVMedia.onEvent=”handle_event()”;
function handle_event()
{
alert(“Event Code = “ + AVMedia.Event);
}
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 Meaning1 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.
2 RTSP_SEND_FAILED
An RTSP command couldn’t be sent to the server.3 RTSP_READ_FAILED
A response to an RTSP command couldn’t be read.4 RTSP_CONNECTION_DIED
The RTSP connection died.5 RTSP_STATUS_LINE
Deprecated.6 RTSP_STATUS_PLAYING
Media is playing. This message will be received approximately once every 20 seconds.
7 RTSP_STATUS_ANNOUNCE
Message sent by the RTSP server. The only server message that don’t fall into this category is the end of stream message 8.
8 RTSP_STATUS_END_OF_STREAM
The current asset has finished playing.9 RTSP_STATUS_NOT_FOUND
Asset not found on server.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 60
AVMedia
10 STATUS_NO_VIDEO
Either video requested from a server that doesn’t exist or the video asset requested doesn’t exist.
11 IGMP_STATUS_END_OF_STREAM
End of IGMP stream (or multicast connection lost).12 RTSP_CONNECTION_STOPPED
The server stopped the connection.13 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.
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.16 UDP_STATUS_END_OF_STREAM
End of a UDP stream detected.17 UDP_STATUS_PLAYING
A UDP stream is playing18 MP3S_STATUS_END_OF_STREAM
Reached the end of the current MP3 file.19 AUD_DESCRIP_READY
Callback to indicate that the session description of the current asset has been read.
20 RTSP_STATUS_START_OF_STREAM
Start of an RTSP stream detected.21 MP3S_STATUS_START_OF_STREAM
Start of an MP3 stream detected.22 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.
23 STATUS_PMT_CHANGED
The PMT in the incoming transport stream has changed.24 PVRS_STATUS_PLAYING
A PVR clip is playing.25 PVRS_STATUS_END_OF_STREAM
End of a UDP stream detected.
Code Meaning
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 61
AVMedia
4.3 AVMedia functions
AVMedia.Play
int AVMedia.Play(string src)
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
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.
31 WEBFETCH_STARTED
Start of web fetch detected.32 WEBFETCH_CONNECT_FAILED
Web fetch server connection failed.33 WEBFETCH_START_STREAMING
Web fetch streaming detected.34 WEBFETCH_END_OF_STREAM
End of web fetch stream detected.36 WEBFETCH_KILLED
Web fetch killed.
Code Meaning
Parameters Allowed values Descriptionsrc “src=<URL>” The URL for the media content (for
formats, see Media source URLs on page 150). For example: “src=igmp://123.4.5.67:11111”
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 63
AVMedia
Supported platforms: Fresco, Opera, Escape.
Parameters
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
Return
Returns 0.
Parameters Allowed values Descriptionposition Position to play from, in seconds
relative to the current position of the stream.
Parameters Allowed values Descriptionposition Position to play from, in milliseconds
relative to the current position of the stream.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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.
Parameters Allowed values Descriptionspeed -6 to 6 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 on1 normal play0.5 half speed0 pause-1 reverse play-6 reverse at 6 x normal speed
Values can also be 3.75, 1.5, and so on.
AVMedia.GetPlaySpeed
float AVMedia.GetPlaySpeed()
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 on1 normal play0.5 half speed0 pause-1 reverse play-6 reverse at 6 x normal speed
Values can also be 3.75, 1.5, and so on.
AVMedia.GetFormat
void | string AVMedia.GetFormat()
Retrieves the format of the current media stream.
Supported platforms: Fresco, Opera, Escape.
Parameters
None.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 66
AVMedia
Return
Returns void if video control support is not compiled. Otherwise, returns one of the following values:
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
Return
Returns 0 on success or if video control has not been compiled. Otherwise, returns a non-zero 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.
Value Meaning“PAL” PAL encoded video“NTSC” NTSC encoded video“Unknown” Unknown format
Parameters Allowed values Descriptionfade_out_time
The fade-out time, in seconds.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 67
AVMedia
Return
Returns void if video control support is not compiled. Otherwise, returns one of the following protocol values:
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
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.
Value Meaning“RTSP” RTSP media stream“MULTICAST” IGMP media stream“Unknown” other error
Parameters Allowed values DescriptionvideoServer “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)
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”).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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:
Parameters Allowed values Descriptionpid The PID to use.ac3 0 MPEG
1 AC3
Stream type. If you don’t include this parameter, the default value 0 is used.
Attribute Type Descriptionpids int Number of audio PIDS for the current stream.Array[1 ... PIDs]
object Array of objects (this array is only returned if the total number of PIDs is greater than zero).
Array[x].AudioPID
unsigned int
Value of this PID.
Array[x].AudioLanguage
string Language tag associated with this PID.
Array[x].AudioLanguage2
string Secondary language tag associated with this PID.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 69
AVMedia
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
Result long One of the following result codes:
0 - success
1 - no program error
2 - bad index error
3 - out of memory error
4 - resource failure error
Attribute Type Description
Parameters Allowed values Descriptionstate true or false Set true to hide video plane output;
false to display it.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 70
AVMedia
Return
Returns 0 on success or if AVMedia support is not compiled. Otherwise, returns a non-zero value.
AVMedia.SetPrimaryAudioLanguage
void AVMedia.SetPrimaryAudioLanguage(string language, [int persist])
Sets the primary audio language.
Supported platforms: Fresco, Opera.
Parameters
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 Allowed values Descriptionlanguage Language to set. Can be any ISO
639-2 code. E.g.: “rus” or “rus/ru”.[persist] 1 or 0 Specifies whether the setting is written
to the set-top box’s stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you don’t 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.
Parameters Allowed values Description[persist] 1 or 0 Specifies whether to retrieve the
setting from the set-top box’s stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you don’t 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 can’t 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
Return
void.
AVMedia.GetSecondaryAudioLanguage
string AVMedia.GetSecondaryAudioLanguage([int persist]) Fresco
void | string AVMedia.GetSecondaryAudioLanguage([int persist]) Opera
Returns the secondary audio language.
Supported platforms: Fresco, Opera.
Parameters Allowed values Descriptionlanguage Language to set. Can be any ISO
639-2 code. E.g.: “rus” or “rus/ru”.[persist] 1 or 0 Specifies whether the setting is written
to the set-top box’s stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you don’t 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 72
AVMedia
Parameters
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 can’t 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
Return
Fresco: Returns one of the following values:
Parameters Allowed values Description[persist] 1 or 0 Specifies whether to retrieve the
setting from the set-top box’s stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you don’t 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.
Parameters Allowed values Descriptionlanguage Language to set. Can be any ISO
639-2 code. E.g.: “rus” or “rus/ru”.[persist] 1 or 0 Specifies whether the setting is written
to the set-top box’s stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you don’t set this, then the default value 0 is used.
Value Meaning“OK” Successfully changed subtitle
language.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 73
AVMedia
Opera: Returns 0 on success. Otherwise, returns void.
.
AVMedia.GetPrimarySubtitleLanguage
string AVMedia.GetPrimarySubtitleLanguage([int persist]) Fresco
void | string AVMedia.GetPrimarySubtitleLanguage([int persist]) Opera
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
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:
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.
“Failed to read persist parameter”
The persist parameter was not a valid number.
“Failed to read language parameter”
The language parameter was not a valid string.
“Failed to set subtitles primary language”
Subtitle language couldn’t be changed.
“Subtitles not supported” Subtitles are not enabled in the build.
Value Meaning
Parameters Allowed values Description[persist] 1 or 0 Specifies whether to retrieve the
setting from the set-top box’s stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you don’t set this, then the default value 0 is used.
Value Meaning“Failed to read persist parameter”
The persist parameter was not a valid number.
“Subtitles not supported” Subtitles are not enabled in the build.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Fresco: Returns one of the following values:
Opera: Returns 0 on success. Otherwise, returns void.
.
AVMedia.GetSecondarySubtitleLanguage
string AVMedia.GetSecondarySubtitleLanguage([int persist]) Fresco
void | string AVMedia.GetSecondarySubtitleLanguage([int persist]) Opera
Returns the secondary subtitle language.
Supported platforms: Fresco, Opera.
Current behaviour introduced in Fresco 0.14.0.
Parameters Allowed values Descriptionlanguage Language to set. Can be any ISO
639-2 code. E.g.: “rus” or “rus/ru”.[persist] 1 or 0 Specifies whether the setting is written
to the set-top box’s stored configuration. Set 1 to write the setting to configuration; otherwise set 0 (the setting is lost on reboot). If you don’t set this, then the default value 0 is used.
Value Meaning“OK” Successfully changed subtitle
language.“Failed to read persist parameter”
The persist parameter was not a valid number.
“Failed to read language parameter”
The language parameter was not a valid string.
“Failed to set subtitles secondary language”
Subtitle language couldn’t be changed.
“Subtitles not supported” Subtitles are not enabled in the build.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 75
AVMedia
Note: Preferred equivalent in Opera: VideoDisplay.GetSubtitlesSecondaryLanguage.
Parameters
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:
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)
Supported platforms: Fresco, Opera. Flexcipher builds only.
Parameters
Return
void.
AVMedia.SetKeyID
void AVMedia.SetKeyID(string parameter)
Supported platforms: Fresco, Opera. Flexcipher builds only.
Parameters
Return
void.
Parameters Allowed values Description[persist] 1 or 0 Specifies whether to retrieve the
setting from the set-top box’s stored configuration, or the current setting in use. Set 1 to retrieve from configuration; otherwise set 0. If you don’t set this, then the default value 0 is used.
Value Meaning“Failed to read persist parameter”
The persist parameter was not a valid number.
“Subtitles not supported” Subtitles are not enabled in the build.
Parameters Allowed values Descriptionparameter Key parameter.
Parameters Allowed values Descriptionparameter Key ID.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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 can’t 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.
Parameters Allowed values Descriptionstate 0 or 1 Set 0 to set standard definition mode;
set 1 to enable high definition mode.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 alpha-blending, 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.
5.2 VideoDisplay functions
PiG display
Scaled video can be displayed on top of the graphics, as a picture-in-graphics (PiG) display. The position of the PiG display can be set via functions in this class, but note that applicable position coordinates depend on the TV output standard and the size of the video display - e.g. whether it is full screen. Position coordinates are specified as the position of the top-left corner of the PiG display, in relation to the bottom-left corner of the main screen display.
As a general rule, the x and y coordinates are as follows, but you are recommended to trial settings for optimal positioning:
PAL full screen: x maximum is 720 minus the width of the PiG hole; y maximum is 576PAL not full screen: x maximum is 640 minus the width of the PiG hole; y maximum is 518NTSC full screen: x maximum is 720 minus the width of the PiG hole; y maximum is 480NTSC not full screen: x maximum is 640 minus the width of the PiG hole; y maximum is 438
All minimum values are 0.
VideoDisplay.FullScreen
void VideoDisplay.FullScreen(int state)
Enables or disables the full screen video display.
Supported platforms: Fresco, Opera, Escape.
Parameters
Parameters Allowed values Descriptionstate 1 or 0 Set 1 to enable the full screen video
display; 0 or any other number to disable it.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns 0 on success, -1 on error (including if video support is not enabled in the build).
Parameters Allowed values Descriptionstate 1 or 0 Set 1 to enable the PiG display; 0 to
disable it.scale -1 use previous value
1 full screen
2 half screen
4 quarter screen
The scale factor for the video in the PiG display.
x See PiG display on page 79.
The horizontal position of the PiG display. Set -1 to return to previous value.
y See PiG display on page 79.
The horizontal position of the PiG display. Set -1 to return to previous value.
[mandisp] 0 automatic configuration
1 manual configuration
-1 return to previous value
Sets whether PiG is manually configured.
[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 box’s configuration or is only used until the set-top box reboots. If you don’t include this setting, the default value -1 is used. Note that mandisp must be set if you are setting persist.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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:
Parameters Allowed values Descriptionscale 1 full screen
2 half screen
4 quarter screen
The scale.
Value Meaning1 full screen2 half screen4 quarter screen
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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.
Parameters Allowed values Descriptionx See PiG display on page
79. The horizontal position of the PiG display.
y See PiG display on page 79.
The horizontal position of the PiG display.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 y-coordinates 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
Return
Returns 0 on success; non-zero on error.
VideoDisplay.GetChromaKey
long VideoDisplay.GetChromaKey()
Retrieves the chroma-key RGB colour value as a decimal.
Supported platforms: Fresco, Opera, Escape.
Parameters
None.
Parameters Allowed values Descriptionrgb The chroma-key value. This must be a
hexadecimal value, in the format RRGGBB. For example: VideoDisplay.SetChromaKey(0X603020)(hex) or VideoDisplay.SetChromaKey(6303776)(decimal)
red 0 - 255 Hexadecimal or decimal equivalent for red colour value.
green 0 - 255 Hexadecimal or decimal equivalent for green colour value.
blue 0 - 255 Hexadecimal or decimal equivalent for blue colour value.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 83
VideoDisplay
Return
Returns the RGB value as a decimal.
VideoDisplay.SetChromaRGB
void VideoDisplay.SetChromaRGB(int r, int b, int g)
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
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 Allowed values Descriptionr Hexadecimal or decimal equivalent
for R colour value.g Hexadecimal or decimal equivalent
for G colour value.b Hexadecimal or decimal equivalent
for B colour value.
Parameters Allowed values Descriptionmode 0 640x518 RGB555 with
separate Alpha blend byte
1 640x438 RGB555 with separate Alpha blend byte
The mode to set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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):
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
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.
Value Meaning0 640x518 RGB555 with separate
Alpha blend byte1 640x438 RGB555 with separate
Alpha blend byte
Parameters Allowed values Descriptionalpha 0 - 100 Blend level as a percentage, where 0
means graphics are fully transparent; 100 means graphics are fully opaque.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns one of the following values:
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:
Parameters Allowed values Descriptionaspect 1 4:3 pan and scan
2 4:3 letterbox
3 16:9
Aspect option.
Value Meaning“OK” Successfully changed aspect.“Invalid aspect value specified”
Parameter entered was not in the range 0 - 3.
“Failed to read aspect parameter”
Parameter entered was not a valid number.
“Failed to set aspect” Aspect couldn’t be changed.“Video control not supported” Video support is not enabled in the
build.
Value Meaning1 4:3 pan and scan 2 4:3 letterbox3 16:9
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns one of the following values:
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 Allowed values Descriptionmode 0 or 1 Set 0 to disable automatic audio-
switching; set 1 to enable automatic audio-switching.
Value Meaning“OK” Success.“Failed to read mode parameter”
Parameter entered was not a valid number.
“Failed to set AV aspect switching”
Aspect switching couldn’t be changed.
“Video control not supported” Video support is not enabled in the build.
Parameters Allowed values Descriptionaspect 0 off
1 on (restores previous non-OFF value)
2 4:3
3 16:9
The aspect to set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 87
VideoDisplay
Return
Returns one of the following values:
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:
VideoDisplay.SetTVStandard
void VideoDisplay.SetTVStandard(string standard)
Sets the television standard.
Supported platforms: Fresco, Opera. Not currently supported.
Value Meaning“OK” Successfully changed aspect.“Invalid aspect value specified”
Parameter entered was not in the range 0 - 3.
“Failed to read aspect parameter”
Parameter entered was not a valid number.
“Failed to set aspect” Aspect couldn’t be changed.“Video control not supported” Video support is not enabled in the
build.
Value Meaning0 off1 on2 4:33 16:9
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 88
VideoDisplay
Parameters
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:
VideoDisplay.SetOutputFmt
string VideoDisplay.SetOutputFmt(string format, [int persist])
Sets the video output format.
Supported platforms: Fresco, Opera.
Parameters Allowed values Descriptionstandard “PAL-I”
“PAL-M”
“PAL-(c)N”
“PAL-G”
“PAL-B”
“PAL-H”
“PAL-D”
“NTSC-J”
“NTSC-M”
The standard to set.
Value Meaning“PAL-I” PAL (e.g. UK)“PAL-M” PAL (e.g. Brazil)“PAL-(C)N” PAL (e.g. Argentina)“PAL-G” PAL (Europe)“PAL-B” PAL (e.g. Australia, Ghana)“PAL-H” PAL (e.g. Belgium)“PAL-D” PAL (e.g. China)“NTSC-J” NTSC (Japan) mode“NTSC-M” NTSC (US) mode“Unknown” set-top box is set to an unhandled mode
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 89
VideoDisplay
Current behaviour introduced in Fresco 0.13.1; Opera 0.13.0.
Parameters
Return
Returns one of the following values:
Parameters Allowed values Descriptionformat “CVBS-RGBOFF”
Composite
“CVBS-RGBON” Composite and RGB
“LC-RGBOFF” S-video
“LC-RGBON” S-video and RGB
“CVBS-LC” Composite and S-Video
“CVBS-LBR” Composite and Component (YPbPr)
“LBR-CVBS-LC” Composite, S-Video and Component (YPbPr)
“RGB-CVBS-LC” Composite, S-Video and RGB
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.
[persist] 1 or 0 Sets whether the value set is stored permanently in the set-top box’s 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 don’t include this setting, the default value 0 is used.
Value Meaning“OK” Successfully changed output
format.“Invalid output format specified”
Parameter entered is not a recognised output format string.
“Failed to read format parameter”
Parameter entered could not be read as a valid string.
“Failed to read persist parameter”
Parameter entered could not be read as a valid number
“Failed to set output format” Output format couldn’t be changed.“Video control not supported” Video support is not enabled in the
build.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 90
VideoDisplay
VideoDisplay.GetOutputFmt
void | string VideoDisplay.GetOutputFmt([int persist])
Retrieves the video output format.
Supported platforms: Fresco, Opera.
Parameters
Return
Returns void if video control support is not compiled. Otherwise, returns one of the following values:
VideoDisplay.SetOutput
int VideoDisplay.SetOutput(int output)
Sets the video output format.
Supported platforms: Fresco. Opera.
Note: Deprecated. Use VideoDisplay.SetOutputFmt
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you don’t include this setting, the default value 0 is used.
Value Meaning“CVBS-RGBOFF” Composite“CVBS-RGBON” Composite and RGB“LC-RGBOFF” S-video“LC-RGBON” S-video and RGB“CVBS-LC” Composite and S-Video“CVBS-LBR” Composite and Component (YPbPr)“LBR-CVBS-LC” Composite, S-Video and Component
(YPbPr)“RGB-CVBS-LC” Composite, S-Video and RGB
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 91
VideoDisplay
Parameters
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
Return
void.
Parameters Allowed values Descriptionoutput OR-concatenation of the
following:
1 RGB
2 UHF
4 Composite
8 S-Video
16 LBR (YPbPr/Component)
The output format to set.
Parameters Allowed values Descriptionmode Refer to your
Macrovision licence for the values to set for each mode.
Mode byte to set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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
Return
Returns one of the following values:
Parameters Allowed values Descriptionignore 1 or 0 Set 1 to disable updates; 0 to enable
updates (any value other than 1 will also enable updates).
Parameters Allowed values Descriptionenable 1 or 0 Set true to enable teletext VBI
insertion; false to disable it.
Value Meaning“OK” Successfully set teletext state.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 93
VideoDisplay
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
Return
Returns one of the following values:
“Failed to read enable parameter”
Value entered for enable parameter is not a valid number.
“Failed to set teletext enable”
Teletext state couldn’t be set.
“Teletext not supported” Teletext support is not enabled in the build.
Value Meaning
Parameters Allowed values Descriptionenable 1 or 0 Set 1 to enable subtitle display; 0 to
disable it.[persist] 1 or 0 Sets whether the value set is stored
permanently in the set-top box’s 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 don’t include this setting, the default value 1 is used.
Value Meaning“OK” Successfully set subtitles.“Failed to read persist parameter”
Value entered for optional persist parameter is not a valid number.
“Failed to read enable parameter”
Value entered for enable parameter is not a valid number.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 94
VideoDisplay
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
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
Return
Returns one of the following values:
“Subtitles not supported” Subtitle support is not enabled in the build.
Value Meaning
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you don’t include this setting, the default value 1 is used.
Parameters Allowed values Descriptionclosedcaption
0 or 1 Set 1 to enable closed caption display; 0 to disable it.
Value Meaning“OK” Successfully set closed captions.“Failed to read closedcaption value”
Value entered for closedcaption parameter is not a valid number.
“Failed to set closed caption” Closed captions couldn’t be set.“Closed caption not supported” Closed captions support is not
enabled in the build.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns 0 on success; -1 on error.
VideoDisplay.RetainAlphaLevel
int VideoDisplay.RetainAlphaLevel(boolean state)
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
Return
Returns 0 on success; -1 on error.
Parameters Allowed values Descriptionstate false or true Set true to retain the mouse state;
false to reset the mouse state when a new page is displayed.
Parameters Allowed values Descriptionstate false or true Set true to retain the alpha level;
false to reset the alpha level when a new page is displayed.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns one of the following values:
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
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.
Parameters Allowed values Descriptionunload false or true Set true to stop video while the page
is unloaded; otherwise set false.
Value Meaning“OK” Success.“Failed to read unload parameter”
Value entered for unload parameter is not a boolean.
“Video control not supported” Video control support is not enabled in the build.
Parameters Allowed values Descriptionunload false or true Set true to stop video while the page
is unloaded; otherwise set false.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 97
VideoDisplay
Parameters
Return
Returns one of the following values:
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
Return
Returns void if there is an error parsing the parameter entered. Otherwise, returns a channel number (note that 0 can indicate an error).
Parameters Allowed values Descriptionchannel The RF output channel[persist] 1 or 0 Sets whether the value set is stored
permanently in the set-top box’s 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 don’t include this setting, the default value 0 is used.
Value Meaning“OK” Successfully set RF channel.“Invalid persist value specified”
Value entered for persist parameter is not 0 or 1.
“Failed to read channel parameter”
Value entered for channel parameter is not a valid number.
“Failed to read persist parameter”
Value entered for persist parameter is not a valid number.
“Failed to set RF mod channel” RF channel couldn’t be changed.“RF control not supported” RF is not enabled in the build.
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration setting; 0 for the current setting. If you don’t include this setting, the default value 0 is used.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns one of the following values:
VideoDisplay.GetRFModState
void | long VideoDisplay.GetRFModState([int persist])
Retrieves the state of the RF modulator.
Supported platforms: Fresco, Opera.
Parameters
Parameters Allowed values Descriptionenable 1 or 0 Set 1 to enable the RF modulator; 0
to disable it.[persist] 1 or 0 Sets whether the value set is stored
permanently in the set-top box’s 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 don’t include this setting, the default value 0 is used.
Value Meaning“OK” Successfully set RF modulator.“Failed to read persist parameter”
Value entered for optional persist parameter is not a valid number.
“Failed to read enable parameter”
Value entered for enable parameter is not a valid number.
“Failed to set RF mod state” RF modulator couldn’t be set.“RF control not supported” RF is not enabled in the build.
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you don’t include this setting, the default value 0 is used.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns one of the following values:
VideoDisplay.GetRFModFrequencyTable
void | string VideoDisplay.GetRFModFrequencyTable([int persist])
Retrieves the RF modulator frequency table.
Supported platforms: Fresco, Opera.
Parameters Allowed values Descriptiontable “CABLE” or
“BROADCAST”The RF modulator frequency table.
[persist] 1 or 0 Sets whether the value set is stored permanently in the set-top box’s 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 don’t include this setting, the default value 0 is used.
Value Meaning“OK” Successfully set RF frequency
table.“Failed to read persist parameter”
Value entered for optional persist parameter is not a valid number.
“Invalid frequency table specified”
Value entered for table parameter is not one of the allowed strings.
“Failed to read table parameter”
Value entered for table parameter can’t be read as a string.
“Failed to set RF mod frequency table”
RF frequency table couldn’t be set.
“RF control not supported” RF is not enabled in the build.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 100
VideoDisplay
Parameters
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
Return
Returns one of the following values:
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you don’t include this setting, the default value 0 is used.
Parameters Allowed values Descriptionlanguage The language to set (any ISO 639-2
language string).[persist] 0 or 1 Sets whether the value set is stored
permanently in the set-top box’s 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 don’t include this setting, the default value 0 is used.
Value Meaning“OK” Successfully set subtitle language.“Failed to read persist parameter”
Value entered for optional persist parameter is not a valid number.
“Failed to read language parameter”
Value entered for enable parameter is not a valid string.
Failed to set subtitles preferred language
Subtitle language couldn’t be set.
“Subtitles not supported” Subtitle support is not enabled in the build.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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
Return
Returns one of the following values:
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you don’t include this setting, the default value 0 is used.
Parameters Allowed values Descriptionlanguage The language to set (ISO 639-2
language string).[persist] 0 or 1 Sets whether the value set is stored
permanently in the set-top box’s 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 don’t include this setting, the default value 0 is used.
Value Meaning“OK” Successfully set subtitle language.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 102
VideoDisplay
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
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
Return
Returns -1 if the parameter entered is invalid or if Macrovision is not supported. Otherwise, returns 0 on success.
“Failed to read persist parameter”
Value entered for optional persist parameter is not a valid number.
“Failed to read language parameter”
Value entered for enable parameter is not a valid string.
Failed to set subtitles secondary language
Subtitle language couldn’t be set.
“Subtitles not supported” Subtitle support is not enabled in the build.
Value Meaning
Parameters Allowed values Description[persist] 1 or 0 Sets whether to retrieve the current
value or the value stored in the set-top box’s permanent configuration. Set 1 for the permanent configuration settting; 0 for the current setting. If you don’t include this parameter, the default value 0 is used.
Parameters Allowed values Descriptionmode 0 - 3 The mode to set (as in APS
specification).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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 Allowed values Descriptionstate 0 or 1 Set 1 to enable full screen teletext; 0
to disable it.
Parameters Allowed values Descriptionx Horizontal position of top-left corner of
rectangle.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 104
VideoDisplay
Return
void.
VideoDisplay.IgnoreSlaveUpdates
void VideoDisplay.IgnoreSlaveUpdates(int enable, [int id])
Enables or disables whether slave updates are ignored.
Supported platforms: Opera.
Parameters
Return
void.
y Vertical position of top-left corner of rectangle.
w Width of rectangle.h Height of rectangle.alpha Alpha blend value.
Parameters Allowed values Description
Parameters Allowed values Descriptionenable 1 or 0 Set 1 to ignore slave updates;
otherwise set 0.[id] ID. The default ID is 0.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 105
6 AudioControl
6.1 AudioControl class
The AudioControl class enables interaction with the set-top box’s audio system.
6.2 AudioControl event-handler attributes
AudioControl.Event
int AudioControl.Event
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();” ;
function handle_volume_change()
{
alert(“Volume has been changed” ) ;
}
Usage example (Opera/Escape):
AudioControl.onVolumeChange = “handle_volume_change();”
function handle_volume_change()
{
alert(“Volume has been changed.”) ;
}
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 106
AudioControl
6.3 AudioControl functions
AudioControl.SetVolume
int AudioControl.SetVolume(int volume) Fresco
void | int AudioControl.SetVolume(int volume) Opera
Sets the current set-top box volume level.
Supported platforms: Fresco, Opera, Escape.
Parameters
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 can’t 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.
Parameters Allowed values Descriptiontype 0 - 100 (actual range
dependent on min. and max. values set)
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.)
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 107
AudioControl
Parameters
Return
Returns void if the parameter entered can’t be parsed or non-zero for other error (Fresco only). Otherwise, returns 0.
AudioControl.GetMute
void | long AudioControl.GetMute()
Retrieves the set-top box’s 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
Return
Fresco: Returns 0 on success; non-zero on error.
Opera: Returns void if the parameter entered can’t 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).
Parameters Allowed values Descriptionstate false or true Mute state. Set false to un-mute; set
true to mute.
Parameters Allowed values Descriptionvolume 0 - 100 The volume level to set. This value
should be greater than the minimum value set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Fresco: Returns 0 on success; non-zero on error.
Opera: Returns void if the parameter entered can’t 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.
Parameters Allowed values Descriptionvolume 0 - 100 (actual range
dependent on min. and max. values set)
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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Fresco: Returns 0 on success or if the parameter entered can’t be parsed; returns non-zero on other error.
Opera: Returns void if the parameter entered can’t 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.
Parameters Allowed values Descriptionvolume 0 - 100 The volume level to set. This value
should be less than the maximum value set.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 110
AudioControl
Parameters
Return
Fresco: Returns 0 on success; non-zero on error.
Opera: Returns void if the parameter entered can’t 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 box’s Dolby AC-3 audio output mode.
Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
Parameters
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 box’s AC-3 audio output mode.
Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
Parameters
None.
Return
Returns one of the following strings:
Parameters Allowed values Descriptionmix “stereo” both left and
right channels
“left” left channel only
“right” right channel only
“monomix” mix left and right channel together
The audio mix type to set. (Note that the allowed values are not case-sensitive, so variants such as “Stereo” or “STEREO” are also allowed.)
Parameters Allowed values Descriptionoutmode “line” AC-3 line mode
“rf” AC-3 RF mode
The audio output mode to set.
Value Meaning“failed” error - can’t get AC-3 audio output
mode“line” AC-3 Line Mode“rf” AC-3 RF Mode
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 111
AudioControl
AudioControl.SetAC3DRC
void | int AudioControl.SetAC3DRC(string ac3drc)
Sets the set-top box’s Dolby AC-3 DRC (Dynamic Range Control) audio mode.
Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
.
Parameters
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 box’s 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:
Parameters Allowed values Descriptionac3drc “linestd” standard line
output with full DRC
“linemax” line output without DRC
“rftv” RF TV output mode with internally applied 11dB boost
“rfmin” RF Mode with 11dB cut (overrides the normal 11dB boost)
The AC-3 DRC mode to set.
Value Meaningfailed internal error or AC-3 support not
compiled inlinestd standard line output with full DRClinemax line output without DRCrftv RF TV output mode with internally
applied 11dB boostrfmin RF Mode with 11dB cut (overrides the
normal 11dB boost)
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 112
AudioControl
AudioControl.SetAC3Downmix
void | int AudioControl.SetAC3Downmix(string ac3downmix)
Sets the set-top box’s 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
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 box’s Dolby AC-3 downmix mode.
Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
Parameters
None.
Return
Returns one of the following strings:
AudioControl.SetAC3Dualmono
void | int AudioControl.SetAC3Dualmono(string ac3dualmono)
Sets the set-top box’s Dolby AC-3 dual mono output routing.
Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
Parameters Allowed values Descriptionac3downmix “stereo” stereo output
mode
“dolby stereo” Dolby stereo output mode (supports Dolby matrix stereo)
The AC-3 downmix mode to set.
Value Meaningfailed internal error or AC-3 support not
compiled instereo normal stereo outputdolby stereo Dolby stereo output (supports Dolby
matrix stereo)
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 113
AudioControl
Parameters
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 box’s audio.
Supported platforms: Fresco, Opera. Escape 0.9.2-24 only.
Parameters
None.
Return
Returns one of the following strings:
Parameters Allowed values Descriptionac3downmix “ll” in the 1+1 stream,
the first mono channel is routed to both stereo channels
“rr” in the 1+1 stream, the second mono channel is routed to both stereo channels
“stereo” in the 1+1 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
The AC-3 dual output routing mode to set.
Value Meaningfailed internal errorll in the 1+1 stream, the first mono channel is routed to both
stereo channelsrr in the 1+1 stream, the second mono channel is routed to
both stereo channelsstereo in the 1+1 stream, the first mono channel is routed to the
left channel and the other to the right channelmix each mono channel in the 1+1 stream is routed to both
stereo channels
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns 0 on success or if RF support has not been compiled in; returns non-zero on error.
Parameters Allowed values Descriptionadd6db 0 or 1 The RF audio boost state. Set 0 to
disable the boost; 1 to enable it.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 115
7 Browser
7.1 Browser class
The Browser class allows interaction with the browser to control and customise display content.
7.2 Browser functions
Browser.SetCacheSize
void Browser.SetCacheSize(int cache)
Sets the cache size.
Supported platforms: Fresco. Not currently supported.
Parameters
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.
Parameters Allowed values Descriptioncache The cache size (in bytes).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Fresco/Opera: void.
Escape: Always returns true.
Browser.GetToolbarState
long Browser.GetToolbarState()(Fresco/Opera)
boolean Browser.GetToolbarState() (Escape)
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 browser’s 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
Return
void.
Parameters Allowed values Descriptionstate Fresco/Opera:0 or 1
Escape: false or true
Visibility state. 0 / false hides the toolbar; 1 / true enables the toolbar.
Parameters Allowed values Description[n] Number of pages to move back
through. By default, this is 1.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 can’t hyperlink to a media source URL - so it can be caught and played via JMACX instead.
Supported platforms: Opera.
Parameters
Return
void.
Browser.Action
void Browser.Action(int action_number, [string action])
Performs the specified action in the browser.
Supported platforms: Opera.
Parameters
Return
void.
Parameters Allowed values Descriptionurl string Format string for browsing - as a URL.
Parameters Allowed values Descriptionaction_number
1 - 23; 32 - 58. See separate list of action codes - List of action codes on page 156.
Number that maps 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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.
Parameters Allowed values Descriptionaction_number
1000 OK
or
1001 cancel
The action number to pass to the browser.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 handlerstrickplay speedunloading video (if this is not disabled)mouse pointer visibility state (if not disabled)border state (if not disabled); for Opera 8 this means scrollingtoolbar state (if not disabled); for Opera 8 this means loading the status displayMacrovision mode for URLwhether default keys are used for the URLwhether channel key processing is used for the URLthe 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
Return
void.
Parameters Allowed values Descriptionreset_state 0 or 1 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).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 120
Browser
Browser.ShowOldContentPeriod
void Browser.ShowOldContentPeriod(int period)
Configures browser behaviour when moving between pages.
Supported platforms: Escape.
Parameters
Return
void.
Parameters Allowed values Descriptionperiod 0 displays a white screen
while waiting for a new page
1 displays the page when parsing is complete
2 displays the page when it is loaded
Browser behaviour option.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
8.2 AminoGeneric event-handler attributes
AminoGeneric.onEvent<service_id>
string AminoGeneric.onEvent<service_ID>
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 ;
Usage example - Opera:
// The function definition is the same as for Fresco browsers, but the registration is:
AminoGeneric.onEvent2=eventhandler” ;
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 122
AminoGeneric
8.3 AminoGeneric functions
AminoGeneric.Call
void | string AminoGeneric.Call(long service_id, string xmldata)
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
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
Return
Returns 1 if successful; 0 if not successful.
Parameters Allowed values Descriptionservice_ID 1 - 30 Service identifier. Unless Amino has
given you a specific service ID, use the test ID value of 2.
xmldata XML data string to send to the daemon.
Parameters Allowed values Descriptionservice_ID 1 - 30 Service identifier. Unless Amino has
given you a specific service ID, use the test ID value of 2.
callback string String representing Javascript event handler function to call.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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”) ;
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
9.2 SmartCard functions
SmartCard.IsPresent
int SmartCard.IsPresent()
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
Return
Fresco: Returns void.
Opera: Returns void if parsing the input argument fails; otherwise, returns 0 (false).
Parameters Allowed values Descriptionservice_ID any int Service identifier.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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 NULL-terminated).
Parameters Allowed values Descriptionservice_ID any int Service identifier.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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.
10.2TVI event-handler attributes
TVI.onEvent
string TVI.onEvent
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
}
Usage example (Opera/Escape):
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 Meaning0 LIBTVI_OK1 LIBTVI_ERROR2 LIBTVI_TIMEOUT3 LIBTVI_UNKNOWN4 LIBTVI_KEYCODE8 LIBTVI_TOOBIG
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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 it’s switched on.
TVI.TVOn
void | long TVI.TVOn()
Switches the television on via the TVI port
Parameters Allowed values Descriptiontype 0 Philips
1 Zenith
2 LG
3 Mate (Sony/Panasonic)
The television type.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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.
Parameters Allowed values Descriptionvolume 0 - 63 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns void.
TVI.GetMinVolume
void | long TVI.GetMinVolume()
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
Return
Returns void.
Parameters Allowed values Descriptionvolume 0 - 63 The minimum volume. Note that this
should be less than the maximum volume.
Parameters Allowed values Descriptionvolume 0 - 63 The maximum volume. Note that this
should be greater than the minimum volume.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns void.
TVI.GetStartupVolume
void | long TVI.GetStartupVolume()
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.
Parameters Allowed values Descriptionvolume 0 - 63 The default volume.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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.
Parameters Allowed values Descriptionset 0 or 1 Set 0 for non-mute; 1 for mute.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 132
TVI
Parameters
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
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.
Parameters Allowed values Descriptionmode 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_ COMPONENT1
49 TVINPUT_ COMPONENT2
The input mode to set. Note that actual values available from this list depend on the television type.
Parameters Allowed values Descriptionchannel The channel to set.[mode] 0 or 1 The mode that the channel is received
in. Set 0 for Broadcast mode; 1 for Cable mode.
If you don’t include this parameter, the default value 0 is used.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 133
TVI
TVI.SetOSD
void | long TVI.SetOSD(int state)
Sets or disables the television’s on-screen display.
Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only.
Parameters
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
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 television’s teletext decoder via the TVI port.
Supported platforms: Fresco, Opera. Escape 0.9.4-26 only. Hospitality platforms only.
Parameters
ReturnReturns void if TVI is not compiled or one of the parameters can’t be parsed. Otherwise, returns 0.
Parameters Allowed values Descriptionstate 0 or 1 Set 0 to disable the on-screen display;
1 to enable it.
Parameters Allowed values Descriptionlockmode 0 or 1 Key lock mode to set. Set 0 to switch
the key lock off; 1 to switch the key lock on.
Parameters Allowed values Descriptionmode 0 off
1 mix
2 on
Teletext mode.
[page] 0 - 899 The teletext page to display.
If you don’t include this parameter, the default value 0 is used.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 134
TVI
TVI.SetupClosedCaption
void | long TVI.SetupClosedCaption(int mode)
Controls the television’s 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
Return
Returns void if TVI is not compiled or the parameter can’t 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
Return
Returns void if TVI is not compiled or the parameter can’t be parsed. Otherwise, returns 0.
Parameters Allowed values Descriptionmode 0 off
1 Caption channel 1 - field 1
2 Caption channel 2 - field 2
9 Caption channel 1 - activated when television set to mute
Closed caption mode.
Parameters Allowed values Descriptionnumber 0- 999 TV channel number.control 32 Display channel
number
64 Display CHANNEL NOT AVAILABLE
128 Display channel number followed by a dash (-)
The channel number display mode.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
Return
Returns void if TVI is not compiled or the parameter can’t 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
Return
Returns void if TVI is not compiled or the parameter can’t be parsed. Otherwise, returns 0.
Parameters Allowed values Descriptionsystem RC5 system value. Typical values are
0 or 7. keycode RC5 keycode number.
Parameters Allowed values Descriptionbyte 1 depends on PIC type First data byte.byte 2 depends on PIC type Second data byte.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 136
TVI
Usage example (Philips2 PIC code):
// Enables forwarding of TV key/command packets by the PIC to the STB
TVI.Configure(2,0) ;
// Restore default/powerup state to the PIC
TVI.Configure(0,0);
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 Type DescriptionResult long 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).
Version long The current version of the TVI PIC. Features long Hexadecimal value indicating the features that are
active. The meaning of the value returned depends on the PIC type.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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
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 ;
if ( 0 != catchPacket( b0, b1, b2 ) )
{
// Handle this internally …
TVI.ProcessUnhandledKey( b0, b1, b2 ) ;
}
}
function catchPacket( b0, b1, b2 )
{
switch ( b0 )
{
case 3:/* digit entered */
digit = ( b1 & 0x0F ) ;
TVI.RemoteFormatIn ( 0, digit ) ;
return 0 ;
break ;
Parameters Allowed values Descriptionbyte1 0 - 255 Byte value returned from event
handler.byte2 0 - 255 Byte value returned from event
handler.byte3 0 - 255 Byte value returned from event
handler.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 139
TVI
case 4:/* Volume control */
if ( b1 & 0x08 ) {
TVI.RemoteFormatIn ( 0, 13 ) ; /* mute */
return 0 ;
}
if ( b1 & 0x02 ) {
TVI.RemoteFormatIn ( 0, 16 ) ; /* vol+ */
return 0 ;
}
if ( b1 & 0x01 ) {
TVI.RemoteFormatIn ( 0, 17 ) ; /* vol- */
return 0 ;
}
break ;
}
return -1 ;// key not handled here – use the default handler
}
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 can’t be set by a generic call.
Supported platforms: Opera. Hospitality platforms only.
Parameters
Return
Returns void if TVI isn’t compiled or the parameter can’t be parsed. Otherwise, returns 0.
Usage examples:
rc = TVI.CustomCommand(“0x01,0x05,0x10,0x2b”) ;
rc = TVI.CustomCommand(“1,5,16,43”) ;
Parameters Allowed values Descriptiondata 0 - 255 or 0x00 - 0xff 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 140
11PVR
11.1PVR 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.
11.2PVR functions
PVR.GetSystemInfo
void | object PVR.GetSystemInfo()
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 there’s an error. Otherwise, returns an object with the following attributes:
PVR.Record
void | int PVR.Record (string URL, string Name)
Records the specified asset.
Attribute Type DescriptionVersion string Version number of the personal video recorder, in
the format <nn>.<nn>.DiscSize long Total disk size of the personal video recorder (in
kilobytes).FreeSize long The amount of free space available on the disk (in
kilobytes).MaxAssets long The maximum number of assets available to the
personal video recorder at any one time.Status string Current status; one of the following values:
Idle
Recording
Playing
Unknown
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 141
PVR
Supported platforms: Fresco. Hard disk models only.
Parameters
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:
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);
}
Parameters Allowed values
Description
URL String starting with src=
URL of stream to record. This should have the following format:
src=igmp://<IPaddress>:<port>
Name Any string Name to tag the recorded asset with.
Attribute Type DescriptionAssets long Total number of assets.arr[1 ... Assets]
object 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:
Name string Asset name (for each asset returned in array)URL string URL for asset playback (for each asset returned in
array).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 142
PVR
PVR.GetAssetInfo
void | object PVR.GetAssetInfo(string name)
Retrieves the specified asset.
Supported platforms: Fresco. Hard disk models only.
Parameters
Return
Returns void if this JMACX call is not supported on this platform. Otherwise, returns an object with the following attributes:
PVR.DeleteAsset
void | int PVR.DeleteAsset(string name)
Deletes the specified asset.
Supported platforms: Fresco. Hard disk models only.
Parameters
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.
Parameters Allowed values Descriptionname any string The name of the asset (this is the
name it was tagged with during recording).
Attribute Type DescriptionSize long Size of asset.TotalSize long Total size of the asset (in kilobytes).Duration long Duration of the asset (in seconds).[URL] string URL for asset playback (for each asset returned in
array).
Parameters Allowed values Descriptionname any string The name of the asset (this is the
name it was tagged with during recording).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 143
PVR
Parameters
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.
Parameters Allowed values Descriptionname any string The original name of the asset (this is
the name it was tagged with during recording).
new_name any string New name for the asset.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 144
Appendix A:HTML extensions
Amino-defined HTML extensions allow configuration of web pages alongside the JMACX functions. These extensions are available for Fresco browsers only. They are deprecated, and supported for legacy purposes only; instead, you are recommended to use the equivalent JMACX function, as listed in the details of the HTML tags.
A.1 <AMINOATTR> tag
This is an Amino defined HTML tag. Its attributes relate to the entire document so it needs to be added to the head of the document, between the <HEAD> and </HEAD> tags.
When streaming video, the software can determine the PID values and audio rate automatically from the stream. However, if the VIDEOPID, AUDIOPID and PCRPID attributes are set in the web page, these values will override the settings that the software detects from the stream.
Note: <AMINOATTR> HTML tag extensions are only supported for the Fresco browser. Replacement Javascript functions that provide similar function are listed in the table.
Tag syntax
<AMINOATTR
SRC="URL"
TCR=xx
EOMFREEZE="yes|no"
UNLOADVIDEO="yes|no"
BROWSERTOGGLE
HIDEBROWSER
HIDEPOINTER
RETAIN_NOMOUSE=”yes/no”
NOTOOLBAR
RETAIN_NOTOOLBAR=”yes/no”
TRICKPLAYSPEED=xx
MVMODE=xx
VIDEOSERVERTYPE="Oracle|MediaBase|nCube"
VSCROLLPOS=xx
VSCROLLWIDTH=xx
VSCROLLRATE=xx
HSCROLLPOS=xx
HSCROLLWIDTH=xx
HSCROLLRATE=xx
NODEFAULTKEYS
DEFAULTKEYS
WITH_CHANNELS=”yes/no”
RETAIN_ALPHA=”yes/no”
NOBORDER
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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 Description Equivalent function
SRC Sets the URL for a streaming media source. AVMedia.Play
TCR Specifies an RGB colour value to be programmed into the transparency colour register. All pixels of that colour on 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.
VideoDisplay.SetChromaKey
EOMFREEZE Sets whether video is freeze-framed at the end of the video. Valid for page.
event handler set by AVMedia.OnEvent
UNLOADVIDEO
Sets whether video is stopped on page unload. Valid for page.
event handler set by AVMedia.OnEvent
BROWSERTOGGLE
If this attribute is present, it enables the use of TV/WWW 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.
HIDEBROWSER
The presence of this attribute causes the entire browser 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.
HIDEPOINTER
The presence of this attribute will cause the mouse pointer to be hidden on this Web page. Valid for page.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 146
HTML extensions
RETAIN_NOMOUSE
Requests that the browser does not automatically return the mouse pointer on a page change. The tag remains in effect until RETAIN_NOMOUSE=”no” is encountered. Valid until next set.
ASTB.SetMouseState
NOTOOLBAR Removes the toolbar when the page is displayed. The TOOLS key may be used to toggle the toolbar state. The toolbar will re-appear when the browser is navigated to another page, unless RETAIN_NOTOOLBAR is also specified. Valid for page.
Browser.SetToolbarState
RETAIN_NOTOOLBAR
Requests that the browser does not automatically restore the toolbar on a page change. The tag remains in effect until RETAIN_NOTOOLBAR=”no” is encountered. Valid until next set.
Browser.SetToolbarState
TRICKPLAYSPEED
Sets the scale factor to use when fast-forwarding or rewinding a streaming on the current page.
AVMedia.SetSpeed
MVMODE Enables MacroVision copy protection. The parameter for this attribute is the Macrovision Mode Byte. Valid for page.
VideoDisplay.
VIDEOSERVERTYPE
Specifies the type of RTSP server being used as the streaming video source for content on this page. Valid string values are oracle mediabase and ncube. Valid for page.
AVMedia.SetDefaultServer
VSCROLLPOS
Sets the left-most pixel to scroll. Valid for page.
VSCROLLWIDTH
Sets the width of the scroll region. Valid for page.
VSCROLLRATE
Sets the number of pixels to scroll the region vertically 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 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.
HSCROLLPOS
Sets the top-most pixel to scroll. Valid for page.
HSCROLLWIDTH
Sets the height of the scroll region. Valid for page.
HSCROLLRATE
Sets the number of pixels to scroll the region horizontally 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.
NODEFAULTKEYS
By default the browser has functions defined for certain keys, this options allows for these keys to be disabled. 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.
ASTB.DefaultKeys
Attribute Description Equivalent function
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 147
HTML extensions
DEFAULTKEYS
Re-enables the default key handling after it has been disabled. Valid until NODEFAULTKEYS tag encountered.
ASTB.DefaultKeys
WITH_CHANNELS
Enables the numeric keys to choose channels. Valid until next set.
ASTB.WithChannels
RETAIN_ALPHA
When value equals yes, requests that the browser retains the alpha level from one page to the next. This stops the 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.
VideoDisplay.SetAlphaLevel
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_NOBORDER
Requests that the browser does not automatically return 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 in the history file.
ASTB.DeleteAllHistory
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 AVMedia.SetAudioPID
VIDEOPID AVMedia.SetVideoPID
PCRPID AVMedia.GetPmtProgramInfo
FADETIME
FADEOUTTIME
AVMedia.SetFadeoutTime
BUTTON
MODE
URL
RESET
Attribute Description Equivalent function
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 148
HTML extensions
A.2 <IMG> tag
The <IMG> tag is defined in HTML for formatting and displaying graphics images within a page. This has been extended to allow streaming video to be embedded within a page. The extended version of the tag is indicated by the fact that the SRC attribute is a video source URL. The other standard <IMG> attributes function as normal. This has been replaced by the PiG display set by VideoDisplay functions - e.g. VideoDisplay.SetPIG.
Tag syntax
<IMG
HEIGHT=xx
SRC=”URL”
WIDTH=xx
>
Attributes
Attribute DescriptionHEIGHT The width of the picture-in-graphics (PiG), in pixels.SRC The URL for a streaming video source. WIDTH The width of the picture-in-graphics (PiG), in pixels.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 149
Appendix B:Media source URLs
URLs, with optional attributes, are used to join media sessions. They can be used both in the API functions and in the browser’s URL bar. Note that if Macrovision is enabled then it is not possible to play a media URL from a toolbar as the Macrovision mode byte can only be set from inside an HTML page.
B.1 Media source types
AmiNET products support various streaming protocols, including RTSP, IGMP and UDP. In some cases, the format of the URL for a media stream depends on the media server, but the following sections give general guidelines on URLs. For more specific information, refer to your media server’s documentation.
RTSP
URLs for an RTSP stream can have the following format:
rtsp://server.domain.com:554/videos/movie.mpi
rtsp://server.domain.com:554/videos/movie2.mpi;audiopid=4195;pcrpid=4149;videopid=4149;serversypte=ncube;eomfreeze=yes;unloadvideo=no
rtsp://server.domain.com//server.domain.com/assetname;servertype=Mediabase
rtsp indicates that this is an RTSP URL. server.domain.com is the hostname of the 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 attributes if required.
UDP
URLs for a UDP stream can be as follows:
udp://192.168.0.1:11111
udp indicates that this is a UDP stream. The stream has an associated unicast address -192.168.0.1 in the example above . The UDP port for the unicast stream is also required -11111 in the example.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 150
Media source URLs
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;type=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
identify the source as an MP3.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 151
Media source URLs
B.2 Media source attributes
Attributes can be included in media source URLs to provide additional settings relating to the stream. In the case of audio, video and PCR PIDs, the the values are normally auto-detected. If you manually specify any PIDs, then this auto-detection system is disabled.
src – specifies the URL of a valid media source.servertype - Specifies the type of server the request is being made to: bitband, oracle, mediabase ncube, eona.video - The video PID value.audio - The audio PID valuepcr - The PCR PID value.eomfreeze - When yes is specified the video plane is not faded down at the end of media. Instead the server connection is closed and the last frame of video is 'frozen'. Default isno.monomix – selects which audio channels are output according to the following values: stereo – both left and right channels (default); left – left channel only; right – right channel only; monomix – mix left and right channels togetherac3 – yes or no. When specifying manual PIDs and the audio stream is AC3 then you must specify ac3=yes to enable the correct microcode.type – this is used to define other media sources instead of video. Currently only “MP3” is defined which allows for the incoming media to be decoded as MP3 instead of video.subpid – selects which subtitle language to use, if present, in the media source.txtpid – selects which teletext language to use, if present, in the media source.offset - number of seconds to offset into the stream when starting an rtsp 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.
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 152
Appendix C:Key codes and action codes
C.1 List of key codes
Note: The available codes associated with remote control keys depend on the type of remote control and the remote layout set in the set-top box’s configuration. The behaviour of keys will also be affected by whether the remote control is controlling the set-top box, or set to one of the alternative modes, such as teletext mode.
Remote control key codes
The following list shows the codes for the remote control buttons that can be mapped to new actions. Some of the standard remote control buttons such as the number and cursor buttons can’t be remapped, and so are not listed here. Note that these key codes are represented differently internally (you can also enter the internal code instead of the simpler code if you want to set the key function).
Code Internal code
Remote control button name
300 0X4000012C Channel up302 0X4000012E Channel down303 0X4000012F Volume up304 0X40000130 Volume down305 0X40000131 Mute306 0X40000132 TV power307 0X40000133 Video play308 0X40000134 Video forward309 0X40000135 Video stop310 0X40000136 Video reverse312 0X40000138 Video pause313 0X40000139 Video/play pause (Sejin / old Amino
remote control)314 0X4000013A Refresh316 0X4000013B Page forward 317 0X4000013D Help (Sejin remote control)318 0X4000013E Record 319 0X4000013F Page back 320 0X40000140 Red321 0X40000141 Green322 0X40000142 Yellow323 0X40000143 Blue
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 153
Key codes and action codes
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.
324 0X40000144 STB (old Amino remote control)325 0X40000145 Browser home326 0X40000146 History (Sejin remote control)327 0X40000147 Bookmarks (Sejin remote control)328 0X40000148 Stop (Sejin remote control)330 0X4000014A Tools (Sejin / old Amino remote
control)331 0X4000014B Top left (old Amino remote control)332 0X4000014C Top right (old Amino remote control)333 0X4000014D Page up334 0X4000014E Page down341 0X40000155 OK358 0X40000166 Movies 359 0X40000167 Music 360 0X40000168 Media 361 0X40000169 Record it 362 0X4000016A Promotions 363 0X4000016B Phone 364 0X4000016C Input 365 0X4000016D Hospitality 1 366 0X4000016E Hospitality 2
Code Internal code
Remote control button name
Code Remote control button name0X4200012C Channel up0X4200012E Channel down0X4200012F Volume up0X42000130 Volume down0X42000131 Mute0X42000132 TV power0X42000133 Video play0X42000134 Video forward0X42000135 Video stop0X42000136 Video reverse0X42000138 Video pause0X42000139 Video play/pause (Sejin / old Amino remote control)
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 154
Key codes and action codes
0X4200013A Reload 0X4200013B Page forward 0X4200013D Help (Sejin remote control)0X4200013E Record 0X4200013F Page back 0X42000140 Red.0X42000141 Green0X42000142 Yellow0X42000143 Blue0X42000144 STB (old Amino remote control)0X42000145 Browser home0X42000146 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 up0X4200014E Page down0X42000155 OK0X42000166 Movies 0X42000167 Music 0X42000168 Media0X42000169 Record it 0X4200016A Promotions0X4200016B Phone0X4200016C Input0X4200016D Hospitality 10X4200016E Hospitality 2
Code Remote control button name
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 155
Key codes and action codes
C.2 List of action codes
Note that 0-48 can be used for both Fresco and Opera builds; 48-58 are Opera only. In some cases, the action code has a different use in Fresco and Opera. When performing some of these actions, an additional parameter is required, as listed in the Additional parameter column.
Build Code Meaning Additional parameter?
Fresco & Opera
1 Display browser home page.
2 Browser GoTo. 3 Go to previous page.4 Go to next page.5 Browser stop function.6 Browser reload page.7 Display browser Management pages.8 Display bookmarks page.9 Add bookmark.10 Open delete bookmarks page.11 Display browser history page.12 Delete browser history.13 Hide toolbar.14 Toggle between full screen and PiG
browser display.15 FE_ACTION_BROWSER_SCROLL_GFX
Browser scroll. GFX16 Open User Preferences Configuration
page.17 Display browser help page.18 Channel up.19 Channel down.20 Channel select.21 Go to URL. If setting this action, you also
need to set the URL to go to.URL
22 Browser scroll up function.23 Browser scroll down function.32 Play video.33 Stop video.34 Pause video.35 Fast-forward video (default speed).35 Rewind video (default speed).37 Fast forward video (2x default speed).
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 156
Key codes and action codes
38 Fast rewind video (2x default speed).39 Toggle play/pause video.40 Toggle mute.41 Increase volume.42 Decrease volume.43 Standby.45 Closed caption toggle on/off. 46 Fresco: FE_ACTION_IME_MAIN_MENU
Opera: Teletext: change mode.
Opera only: Optional mode to change to. Available modes:
0 TV1 text2 mix
If you don’t specify a mode, key presses cycle through the modes in turn.
47 Fresco: FE_ACTION_IME_FIXED_PHRASE
Opera: Teletext: display index page.48 Fresco: Browser: exit.
Opera: Teletext: display next page.Opera only
49 Teletext: display previous page.
50 Teletext: display the specified page. If setting this action, you will also need to set the page number to go to.
Page number
51 Teletext: red key function.52 Teletext: green key function.53 Teletext: yellow key function.54 Teletext: cyan (blue) key function.55 Teletext: toggle Hold function. 56 Teletext: toggle Reveal function. 57 Teletext: toggle Zoom function. 58 Teletext: input digit. Digit to input
Build Code Meaning Additional parameter?
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 157
Appendix D:Video output formats
The following sections show the output format possibilities for each set-top box platform, depending on the cables connected. The output format is normally set as part of configuration (e.g. via the Management pages or libconfig), but in some cases it is selected automatically - as detailed in the tables for each platform. The name of the setting or command used to change the output format depends on which tool you are using - see the documentation for the tool for details. Note that in the following tables Composite is the same as CVBS and Component is the same as YPbPr.
D.1 AmiNET103
D.2 AmiNET110, 110H
Part no. Cables Output format configuration options
RCA to SCART CompositeRCA to RCA Composite
Part no. Cables Output format configuration options
502-418 10 pin Mini DIN to SCART Composite
Composite + RGB
S-video
Composite + S-video502-594 10 pin Mini DIN to S-video
and CompositeComposite + S-video
502-523 10 pin Mini DIN to Composite (3RCA)
Composite
002-596 obsolete
10 pin Mini DIN to Component (5RCA)
Composite + Component
502-419 10 pin Mini DIN to 6RCA Component video and Composite
Note that Sync is on Yellow (Sync on Green is not supported).
Composite
Composite + RGB
Composite + Component
Composite + S-video
S-videoobsolete 10 pin Mini DIN to S-video S-video
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 158
D.3 AmiNET120
With the AmiNET120, you don’t need to select output format in configuration - it is selected automatically. The following table shows the output format possibilities.
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).
D.5 AmiNET125
Part no. Cables Output format configuration options
502-594 10 pin Mini DIN to S-video and Composite
Composite + S-video
002-726 10 pin mini DIN to Component (5RCA)
Composite + Component
Part no. Cables Output format configuration options
502-418 10 pin Mini DIN to SCART Composite
Composite + RGB
Composite + S-video
Composite + Component502-594 10 pin Mini DIN to S-video
and CompositeComposite + S-video
502-523 10 pin Mini DIN to Composite (3RCA)
Composite
002-596 obsolete
10 pin Mini DIN to Component (5RCA)
Composite + Component
502-419 10 pin Mini DIN to 6RCA Component video and Composite
Composite
Composite + RGB
Composite + Component
Composite + S-video
Part no. Cables Output format configuration options
502-418 10 pin Mini DIN to SCART Composite
Composite + RGB
Composite + S-video
Composite + Component
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 159
D.6 AmiNET130, 130H
Note that when the HDMI cable is connected, the HD type is selected automatically.
D.7 AmiNET500
Any combination of the following cables:
502-594 10 pin Mini DIN to S-video and Composite
Composite + S-video
502-523 10 pin Mini DIN to Composite (3RCA)
Composite
002-596 obsolete
10 pin Mini DIN to Component (5RCA)
Composite + Component
502-419 10 pin Mini DIN to 6RCA Component video and Composite
Composite
Composite + RGB
Composite + Component
Composite + S-video
Part no. Cables Output format configuration options
Part no. Cables Output format configuration options
502-418 10 pin Mini DIN to SCART Composite
Composite + RGB
Composite + S-video
Composite + Component502-594 10 pin Mini DIN to S-video
and CompositeComposite + S-video
502-523 10 pin Mini DIN to Composite (3RCA)
Composite
502-419 10 pin Mini DIN to 6RCA Component video and Composite
Composite
Composite + RGB
Composite + Component
Composite + S-video510-885 HDMI Composite + Component
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 160
Part no. Cables Output Configuration options (output format)
002-777 Composite (RCA)
Composite 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.
002-776 S-video S-video002-775 Component
(3RCA)Component
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 161
Appendix E:Example code
E.1 ASTB, AVMedia, VideoDisplay general example
The following example uses ASTB, AVMedia and VideoDisplay calls to play a media stream and display some information about the set-top box (you will need to replace the media stream URLs in the AVMedia.Play calls with values for streams that your set-top box can access).
<html>
<head>
<title>Simple Javascript Example with Amino JMACX</title>
</head>
<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 ;
AVMedia.onEvent = "handle_event();" ;
VideoDisplay.SetChromaKey(0x00ff00) ;
VideoDisplay.SetAlphaLevel(50) ;
Browser.SetToolbarState(0) ;
AVMedia.Play("src=rtsp://mbase04.aminocom.com/LOTR;servertype=MediaBase") ;
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 162
Example code
function getdata()
{
document.simple.information.value = ("My MAC address is "+ASTB.GetMacAddress()+" and version is "+ASTB.GetSoftwareVersion() );
}
function handle_event()
{
videostatus = AVMedia.Event;
eventString = AVMedia.EventString;
switch (videostatus)
{
case 0:
break; //undefined status
case 1:
alert("RTSP CONNECT FAILED (1) "+eventString);
break;
case 2:
alert("RTSP SEND FAILED (2) "+eventString);
break;
case 3:
alert("RTSP READ FAILED (3) "+eventString);
break;
case 4:
alert("RTSP CONNECTION DIED (4) "+eventString);
break;
case 6:
break;
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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;
case 9:
alert("RTSP status NOT FOUND (9) "+eventString);
break;
case 10:
alert("status NO VIDEO (10) "+eventString);
break;
case 11:
alert("IGMP status END-OF-STREAM (11) "+eventString);
break;
case 12:
alert("RTSP CONNECTION STOPPED (12) "+eventString);
break;
case 13:
alert("RTSP status AUTHENTICATE (13)");
break;
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 164
Example code
case 14:
alert("RTSP status REDIRECTED (14)");
break;
case 15:
alert("IGMP status PLAYING (15)");
break;
case 16:
alert("UDP status END OF STREAM (16)");
break;
case 17:
alert("UDP status PLAYING (17)");
break;
default:
alert("Undefined error code - " +videostatus);
break;
}
}
function PlayLoop()
{
VideoDisplay.SetChromaKey(0x00ff00);
AVMedia.Play("src=rtsp://mbase04.aminocom.com/LOTR;servertype=Mediabase") ;
}
</script>
</body>
</html>
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 165
Example code
E.2 Mapping actions and channels to remote control buttons
The following example demonstrates how to use ASTB function calls to associate defined actions with button presses on the remote control. Note that it is not possible to change the action associated with the number buttons (0 - 9) using ASTB.SetKeyFunction - the 1 button always displays the channel defined as channel 1, and so on. Instead this example calls ASTB.SetChannel to set the URL for a selection of channels. It is only possible to set channels in this way because ASTB.WithChannels is enabled on the page (if this is disabled, then ASTB.SetChannel calls will have no effect). To illustrate how key functionality can be changed, the example also associates new actions with the video stop and play buttons.
<html>
<head>
<title>JMACX Default Button Remapper</title>
<script language="javascript">
ASTB.WithChannels(true) ;
ASTB.SetChannel(0,"rtsp://mbase04.aminocom.com/LOTR;ServerType=MediaBase") ;
ASTB.SetChannel(1,"igmp://225.242.100.9:5000") ;
ASTB.SetChannel(2,"igmp://239.255.250.6:11111") ;
ASTB.SetChannel(3,"http://www.google.com") ;
ASTB.SetChannel(8,"http://www.aminocom.com") ;
ASTB.SaveChannels();
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>
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 166
Example code
E.3 Mapping remote control coloured keys to new actions
The following example demonstrates how to use ASTB function calls to associate defined actions with key presses. Note that it uses the Javascript key handler to catch key presses on the number keys and associate actions with these keys, which can’t be modified directly with JMACX functions.
The example also uses a return code from the key handler , so that the browser doesn’t also act on key presses (rather than both the Javascript key handler and the browser).
<html>
<head>
<title>Testing savekeys</title>
<script language="javascript">
function keyAction(e)
{
var keypressed = e.which;
var rtn = true;
switch(keypressed)
{
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;
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 167
Example code
default:
window.alert("unhandled key press: "+keypressed);
break;
// action code 21 = Go to URL
// action code 1 = Display browser home page
}
}
document.onkeypress = keyAction;
//-->
</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 1: Red will now go direct to http://www.google.co.uk
<p>
Press 2: Blue should now go Home.
<p>
Press 3: Yellow should now go direct to http://news.bbc.co.uk
<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>
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 168
Example code
E.4 PVR control example
The following example uses PVR calls to access and control PVR assets (Fresco and AmiNET500). You will need to replace the media stream URLs in the example with values that your set-top box can access.
<html>
<head>
<title>JMACX PVR Test Page</title>
</head>
<body>
<h1>JMACX PVR Test Page</h1>
<hr>
<h2>System Information</h2>
<script language="JavaScript">
function js_Start(url)
{
var name = (document.PVRform.AssetName.value);
PVR.Record(url, name);
window.location.reload();
}
function js_Stop()
{
PVR.StopRecording();
window.location.reload();
}
function js_DeleteAsset(name)
{
PVR.DeleteAsset(name);
window.location.reload();
}
function js_RenameAsset(name)
{
var newname = (document.PVRform.RenameName.value);
PVR.RenameAsset(name, newname);
window.location.reload();
}
var item = PVR.GetSystemInfo();
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 169
Example code
document.write('<pre>');
document.write('Version : ' + item.Version + '<br>');
document.write('MaxAssets : ' + item.MaxAssets + '<br>');
document.write('FreeSize : ' + item.FreeSize + ' KBytes<br>');
document.write('DiscSize : ' + item.DiscSize + ' KBytes<br>');
document.write('State : ' + item.Status + '<br>');
document.write('</pre>');
</script>
<hr>
<h2>Record An Asset</h2><br>
<form name="PVRform">
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 = "";
document.write('Assets: ' + n + '<br>');
for (loop=1; loop <=n; loop++)
{
var asset = PVR.GetAssetInfo(list[loop].Name);
var newURL = new Array();
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 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);
newURL = asset.URL.split("src=");
tmp = newURL[1].replace("rtsp://localhost:6969/ pvr://","")
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>');
}
</script>
</body>
</html>
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 171
Index
A
Action (Browser function) 118AminoGeneric.Call 123AminoGeneric.onEvent 122AminoGeneric.Register 123ASTB.BlastCode 46ASTB.CommitConfig 39ASTB.DebugString 54ASTB.DefaultKeys 45ASTB.DeleteAllBookmarks 52ASTB.DeleteAllCookies 53ASTB.DeleteAllHistory 53ASTB.Enable2ndEthernetPort 55ASTB.EnableVLANTagging 57ASTB.ErrorString 54ASTB.FileExists 58ASTB.Format 41ASTB.GCluster 47ASTB.GetAddress 29ASTB.GetBrowser 23ASTB.GetBrowserConfig 40ASTB.GetCAID 58ASTB.GetChannel 28ASTB.GetConfig 39ASTB.GetDate 21ASTB.GetDHCP 29ASTB.GetDHCPAddress 30ASTB.GetDHCPDNS 31ASTB.GetDHCPDomain 31ASTB.GetDHCPGateway 31ASTB.GetDHCPLease 32ASTB.GetDHCPNetmask 31ASTB.GetDHCPRebind 32ASTB.GetDHCPRenew 32ASTB.GetDI 33ASTB.GetDNS 30ASTB.GetDomain 30ASTB.GetExternalVLANid 56ASTB.GetFanState 43ASTB.GetGateway 30ASTB.GetHardwareVersion 24ASTB.GetInternalVLANid 56ASTB.GetIPAddress 29ASTB.GetKeyboardState 51ASTB.GetLEDState 55ASTB.GetLocked 24ASTB.GetMacAddress 24ASTB.GetMouseState 27ASTB.GetNetmask 30ASTB.GetPortRateLimit 57ASTB.GetPowerState 26ASTB.GetRTCTime 22ASTB.GetSerialNumber 24
ASTB.GetSmartCardSN 42ASTB.GetSoftwareVersion 23ASTB.GetString 48ASTB.GetSystemInfo 22ASTB.GetSystemManufacturer 23ASTB.GetSystemModel 23ASTB.GetTrustedDomain 35ASTB.GetTrustedDomains_Domain 36ASTB.GetTrustedDomains_Javascript 36ASTB.GetTrustedDomains_Macrovision 37ASTB.GetUpgradeAddress 33ASTB.GetUpgradeDI 34ASTB.GetUpgradePort 33ASTB.GetUSBInfo 25ASTB.HDDTest 41ASTB.LoadCodeSet 46ASTB.Reboot 53ASTB.Reflash 41ASTB.SaveChannels 28ASTB.SaveKeyFunctions 46ASTB.SaveTrustedDomains 37ASTB.SelectChannel 27ASTB.SetBrowserConfig 40ASTB.SetChannel 28ASTB.SetConfig 38ASTB.SetDate 21ASTB.SetExternalVLANid 56ASTB.SetFanState 42ASTB.SetInternalVLANid 56ASTB.SetKBDelay 52ASTB.SetKBRepeat 52ASTB.SetKeyboardState 51ASTB.SetKeyFunction 45ASTB.SetLEDState 54ASTB.SetMouseState 27ASTB.SetPortRateLimit 57ASTB.SetPowerState 26ASTB.SetRemoteType 46ASTB.SetRFChannel 42ASTB.SetRFPassthrough 42ASTB.SetRTCTime 21ASTB.SetTrustedDomain 34ASTB.Sleep 58ASTB.SmartportProgram 43ASTB.SmartportTest 43ASTB.TestModem 44ASTB.Upgrade 33ASTB.VNC 53ASTB.WithChannels 47AudioControl.Event 106AudioControl.GetAC3Downmix 113AudioControl.GetAC3DRC 112AudioControl.GetAC3Dualmono 114
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 172
AudioControl.GetAC3Outmode 111AudioControl.GetDefaultVolume 109AudioControl.GetMaxVolume 108AudioControl.GetMinVolume 110AudioControl.GetMute 108AudioControl.GetVolume 107AudioControl.onVolumeChange 106AudioControl.SetAC3Downmix 113AudioControl.SetAC3DRC 112AudioControl.SetAC3Dualmono 113AudioControl.SetAC3Outmode 111AudioControl.SetAudioMix 110AudioControl.SetDefaultVolume 109AudioControl.SetMaxVolume 108AudioControl.SetMinVolume 110AudioControl.SetMute 107AudioControl.SetRFAudioBoost 115AudioControl.SetVolume 107AVMedia event codes 60AVMedia.Continue 63AVMedia.DownloadKey 76AVMedia.Event 59AVMedia.EventString 59AVMedia.GetAudioPID 70AVMedia.GetAudioPIDList 70AVMedia.GetAudioPIDs 69AVMedia.GetContentName 67AVMedia.GetCurrentSpeed 65AVMedia.GetDefaultRTSPServer 68AVMedia.GetDefaultVideoServer 68AVMedia.GetFormat 66AVMedia.GetMSecPos 65AVMedia.GetMSecPosition 65AVMedia.GetPlaySpeed 66AVMedia.GetPMTPID 78AVMedia.GetPmtProgramInfo 77AVMedia.GetPos 64AVMedia.GetPosition 64AVMedia.GetPrimaryAudioLanguage 71AVMedia.GetPrimarySubtitleLanguage 74AVMedia.GetProtocol 67AVMedia.GetSecondaryAudioLanguage 72AVMedia.GetSecondarySubtitleLanguage 75AVMedia.GetVideoPID 77AVMedia.Kill 63AVMedia.onConnectionLost 60AVMedia.onEndOfMedia 60AVMedia.onEvent 59AVMedia.Pause 63AVMedia.Play 62AVMedia.SetAudioPID 69AVMedia.SetDefaultRTSPServer 68AVMedia.SetDefaultVideoServer 68AVMedia.SetFadeoutTime 67AVMedia.SetHighDef 77AVMedia.SetKeyID 76
AVMedia.SetMSecPos 64AVMedia.SetMSecPosition 64AVMedia.SetPos 63AVMedia.SetPosition 63AVMedia.SetPrimaryAudioLanguage 71AVMedia.SetPrimarySubtitleLanguage 73AVMedia.SetSecondaryAudioLanguage 72AVMedia.SetSecondarySubtitleLanguage 75AVMedia.SetSpeed 65AVMedia.Stop 62AVMedia.VideoHide 70
B
BlastCode (ASTB function) 46Browser.Action 118Browser.CacheFlush 116Browser.FrameLoadResetsState 120Browser.GetCacheSize 116Browser.GetToolbarState 117Browser.Go 118Browser.GoBack 117Browser.GogiAction 119Browser.GoHome 118Browser.Lower 119Browser.Raise 119Browser.SetCacheSize 116Browser.SetToolbarState 117Browser.ShowOldContentPeriod 121
C
CacheFlush (Browser function) 116Call (AminoGeneric function) 123Channels
ASTB functions (JMACX) 27See also JMACX classes
CommitConfig (ASTB function) 39Configuration
ASTB functions (JMACX) 37See also JMACX classes
Configure (TVI function) 136Continue (AVMedia function) 63CustomCommand (TVI function) 140
D
DateASTB functions (JMACX) 21
See also JMACX classesDebugString (ASTB function) 54DefaultKeys (ASTB function) 45DefaultUnloadVideo (VideoDisplay function) 97DeleteAllBookmarks (ASTB function) 52DeleteAllCookies (ASTB function) 53DeleteAllHistory (ASTB function) 53DeleteAsset (PVR function) 143
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 173
DetectTV (TVI function) 128DisplayNumber (TVI function) 135DisplayText (TVI function) 137DownloadKey (AVMedia function) 76
E
Enable2ndEthernetPort (ASTB function) 55EnableVLANTagging (ASTB function) 57ErrorString (ASTB function) 54Event (AudioControl attribute) 106Event (AVMedia attribute) 59Event codes (AVMedia) 60EventString (AVMedia attribute) 59
F
FileExists (ASTB function) 58Format (ASTB function) 41FrameLoadResetsState (Browser function) 120FullScreen (VideoDisplay function) 79
G
GCluster (ASTB function) 47GetAC3Downmix (AudioControl function) 113GetAC3DRC (AudioControl function) 112GetAC3Dualmono (AudioControl function) 114GetAC3Outmode (AudioControl function) 111GetAddress (ASTB function) 29GetAlphaLevel (VideoDisplay function) 85GetAPS (VideoDisplay function) 104GetAspect (VideoDisplay function) 86GetAssetInfo (PVR function) 143GetAudioPID (AVMedia function) 70GetAudioPIDList (AVMedia function) 70GetAudioPIDs (AVMedia function) 69GetAVAspect (VideoDisplay function) 88GetBrowser (ASTB function) 23GetBrowserConfig (ASTB function) 40GetCacheSize (Browser function) 116GetCAID (ASTB function) 58GetChannel (ASTB function) 28GetChromaKey (VideoDisplay function) 83GetChromaRGB (VideoDisplay function) 84GetClosedCaption (VideoDisplay function) 96GetConfig (ASTB function) 39GetContentName (AVMedia function) 67GetCurrentSpeed (AVMedia function) 65GetDate (ASTB function) 21GetDefaultRTSPServer (AVMedia function) 68GetDefaultVideoServer (AVMedia function) 68GetDefaultVolume (AudioControl function) 109GetDHCP (ASTB function) 29GetDHCPAddress (ASTB function) 30GetDHCPDNS (ASTB function) 31GetDHCPDomain (ASTB function) 31
GetDHCPGateway (ASTB function) 31GetDHCPLease (ASTB function) 32GetDHCPNetmask (ASTB function) 31GetDHCPRebind (ASTB function) 32GetDHCPRenew (ASTB function) 32GetDI (ASTB function) 33GetDNS (ASTB function) 30GetDomain (ASTB function) 30GetExternalVLANid (ASTB function) 56GetFanState (ASTB function) 43GetFeatures (TVI function) 138GetFormat (AVMedia function) 66GetGateway (ASTB function) 30GetHardwareVersion (ASTB function) 24GetInternalVLANid (ASTB function) 56GetIPAddress (ASTB function) 29GetIsTvOn (TVI function) 128GetKeyboardState (ASTB function) 51GetLEDState (ASTB function) 55GetLocked (ASTB function) 24GetMacAddress (ASTB function) 24GetMacrovision (VideoDisplay function) 93GetMaxVolume (AudioControl function) 108GetMaxVolume (TVI function) 131GetMinVolume (AudioControl function) 110GetMinVolume (TVI function) 130GetMode (VideoDisplay function) 85GetMouseState (ASTB function) 27GetMSecPos (AVMedia function) 65GetMSecPosition (AVMedia function) 65GetMute (AudioControl function) 108GetMute (TVI function) 132GetNetmask (ASTB function) 30GetOutput (VideoDisplay function) 92GetOutputFmt (VideoDisplay function) 91GetPIG (VideoDisplay function) 81GetPIGPosition (VideoDisplay function) 83GetPIGScale (VideoDisplay function) 81GetPIGx (VideoDisplay function) 82GetPIGy (VideoDisplay function) 82GetPlaySpeed (AVMedia function) 66GetPMTPID (AVMedia function) 78GetPmtProgramInfo (AVMedia function) 77GetPortRateLimit (ASTB function) 57GetPos (AVMedia function) 64GetPosition (AVMedia function) 64GetPowerState (ASTB function) 26GetPrimaryAudioLanguage (AVMedia function) 71GetPrimarySubtitleLanguage (AVMedia function)
74GetProtocol (AVMedia function) 67GetRFModFrequencyTable (VideoDisplay func-
tion) 100GetRFModState (VideoDisplay function) 99GetRTCTime (ASTB function) 22GetSecondaryAudioLanguage (AVMedia function)
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 174
72GetSecondarySubtitleLanguage (AVMedia func-
tion) 75GetSerialNumber (ASTB function) 24GetSmartcardSN (ASTB function) 42GetSoftwareVersion (ASTB function) 23GetStartupVolume (TVI function) 131GetString (ASTB function) 48GetSubtitles (VideoDisplay function) 95GetSubtitlesPreferredLanguage (VideoDisplay
function) 102GetSubtitlesSecondaryLanguage (VideoDisplay
function) 102GetSystemInfo (ASTB function) 22GetSystemInfo (PVR function) 141GetSystemManufacturer (ASTB function) 23GetSystemModel (ASTB function) 23GetTeletext (VideoDisplay function) 94GetTeletextFullscreen (VideoDisplay function) 104GetToolbarState (Browser function) 117GetTrustedDomain (ASTB function) 35GetTrustedDomains_Domain (ASTB function) 36GetTrustedDomains_Javascript (ASTB function)
36GetTrustedDomains_Macrovision (ASTB function)
37GetTVStandard (VideoDisplay function) 89GetUHFChannel (VideoDisplay function) 98GetUpgradeAddress (ASTB function) 33GetUpgradeDI (ASTB function) 34GetUpgradePort (ASTB function) 33GetUSBInfo (ASTB function) 25GetVersion (TVI function) 138GetVideoPID (AVMedia function) 77GetVolume (AudioControl function) 107GetVolume (TVI function) 129Go (Browser function) 118GoBack (Browser function) 117GogiAction (Browser function) 119GoHome (Browser function) 118
H
HDDTest (ASTB function) 41
I
IgnoreSlaveUpdates (VideoDisplay function) 105IgnoreUpdates (VideoDisplay function) 93IsLoggedOn (SmartCard attribute) 125IsPresent (SmartCard attribute) 125
J
JMACX classesAminoGeneric 122ASTB 21
AudioControl 106AVMedia 59Browser 116PVR 141SmartCard 125TVI 127VideoDisplay 79
K
Kill (AVMedia function) 63
L
LEDFlashing codes
List 153, 156ListAssets (PVR function) 142LoadCodeSet (ASTB function) 46LoopbackTest (TVI function) 138Lower (Browser function) 119
M
Mouse pointerASTB functions (JMACX) 27
See also JMACX classes
N
NetworkASTB functions (JMACX) 29
See also JMACX classes
O
onConnectionLost (AVMedia attribute) 60onEndOfMedia (AVMedia attribute) 60onEvent (AminoGeneric attribute) 122onEvent (AVMedia attribute) 59onEvent (TVI attribute) 127onVolumeChange (AudioControl attribute) 106
P
Pause (AVMedia function) 63PiG
Position 79PiG display 79Play (AVMedia function) 62Power management
ASTB functions (JMACX) 25See also JMACX classes
Power mangement 25ProcessUnhandledKey (TVI function) 139Production
ASTB functions (JMACX) 41See also JMACX classes
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 175
PVR.DeleteAsset 143PVR.GetAssetInfo 143PVR.GetSystemInfo 141PVR.ListAssets 142PVR.Record 141PVR.RenameAsset 143PVR.StopRecording 144
R
Raise (Browser function) 119Reboot (ASTB function) 53Record (PVR function) 141Reflash (ASTB function) 41Register (AminoGeneric function) 123RemoteFormatIn (TVI function) 136RenameAsset (PVR function) 143RetainAlphaLevel (VideoDisplay function) 96RetainMouseState (VideoDisplay function) 96
S
SaveChannels (ASTB function) 28SaveKeyFunctions (ASTB function) 46SaveTrustedDomains (ASTB function) 37SelectChannel (ASTB function) 27SelectTeletext (TVI function) 134SetAC3Downmix (AudioControl function) 113SetAC3DRC (AudioControl function) 112SetAC3Dualmono (AudioControl function) 113SetAC3Outmode (AudioControl function) 111SetAlphaLevel (VideoDisplay function) 85SetAlphaRect (VideoDisplay function) 104SetAPS (VideoDisplay function) 103SetAspect (VideoDisplay function) 86SetAudioMix (AudioControl function) 110SetAudioPID (AVMedia function) 69SetAVAspect (VideoDisplay function) 87SetAVAspectSwitching (VideoDisplay function) 87SetBrowserConfig (ASTB function) 40SetCacheSize (Browser function) 116SetChannel (ASTB function) 28SetChannel (TVI function) 133SetChromaKey (VideoDisplay function) 83SetChromaRGB (VideoDisplay function) 84SetClosedCaption (VideoDisplay function) 95SetConfig (ASTB function) 38SetDate (ASTB function) 21SetDefaultRTSPServer (AVMedia function) 68SetDefaultVideoServer (AVMedia function) 68SetDefaultVolume (AudioControl function) 109SetExternalVLANid (ASTB function) 56SetFadeoutTime (AVMedia function) 67SetFanState (ASTB function) 42SetHighDef (AVMedia function) 77SetInput (TVI function) 132
SetInternalVLANid (ASTB function) 56SetKBDelay (ASTB function) 52SetKBRepeat (ASTB function) 52SetKeyboardState (ASTB function) 51SetKeyFunction (ASTB function) 45SetKeyID (AVMedia function) 76SetKeyLock (TVI function) 134SetLEDState (ASTB function) 54SetMacrovision (VideoDisplay function) 92SetMaxVolume (AudioControl function) 108SetMaxVolume (TVI function) 130SetMinVolume (AudioControl function) 110SetMinVolume (TVI function) 130SetMode (VideoDisplay function) 84SetMouseState (ASTB function) 27SetMSecPos (AVMedia function) 64SetMSecPosition (AVMedia function) 64SetMute (AudioControl function) 107SetMute (TVI function) 132SetOSD (TVI function) 134SetOutput (VideoDisplay function) 91SetOutputFmt (VideoDisplay function) 89SetPIG (VideoDisplay function) 80SetPIGPosition (VideoDisplay function) 82SetPIGScale (VideoDisplay function) 81SetPortRateLimit (ASTB function) 57SetPos (AVMedia function) 63SetPosition (AVMedia function) 63SetPowerState (ASTB function) 26SetPrimaryAudioLanguage (AVMedia function) 71SetPrimarySubtitleLanguage (AVMedia function)
73SetRemoteType (ASTB function) 46SetRFAudioBoost (AudioControl function) 115SetRFChannel (ASTB function) 42SetRFModFrequencyTable (VideoDisplay function)
100SetRFModState (VideoDisplay function) 99SetRFPassthrough (ASTB function) 42SetRTCTime (ASTB function) 21SetSecondaryAudioLanguage (AVMedia function)
72SetSecondarySubtitleLanguage (AVMedia func-
tion) 75SetSpeed (AVMedia function) 65SetStartupVolume (TVI function) 131SetSubtitles (VideoDisplay function) 94SetSubtitlesPreferredLanguage (VideoDisplay
function) 101SetSubtitlesSecondaryLanguage (VideoDisplay
function) 103SetTeletext (VideoDisplay function) 93SetTeletextFullscreen (VideoDisplay function) 104SetToolbarState (Browser function) 117SetTrustedDomain (ASTB function) 34SetTVStandard (VideoDisplay function) 88
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 176
SetTvType (TVI function) 128SetUHFChannel (VideoDisplay function) 97SetupClosedCaption (TVI function) 135SetVolume (AudioControl function) 107SetVolume (TVI function) 129ShowOldContentPeriod (Browser function) 121Sleep (ASTB function) 58SmartCard.IsLoggedOn 125SmartCard.IsPresent 125SmartportProgram (ASTB function) 43SmartportTest (ASTB function) 43Stop (AVMedia function) 62StopRecording (PVR function) 144System information
ASTB functions (JMACX) 22See also JMACX classes
SystemInfo (TVI function) 137
T
TestModem (ASTB function) 44Troubleshooting
LED flashing codesList 153, 156
Trusted domainsASTB functions (JMACX) 34
See also JMACX classesTVI.Configure 136TVI.CustomCommand 140TVI.DetectTV 128TVI.DisplayNumber 135TVI.DisplayText 137TVI.GetFeatures 138TVI.GetIsTvOn 128TVI.GetMaxVolume 131TVI.GetMinVolume 130TVI.GetMute 132TVI.GetStartupVolume 131TVI.GetVersion 138TVI.GetVolume 129TVI.LoopbackTest 138TVI.onEvent 127TVI.ProcessUnhandledKey 139TVI.RemoteFormatIn 136TVI.SelectTeletext 134TVI.SetChannel 133TVI.SetInput 132TVI.SetKeyLock 134TVI.SetMaxVolume 130TVI.SetMinVolume 130TVI.SetMute 132TVI.SetOSD 134TVI.SetStartupVolume 131TVI.SetTvType 128TVI.SetupClosedCaption 135TVI.SetVolume 129
TVI.SystemInfo 137TVI.TVOff 129TVI.TVOn 128TVI.VolumeDown 132TVI.VolumeUp 131TVOff (TVI function) 129TVOn (TVI function) 128
U
UnloadVideo (VideoDisplay function) 97Upgrade
ASTB functions (JMACX) 33See also JMACX classes
Upgrade (ASTB function) 33
V
VideoDisplay.DefaultUnloadVideo 97VideoDisplay.FullScreen 79VideoDisplay.GetAlphaLevel 85VideoDisplay.GetAPS 104VideoDisplay.GetAspect 86VideoDisplay.GetAVAspect 88VideoDisplay.GetChromaKey 83VideoDisplay.GetChromaRGB 84VideoDisplay.GetClosedCaption 96VideoDisplay.GetMacrovision 93VideoDisplay.GetMode 85VideoDisplay.GetOutput 92VideoDisplay.GetOutputFmt 91VideoDisplay.GetPIG 81VideoDisplay.GetPIGPosition 83VideoDisplay.GetPIGScale 81VideoDisplay.GetPIGx 82VideoDisplay.GetPIGy 82VideoDisplay.GetRFModFrequencyTable 100VideoDisplay.GetRFModState 99VideoDisplay.GetSubtitles 95VideoDisplay.GetSubtitlesPreferredLanguage 102VideoDisplay.GetSubtitlesSecondaryLanguage
102VideoDisplay.GetTeletext 94VideoDisplay.GetTeletextFullscreen 104VideoDisplay.GetTVStandard 89VideoDisplay.GetUHFChannel 98VideoDisplay.IgnoreSlaveUpdates 105VideoDisplay.IgnoreUpdates 93VideoDisplay.RetainAlphaLevel 96VideoDisplay.RetainMouseState 96VideoDisplay.SetAlphaLevel 85VideoDisplay.SetAlphaRect 104VideoDisplay.SetAPS 103VideoDisplay.SetAspect 86VideoDisplay.SetAVAspect 87VideoDisplay.SetAVAspectSwitching 87
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 177
VideoDisplay.SetChromaKey 83VideoDisplay.SetChromaRGB 84VideoDisplay.SetClosedCaption 95VideoDisplay.SetMacrovision 92VideoDisplay.SetMode 84VideoDisplay.SetOutput 91VideoDisplay.SetOutputFmt 89VideoDisplay.SetPIG 80VideoDisplay.SetPIGPosition 82VideoDisplay.SetPIGScale 81VideoDisplay.SetRFModFrequencyTable 100VideoDisplay.SetRFModState 99VideoDisplay.SetSubtitles 94VideoDisplay.SetSubtitlesPreferredLanguage 101VideoDisplay.SetSubtitlesSecondaryLanguage
103VideoDisplay.SetTeletext 93VideoDisplay.SetTeletextFullscreen 104VideoDisplay.SetTVStandard 88VideoDisplay.SetUHFChannel 97VideoDisplay.UnloadVideo 97VideoHide (AVMedia function) 70VNC (ASTB function) 53VolumeDown (TVI function) 132VolumeUp (TVI function) 131
W
WithChannels (ASTB function) 47
CONFIDENTIAL. Copyright © Amino Communications Ltd 2006 178
Document history
Revision Name Date Changes0.10 03/2006 No document history stored.0.12.x rev0
R. Potts 15/9/2006 Reformat document. Update of all functions against current code.
0.12.x rev1
R. Potts 25/9/2006 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.
0.12.x rev2
R. Potts 28/9/2006 Marked as “Confidential”.
Copyright © Amino Communications Ltd 2006 179
0.14.x rev0
R.Potts 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).
Revision Name Date Changes
Copyright © Amino Communications Ltd 2006 180