CONFIDENTIAL
1
1.INTRODUCTION...................................................................................................................................................... 6
2.API............................................................................................................................................................................ 7
CONFIDENTIAL
2
2.2.22Increase/Decrease System Hue Value...............................................................................................................................21
2.2.23Save Current Volume to Configuration.............................................................................................................................21
2.2.24Save Current OSD Setting to Configuration.....................................................................................................................22
2.2.25Get/Set Internal Key Process Function Switch.................................................................................................................22
2.5 Networking..............................................................................................................................................................................30
2.5.1Get/Set Network Mode.......................................................................................................................................................30
2.5.2Get IP Address.....................................................................................................................................................................31
2.5.3Get Subnet Mask.................................................................................................................................................................31
2.5.4Get Gateway........................................................................................................................................................................31
2.5.5Get/Set DNS........................................................................................................................................................................31
2.5.6Set IP Address.....................................................................................................................................................................32
2.5.7Get/Set Subscriber’s PPPoE User’s ID...............................................................................................................................32
2.5.8Get/Set Subscriber’s PPPoE Password...............................................................................................................................32
2.5.9Get/Set Network IGMP version..........................................................................................................................................33
2.6 Browser....................................................................................................................................................................................33
2.6.1Get/Set URL of Home Page................................................................................................................................................33
CONFIDENTIAL
3
2.6.2Get/Set URL of Configuration Page...................................................................................................................................33
2.6.3Get/Set URL of VOD Server .............................................................................................................................................34
2.6.4Get/Set URL of IPTV Server .............................................................................................................................................34
2.6.5Get/Set URL of STB startup page.......................................................................................................................................34
2.6.6Get DRM Server.................................................................................................................................................................35
2.6.7Get DRM Company............................................................................................................................................................35
2.6.8Set DRM Parameter............................................................................................................................................................35
2.6.9Get/Set Configuration of HTTP Proxy................................................................................................................................36
2.6.10Get/Set Configuration of HTTPS Proxy...........................................................................................................................37
2.6.11Get/Set URL of HTTP Proxy Server.................................................................................................................................37
2.6.12Get/Set HTTP Proxy Exception Address..........................................................................................................................38
2.6.13Get/Set URL of HTTPS Proxy Server..............................................................................................................................38
2.6.14Get/Set HTTPS Proxy Exception Address........................................................................................................................38
2.6.15Get/Set XMLHttpRequest Same Origin Policy................................................................................................................38
CONFIDENTIAL
4
2.8.2.3Set Transparency Level....................................................................................................................................................48
2.8.2.4Get Transparency Level...................................................................................................................................................49
2.8.2.5Set Transparency Color....................................................................................................................................................49
2.8.2.6Get Transparency Color...................................................................................................................................................50
2.8.2.7Set browser screen update mode......................................................................................................................................50
2.8.3MEDIA EVENTS MANAGEMENT..................................................................................................................................51
2.8.3.1Set Callback when player state changed..........................................................................................................................51
2.8.3.2Get Media Event Code.....................................................................................................................................................51
3.REFERENCES....................................................................................................................................................... 52
CONFIDENTIAL
5
1. Introduction
JavaScript Extension
1.1 Using Method
When you want to use OUR DOM object extension ( API in this document).
You must new this DOM object first.
Our DOMs:
Device/Stb/Stb_Media/Network/Webbrowser/Software/Drm
For Example:
var device=new Device();
alert(device.cpurfreq);
var stb=new Stb();
stb.print(“Some debug message to console”);
var stb_media=new Stb_Media();
stb_media.play(“udp://224.123.1.1:2033”);
1.1.1 Property
You can READ/WRITE it, except some read-only property.
Ex: device.cpufreq
1.1.2 Function
You can call it with/without parameter (by function)
Ex: stb.reboot()
CONFIDENTIAL
6
2. API
API/Property Declaration and Definition.
2.1 Hardware Environment
2.1.1 Get MAC Address
Description
Property
device.macaddr
2.1.2 Get DRAM size
Description
Property
device.memsize
2.1.3 Get Flash memory size
Description
Property
device.flashsize
2.1.4 Get Model Number and Name of STB
Description
CONFIDENTIAL
7
Property
device.model
2.1.5 Get STB Internal HardDisk exist status
Description
Property
stb.hd_exist
Value
True HD Exist
false HD not Exist
or
HardDisk Fail
2.1.6 Get STB Internal HardDisk free size
Description
Property
stb.hd_freesize
Value
Description
CONFIDENTIAL
8
This setting is used to identify Function Scope
Key(HOME/VOD/IPTV/DVB/PVR/INTERNET)
Property
stb.menutype
Value
0 HOME
1 VOD
2 IPTV
3 DVB
4 PVR
5 INTERNET
Description
Property
CONFIDENTIAL
9
stb.timeServer
2.2.3 Get/Set TimeZone
Description
Property
stb.timeZone
Value
Value TimeZone Time
1 USA -10
2 USA -9
3 USA -8
4 USA -7
5 USA -6
6 USA -5
7 Faroe_Islands 0
8 Ireland 0
9 Portugal 0
10 UK 0
11 Austria 1
12 Belgium 1
13 Bosnia_Herzegovina 1
14 Croatia 1
15 Czech_Republic 1
16 Denmark 1
17 France 1
18 Germany 1
19 Hungary 1
20 Italy 1
21 Luxembourg 1
22 Macedonia 1
23 Malta 1
24 Namibia 1
25 Netherlands 1
26 Norway 1
27 Poland 1
28 Slovakia 1
29 Slovenia 1
CONFIDENTIAL
10
30 Spain 1
31 Sweden 1
32 Switzerland 1
33 Belarus 2
34 Estonia 2
35 Finland 2
36 Greece 2
37 Israel 2
38 Latvia 2
39 Lithuania 2
40 Moldova 2
41 Romania 2
42 Russian_Federation 2
43 South_Africa 2
44 Turkey 2
45 Ethiopia 3
46 Russian_Federation 3
47 Iran 3.5
48 Azerbaijan 4
49 Mauritius 4
50 Russian_Federation 4
51 Pakistan 5
52 Russian_Federation 5
53 India 5.5
54 Sri_Lanka 5.5
55 Russian_Federation 6
56 Indonesia 7
57 Russian_Federation 7
58 Thailand 7
59 Vietnam 7
60 Australia 8
61 Brunei 8
62 China 8
63 Hong_Kong 8
64 Indonesia 8
65 Malaysia 8
66 Philippines 8
67 Russian_Federation 8
68 Singapore 8
69 Taiwan 8
70 Australia 9
CONFIDENTIAL
11
71 Indonesia 9
72 Russian_Federation 9
73 South_Korea 9
74 Australia 10
75 Russian_Federation 10
76 Australia 11
77 Russian_Federation 11
78 New_Zealand 12
79 Russian_Federation 12
Description
Property
stb.adminPassword
2.2.5 Get/Set URL of Firmware Update
Description
Property
stb.fwUpdateUrl
2.2.6 Get/Set Time Calibration Mode
Description
Property
stb.timeMethod
CONFIDENTIAL
12
Value
1: NTP Calibration
Description
Property
stb.deviceName
2.2.8 Get/Set System Language
Description
Property
stb.language
Value
"en": English
“ru”:Russian
CONFIDENTIAL
13
2.2.9 Get/Set Display Mode
Description
Property
stb.displaymode
Value
0 NTSC
1 NTSC-JAPAN
2 PAL-M
3 PAL-N
4 PAL-NC
5 PAL-B
6 PAL-B1
7 PAL-D
8 PAL-D1
9 PAL
10 PAL-H
11 PAL-K
12 PAL-I
13 SECAM
14 480P
15 576P
16 1080I
17 1080I-50HZ
18 1080P
19 1080P-24HZ
20 1080P-25HZ
21 1080P-30HZ
22 1250I-50HZ
CONFIDENTIAL
14
23 720P
24 720P-50HZ
25 720P-24HZ
Description
Property
stb.aspect
Value
0: 4:3
1: 16:9
To set this value correct to real TV’s aspect ratio. You will get a correct
output. This value will co-work with Content Mode.
2.2.11 Get/Set System Output Type
Description
Property
stb.outputtype
Value
CONFIDENTIAL
15
0: RGB(Component)
1: YPbPr(YcbCr)
2.2.12 Get/Set System Content Mode
Description
Property
stb.content
Value
0 Zoom
1 Box
2 PanScan
3 Full
4 Full-NonLiner
CAUTION: There are several limit when you set this value.
1. It must be Full-Screen Mode (Player Window Size).
2. It still depends on Aspect-Ratio Setting and video stream Aspect-Ratio. So
you will see different result between video stream and different
Aspect-Ratio Setting.
Description
CONFIDENTIAL
16
Property
stb.contrast
Value
1~20
PS: get value only, set this value will be nothing happened.
2.2.14 Increase/Decrease System Contrast Value
Description
stb.contrast_add(var operation)
Parameter
[operation]
-1:Decrease
1:Increase
Return Value
true: Success
false: Fail
2.2.15 Get System Brightness Value
Description
CONFIDENTIAL
17
Property
stb.brightness
Value
1~20
PS: get value only, set this value will be nothing happened.
2.2.16 Increase/Decrease System Brightness Value
Description
stb.brightness_add(var operation)
Parameter
[operation]
-1:Decrease
1:Increase
Return Value
true: Success
false: Fail
2.2.17 Get System Sharptness Value
Description
CONFIDENTIAL
18
Property
stb.sharpness
Value
1~20
PS: get value only, set this value will be nothing happened.
2.2.18 Increase/Decrease System Sharpness Value
Description
stb.sharpness_add(var operation)
Parameter
[operation]
-1:Decrease
1:Increase
Return Value
true: Success
false: Fail
2.2.19 Get System Saturation Value
Description
CONFIDENTIAL
19
Property
stb.saturation
Value
1~20
PS: get value only, set this value will be nothing happened.
2.2.20 Increase/Decrease System Saturation Value
Description
stb.saturation_add(var operation)
Parameter
[operation]
-1:Decrease
1:Increase
Return Value
true: Success
false: Fail
2.2.21 Get System Hue Value
Description
CONFIDENTIAL
20
Property
stb.hue
Value
1~20
PS: get value only, set this value will be nothing happened.
2.2.22 Increase/Decrease System Hue Value
Description
stb.hue_add()
Parameter
-1:Decrease
1:Increase
Return Value
true: Success
false: Fail
2.2.23 Save Current Volume to Configuration
Description
Function
CONFIDENTIAL
21
stb.save_vol()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.2.24 Save Current OSD Setting to Configuration
Description
Save Current OSD Value to Configuration
[DisplayMode/Outputtype/Aspect/ContentMode/Contrast/
Function
stb.save_osd()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.2.25 Get/Set Internal Key Process Function Switch
Description
CONFIDENTIAL
22
Get/Set Internal key process function switch
Property
stb.disableinternalkey
Value
Description
Function
stb.reboot()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.3.2 StandBy STB
Description
CONFIDENTIAL
23
Function
stb.standby()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.3.3 Restore Default Settings
Description
Function
stb.restoreDefault()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.3.4 NTP Update
Description
NTP Update
CONFIDENTIAL
24
Function
stb.ntpUpdate()
2.3.5 Cancel NTP Update
Description
Function
stb.cancelNTPUpdate()
2.3.6 Get NTP Update Status
Description
Property
stb.ntpUpdateStatus
Value
Description
Function
CONFIDENTIAL
25
stb.setSystemTime(var Year, var Month, var Date, var
Description
Upgrade Firmware
Function
stb.fwUpgrade(var Source)
Parameter
1 Upgrade form Network
2 Upgrade from USB
2.3.9 Cancel Upgrade Firmware
Description
Function
stb.cancelFWUpgrade()
Description
CONFIDENTIAL
26
Property
stb.fwUpgradeStatus
Value
0 FWUP_UNKNOW_STATUS
1 FWUP_WAIT_STATUS
2 FWUP_BUSY_STATUS
3 FWUP_DOWNLOAD_START
4 FWUP_DOWNLOAD_FINISH
5 FWUP_INFO_DOWNLOAD_START
6 FWUP_INFO_DOWNLOAD_FINISH
7 FWUP_WRITE_START
8 FWUP_WRITE_FINISH
9 FWUP_DOWNLOAD_FAIL
10 FWUP_INFO_DOWNLOAD_FAIL
11 FWUP_WRITE_FAIL
12 FWUP_RAMDISK_FAIL
13 FWUP_USB_FAIL
14 FWUP_FIRM_FILE_FAIL
15 FWUP_URL_FILE_FAIL
16 FWUP_INFO_FILE_FAIL
17 FWUP_EXECMD_FAIL
18 FWUP_FIRM_MD5_FAIL
19 FWUP_USER_CANCEL
PS: When Finish Updating Firmware, device will
reboot automatically.
2.3.11 Get Rate of Firmware Download Progress
Description
Property
CONFIDENTIAL
27
stb.fwUpgradeDownloadPercent
Value
0 ~ 100
2.3.12 Control LED Status
Description
Function
0:Power LED
[state_index]
0:OFF
1:ON
Return Value
true:Success
false:Fail
2.3.13 Log Message to System Log
Description
CONFIDENTIAL
28
Function
stb.log(var txt_message)
Return Value
true:Success
false:Fail
2.3.14 Print Message to Console Port
Description
Function
stb.print(var txt_message)
Return Value
true:Success
false:Fail
Description
Property
CONFIDENTIAL
29
software.osVersion
2.4.2 Get Browser Version
Description
Property
software.browserVersion
2.4.3 Get Firmware Version
Description
Get Firmware Version of STB
Property
software.firmwareVersion
2.5 Networking
2.5.1 Get/Set Network Mode
Description
Property
network.netmode
Value
0 Static IP
1 DHCP
2 PPPoE
CONFIDENTIAL
30
2.5.2 Get IP Address
Description
Property
network.netip
2.5.3 Get Subnet Mask
Description
network.netmask
2.5.4 Get Gateway
Description
Property
network.netgateway
2.5.5 Get/Set DNS
Description
Property
network.netdns
CONFIDENTIAL
31
network.netdns2
2.5.6 Set IP Address
Description
Function
dns)
Parameter
[ip/netmask/gateway/dns/dns2]
Description
Property
network.pppoeUserName
2.5.8 Get/Set Subscriber’s PPPoE Password
Description
CONFIDENTIAL
32
Property
network.pppoePassword
2.5.9 Get/Set Network IGMP version
Description
Property
network.igmp
Value
1 IGMP v1
2 IGMP v2
3 IGMP v3
2.6 Browser
2.6.1 Get/Set URL of Home Page
Description
Property
webbrowser.homepage
2.6.2 Get/Set URL of Configuration Page
Description
Property
CONFIDENTIAL
33
webbrowser.configpage
2.6.3 Get/Set URL of VOD Server
Description
Property
webbrowser.vodServer
Value
A string (ex:http://vod.testmedia.com/vod1/vod.htm)
2.6.4 Get/Set URL of IPTV Server
Description
Property
webbrowser.iptvServer
Value
Description
Property
webbrowser.mainpage
CONFIDENTIAL
34
Value
Description
Property
drm.drmServer
Value
A URL string (ex:http://www.abc.com)
2.6.7 Get DRM Company
Description
Property
drm.drmComp
Value
Description
CONFIDENTIAL
35
different DRM system.
Function
drmcomp,var drmvks)
Parameter:
Ex:http://192.168.1.24:12697
Ex:http://192.168.1.25:12697
2.6.9 Get/Set Configuration of HTTP Proxy
Description
Property
CONFIDENTIAL
36
webbrowser.enableProxy
Value
0: Disable
1: Enable
2.6.10 Get/Set Configuration of HTTPS Proxy
Description
Property
webbrowser.enableSecureProxy
Value
0: Disable
1: Enable
2.6.11 Get/Set URL of HTTP Proxy Server
Description
Property
webbrowser.httpProxy
Value
URL:port
CONFIDENTIAL
37
2.6.12 Get/Set HTTP Proxy Exception Address
Description
Property
webbrowser.exceptionAddr
2.6.13 Get/Set URL of HTTPS Proxy Server
Description
webbrowser.secureProxy
Value
URL:port
2.6.14 Get/Set HTTPS Proxy Exception Address
Description
Property
webbrowser.httpsDirectAccess
2.6.15 Get/Set XMLHttpRequest Same Origin Policy
Description
CONFIDENTIAL
38
don’t change it to disabled (0). But in special case, maybe you will
Property
stb.xmlhttprequest
Value
0 Ignore Same Origin
1 Limit Same Origin
Description
Property
stb.vol
Value
0~20
2.7.2 Set Audio Volume Up
Description
Function
CONFIDENTIAL
39
stb.volup()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.7.3 Set Audio Volume Down
Description
Set Audio Volume Down
Function
stb.voldown()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.7.4 Mute Audio
Description
Mute Audio
Function
CONFIDENTIAL
40
stb.mute()
Parameter
Nothing
Return Value
true: Success
false: Fail
2.8 Middleware Relative Management Functions
2.8.1 Player Control Functions
2.8.1.1 Play
Description
Function
stb_media.play(var src)
Parameter
Return
operation is failed
2.8.1.2 Pause
Description
CONFIDENTIAL
41
Stops the playback. The last frame is displayed on the
screen.
Function
stb_media.pause()
Return
No return value
2.8.1.3 Stop
Description
Function
stb_media.stop()
Return
No return value
2.8.1.4 Continue
Description
position.
Function
stb_media.continuePlay()
CONFIDENTIAL
42
Return
No return value
Description
seconds).
Function
stb_media.setPosition(var position)
Parameter
Return
operation is failed
Note
Description
position.
CONFIDENTIAL
43
Function
stb_media.getPosition()
Return
Note
Description
Function
stb_media.setSpeed(var speed)
Parameter
Return
operation is failed
Note
CONFIDENTIAL
44
2.8.1.8 Get Speed
Description
Function
stb_media.getSpeed()
Return
Description
Function
stb_media.setAudioPID(var audioPID)
Parameter
audioPID: integer
Return
operation is failed
CONFIDENTIAL
45
Note
Description
Function
stb_media.getAudioPID()
Return
Note
Description
Function
stb_media.setVolume(var volume)
Parameter
Return
CONFIDENTIAL
46
No return value
Description
Function
stb_media.getVolume()
Return
Returns the current volume level.
Description
Function
stb_media.setPIG(var state)
var y)
Parameter
CONFIDENTIAL
47
height: window height. Only for window mode.
Return
No return value.
Description
Get video display mode.
Function
stb_media.getPIG()
Return
Description
Function
stb_media.setAlphaLevel(var level)
Parameter
CONFIDENTIAL
48
level: integer. Range 0~255
Return
No return value.
CAUTION: Using this will change all pixel alpha value. And it will
Description
Function
stb_media.setAlphaLevel()
Return
Description
Function
stb_media.setTransparentColor(var color)
CONFIDENTIAL
49
Parameter
color: 0xAARRGGBB
Return
No return value.
2.8.2.6 Get Transparency Color
Description
Function
stb_media.getTransparentColor()
Return
Description
Function
stb_media.ignoreUpdates(var state)
Parameter
state:
CONFIDENTIAL
50
true:Blocks the browser screen updating.
Return
No return value.
Description
Property
stb_media.onstatechange
example code:
function evt_callback(){
stb_media.onstatechange=’evt_callback’;
Description
CONFIDENTIAL
51
Get the variable contain the code of the last media event
occured.
Property
stb_media.eventCode
Value
0 Stopped
1 Error
2 End Of File
3 Buffering (when play command sent but not
playing yet)
4 Playing
5 Paused
6 Stopping (when stop command sent but not
stopped yet)
3. References
CONFIDENTIAL
52