WINDOW
The Window class handles the basic TV commands (for example, Screen, Channel, and so on).
Add the following line for Window class into a html file your own : <object id="plugin" classid="clsid:SAMSUNG-INFOLINK-SEF" style="width:0px; height:0px;"></object> |
You can declare Window class like this : ex) plugin = document.getElementById("plugin"); plugin.Open('Window', '1.001', 'Window'); plugin.Execute('method', 'parm1', 'parm2'); |
Contents
Constants
Name | Value | Description |
PL_WINDOW_CHANNEL_TYPE_UNKNOWN | 0 | The Unknown Channel |
PL_WINDOW_CHANNEL_TYPE_TV | 1 | The TV channel |
PL_WINDOW_CHANNEL_TYPE_ATV | 2 | The Analog TV Channel |
PL_WINDOW_CHANNEL_TYPE_DTV | 3 | The Digital Tvchannel |
PL_WINDOW_CHANNEL_TYPE_CATV | 4 | The cable analog TV channel |
PL_WINDOW_CHANNEL_TYPE_CDTV | 5 | The cable digital TV channel |
PL_WINDOW_CHANNEL_TYPE_PATV | 6 | The POD analog TV channel |
PL_WINDOW_CHANNEL_TYPE_PDTV | 7 | The POD digital TV channel |
PL_WINDOW_CHANNEL_TYPE_SDTV | 8 | The SDTV channel |
PL_WINDOW_CHANNEL_TYPE_FREESAT | 9 | The Freesat channel |
PL_WINDOW_CHANNEL_TYPE_MEDIA | 10 | The Media channel |
PL_WINDOW_NAVIGATOR_MODE_ALL | 0 | The all channels mode |
PL_WINDOW_NAVIGATOR_MODE_DIGITAL | 1 | The digital channel mode |
PL_WINDOW_NAVIGATOR_MODE_ANALOG | 2 | The analog channel mode |
PL_WINDOW_NAVIGATOR_MODE_FAVORITE | 3 | The favorite channel mode |
PL_WINDOW_NAVIGATOR_MODE_CURR_TYPE | 4 | Unused |
PL_WINDOW_NAVIGATOR_MODE_EXCEPT_ADDDEL | 5 | Unused |
PL_WINDOW_NAVIGATOR_MODE_ANALOG_ALL | 6 | Unused |
PL_WINDOW_RESOLUTION_NOTSUPPORT | 0 | Not supported |
PL_WINDOW_RESOLUTION_NOSIGNAL | 1 | No signal |
PL_WINDOW_RESOLUTION_NT | 2 | The NT resolution for NTSC3_58 color system |
PL_WINDOW_RESOLUTION_NT_N | 3 | NT_N resolution for NTSC4_43 color system |
PL_WINDOW_RESOLUTION_PC | 4 | The PC resolution |
PL_WINDOW_RESOLUTION_1080I | 5 | The 1080I resolution |
PL_WINDOW_RESOLUTION_1080P | 6 | The 1080P resolution |
PL_WINDOW_RESOLUTION_720P | 7 | The 720P resolution |
PL_WINDOW_RESOLUTION_480P | 8 | The 480P resolution |
PL_WINDOW_RESOLUTION_480I | 9 | The 480I resolution |
PL_WINDOW_RESOLUTION_640X480P | 10 | The 640 x 480P resolution |
PL_WINDOW_RESOLUTION_1440x480I | 11 | The 1440X480I resolution |
PL_WINDOW_RESOLUTION_576P | 12 | The 576P resolution |
PL_WINDOW_RESOLUTION_576I | 13 | The 576I resolution |
PL_WINDOW_RESOLUTION_PAL | 14 | The PAL resolution for PAL color system |
PL_WINDOW_RESOLUTION_PAL_M | 15 | The PAL_M resolution for PAL_M color system |
PL_WINDOW_RESOLUTION_PAL_N | 16 | The PAL_N resolution for PAL_N color system |
PL_WINDOW_RESOLUTION_SECAM | 17 | The PAL_N resolution for PAL_N color system |
PL_WINDOW_RESOLUTION_YC_SECAM | 18 | The YC_SECAM resolution |
PL_WINDOW_RESOLUTION_NOVIDEO | 19 | The no video resolution |
PL_WINDOW_RESOLUTION_UNKNOWN | 20 | The unknown resolution |
PL_WINDOW_RESOLUTION_UNSTABLE | 21 | The unstable resolution to control AV Mute without showing banner |
PL_WINDOW_RESOLUTION_288I | 22 | The 352x288 resolution for MHEG to control AV Mute without showing banner. |
PL_WINDOW_SEEK_UNKNOWN | 0 | The unknown seek type |
PL_WINDOW_SEEK_FAVORITE | 1 | The favorite information seek |
PL_WINDOW_SEEK_CURRENT | 2 | The current information seek |
PL_WINDOW_SEEK_UP | 3 | The seek up for the next information to be set |
PL_WINDOW_SEEK_DOWN | 4 | The seek down for the previous information to be set |
PL_WINDOW_SEEK_FIRST | 5 | The first information seek |
PL_WINDOW_SEEK_LAST | 6 | The last information seek |
PL_WINDOW_SEEK_NEXT | 7 | The next input information seek |
PL_WINDOW_SEEK_PREV | 8 | The previous input information seek |
PL_WINDOW_SEEK_BACK | 9 | The information before changing to current information |
PL_WINDOW_SEEK_EXE | 10 | The input information |
PL_WINDOW_SEEK_DIRECT | 11 | The input information without checking whether it can be changed |
PL_WINDOW_SEEK_TEMPORAL | 12 | After execution, change only current information |
PL_WINDOW_SHOW_TYPE_OFF | 0 | The video off type |
PL_WINDOW_SHOW_TYPE_ON | 1 | The video on type |
PL_WINDOW_SHOW_TYPE_STOP | 2 | The video stop type |
PL_WINDOW_SHOW_TYPE_START | 3 | The video start type |
PL_WINDOW_SHOW_TYPE_NO_SIGNAL | 4 | The video no signal type (if blue screen option is set, set video blue screen) |
PL_WINDOW_SHOW_TYPE_VCHIP_ON | 5 | The video blue screen on (when vchip, child lock on) |
PL_WINDOW_SHOW_TYPE_VCHIP_OFF | 6 | The video blue screen off |
PL_WINDOW_SOURCE_TV | 0 | The TV source |
PL_WINDOW_SOURCE_ATV | 1 | The ATV source |
PL_WINDOW_SOURCE_DTV | 2 | The DTV source |
PL_WINDOW_SOURCE_CATV | 3 | The CATV source |
PL_WINDOW_SOURCE_CDTV | 4 | The CDTV source |
PL_WINDOW_SOURCE_PATV | 5 | The PATV source |
PL_WINDOW_SOURCE_PDTV | 6 | The PDTV source |
PL_WINDOW_SOURCE_SDTV | 7 | The SDTV source |
PL_WINDOW_SOURCE_ATV1 | 11 | The ATV1 source |
PL_WINDOW_SOURCE_ATV2 | 12 | The ATV2 source |
PL_WINDOW_SOURCE_DTV1 | 13 | The DTV1 source |
PL_WINDOW_SOURCE_DTV2 | 14 | The DTV2 source |
PL_WINDOW_SOURCE_AV1 | 15 | The AV1 source |
PL_WINDOW_SOURCE_AV2 | 16 | The AV2 source |
PL_WINDOW_SOURCE_AV3 | 17 | The AV3 source |
PL_WINDOW_SOURCE_AV4 | 18 | The AV4 source |
PL_WINDOW_SOURCE_SVIDEO1 | 19 | The SVIDEO1 source |
PL_WINDOW_SOURCE_SVIDEO2 | 20 | The SVIDEO2 source |
PL_WINDOW_SOURCE_SVIDEO3 | 21 | The SVIDEO3 source |
PL_WINDOW_SOURCE_SVIDEO4 | 22 | The SVIDEO4 source |
PL_WINDOW_SOURCE_COMP1 | 23 | The COMP1 source |
PL_WINDOW_SOURCE_COMP2 | 24 | The COMP2 source |
PL_WINDOW_SOURCE_COMP3 | 25 | The COMP3 source |
PL_WINDOW_SOURCE_COMP4 | 26 | The COMP4 source |
PL_WINDOW_SOURCE_PC1 | 27 | The PC1 source |
PL_WINDOW_SOURCE_PC2 | 28 | The PC2 source |
PL_WINDOW_SOURCE_PC3 | 29 | The PC3 source |
PL_WINDOW_SOURCE_PC4 | 30 | The PC4 source |
PL_WINDOW_SOURCE_HDMI1 | 31 | The HDMI1 source |
PL_WINDOW_SOURCE_HDMI2 | 32 | The HDMI2 source |
PL_WINDOW_SOURCE_HDMI3 | 33 | The HDMI3 source |
PL_WINDOW_SOURCE_HDMI4 | 34 | The HDMI4 source |
PL_WINDOW_SOURCE_SCART1 | 35 | The SCART1 source |
PL_WINDOW_SOURCE_SCART2 | 36 | The SCART2 source |
PL_WINDOW_SOURCE_SCART3 | 37 | The SCART3 source |
PL_WINDOW_SOURCE_SCART4 | 38 | The SCART4 source |
PL_WINDOW_SOURCE_DVI1 | 39 | The DVI1 source |
PL_WINDOW_SOURCE_DVI2 | 40 | The DVI2 source |
PL_WINDOW_SOURCE_DVI3 | 41 | The DVI3 source |
PL_WINDOW_SOURCE_DVI4 | 42 | The DVI4 source |
PL_WINDOW_SOURCE_MEDIA | 43 | The media source |
PL_WINDOW_SOURCE_HOMING | 44 | The DCR HOMING source |
PL_WINDOW_SOURCE_NONE | 45 | No source |
Methods
GetScreenRect | ||
Description | ||
The GetScreenRect function gets the screen size (left, top, width, height) of the video layer. | ||
Parameters | none | |
Return | ■Success - String - values connected with “/” * (e.g.) 0010/0010/0320/0240 ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var type = WindowPlugin.GetScreenRect(); |
SetScreenRect | ||
Description | ||
This API is used to set Screen Rectangle | ||
Parameters | ■X - Number ■Y - Number ■W - Number ■H - Number | |
Return | ■Number - success : returns 1 - fail : returns negative number | |
Emulator Support | Yes | |
SDK Constraint | None | |
Example | ||
var ret = SefPlugin.Execute("SetScreenRect","0","0","1280","720"); If(ret != true) { console.log("Failed! Result = " + ret); } |
GetResolution | ||
Description | ||
The GetResolution function gets the resolution of the video layer (for example, 720P, 1080I, NoSignal, NotSupported, and so on). | ||
Parameters | none | |
Return | ■Success - resolution of the video layer (ex: 720P, 1080I, NoSignal, NotSupported, ...) ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
if( PL_WINDOW_SHOW_STATE_START != WindowPlugin.GetState_Show()) { WindowPlugin.Show(), PL_WINDOW_SHOW_TYPE_START); } |
GetSource | ||
Description | ||
The GetSource command gets the current source (for example, TV, PC, or DVI, and so on). | ||
Parameters | none | |
Return | ■Success - current source (PL_WINDOW_SOURCE) ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
if( PL_WINDOW_SOURCE_MEDIA != WindowPlugin.GetSource()) { WindowPlugin.SetSource(), PL_WINDOW_SOURCE_MEDIA); } |
SetSource | ||
Description | ||
The SetSource function sets the current source (for example, TV, PC, or DVI, and so on). | ||
Parameters | ■source - PL_WINDOW_SOURCE - The Source | |
Return | ■Success - positive value ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
if (PL_WINDOW_SOURCE_MEDIA != WindowPlugin.GetSource()) { WindowPlugin.SetSource(PL_WINDOW_SOURCE_MEDIA); } |
SetPreviousSource | ||
Description | ||
The SetPreviousSource command changes the previous set source (for example, TV, PC, or DVI, and so on). | ||
Parameters | none | |
Return | ■Success - positive value ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
// Sets Media Source WindowEmp.Execute('SetSource', PL_WINDOW_SOURCE_MEDIA); // Sets Previous Source WindowEmp.Execute('SetPreviousSource'); |
GetCurrentChannel_Major | ||
Description | ||
The GetCurrentChannel_Major function gets the major number (for example, “11” from “11-1”) of the current channel number. | ||
Parameters | none | |
Return | ■Success - major number of the current channel number ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var major = WindowPlugin.GetCurrentChannel_Major(); var minor = WindowPlugin.GetCurrentChannel_Minor(); var channelNumber = major + "-" + minor; |
GetCurrentChannel_Minor | ||
Description | ||
The GetCurrentChannel_Minor function gets the minor number (for example, “1” from “11-1”) of the current channel number. | ||
Parameters | none | |
Return | ■Success - minor number of the current channel number ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var major = WindowPlugin.GetCurrentChannel_Major(); var minor = WindowPlugin.GetCurrentChannel_Minor(); var channelNumber = major + "-" + minor; |
GetCurrentChannel_Name | ||
Description | ||
The GetCurrentChannel_Name function gets the name of the current channel (for example, “BBC”). | ||
Parameters | none | |
Return | ■Success - name of the current channel ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var name = WindowPlugin.GetCurrentChannel_Name() |
GetCurrentChannel_OriginNetID | ||
Description | ||
The GetCurrentChannel_OriginNetID function gets the OriginNetID of the current channel. | ||
Parameters | none | |
Return | ■Success - OriginNetID of the current channel ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var originNetID = WindowPlugin.GetCurrentChannel_OriginNetID(); |
GetCurrentChannel_ProgramNumber | ||
Description | ||
The GetCurrentChannel_ProgramNumber function gets the program number of the current channel. | ||
Parameters | none | |
Return | ■Success - program number of a current channel ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var programNumber = WindowPlugin.GetCurrentChannel_ProgramNumber(); |
GetCurrentChannel_PTC | ||
Description | ||
The GetCurrentChannel_PTC function gets the PTC of the current channel. | ||
Parameters | none | |
Return | ■Success - PTC of the current channel ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var PTC = WindowPlugin.GetCurrentChannel_PTC(); |
GetCurrentChannel_ServiceName | ||
Description | ||
The GetCurrentChannel_ServiceName function gets the service name of the current channel. | ||
Parameters | none | |
Return | ■Success - service name of the current channel ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var serviceName = WinWindowPlugin.GetCurrentChannel_ServiceName(); |
GetCurrentChannel_Type | ||
Description | ||
The GetCurrentChannel_Type function gets the type (for example, AnalogTV, DigitalTV, CableAnalogTV, CableDigitalTV, and so on) of the current channel. | ||
Parameters | none | |
Return | ■Success - PL_WINDOW_CHANNEL_TYPE - type of the current channel ■Fail - negative value | |
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var type = WindowPlugin.GetCurrentChannel_Type(); |