top

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');


Constants

NameValueDescription
PL_WINDOW_CHANNEL_TYPE_UNKNOWN0The Unknown
Channel
PL_WINDOW_CHANNEL_TYPE_TV1The TV channel
PL_WINDOW_CHANNEL_TYPE_ATV2The Analog TV
Channel
PL_WINDOW_CHANNEL_TYPE_DTV3The Digital Tvchannel
PL_WINDOW_CHANNEL_TYPE_CATV4The cable analog TV channel
PL_WINDOW_CHANNEL_TYPE_CDTV5The cable digital TV channel
PL_WINDOW_CHANNEL_TYPE_PATV6The POD analog TV channel
PL_WINDOW_CHANNEL_TYPE_PDTV7The POD digital TV channel
PL_WINDOW_CHANNEL_TYPE_SDTV8The SDTV channel
PL_WINDOW_CHANNEL_TYPE_FREESAT9The Freesat channel
PL_WINDOW_CHANNEL_TYPE_MEDIA10The Media channel
PL_WINDOW_NAVIGATOR_MODE_ALL0The all channels mode
PL_WINDOW_NAVIGATOR_MODE_DIGITAL1The digital channel mode
PL_WINDOW_NAVIGATOR_MODE_ANALOG2The analog channel mode
PL_WINDOW_NAVIGATOR_MODE_FAVORITE3The favorite channel mode
PL_WINDOW_NAVIGATOR_MODE_CURR_TYPE4Unused
PL_WINDOW_NAVIGATOR_MODE_EXCEPT_ADDDEL5Unused
PL_WINDOW_NAVIGATOR_MODE_ANALOG_ALL6Unused
PL_WINDOW_RESOLUTION_NOTSUPPORT0Not supported
PL_WINDOW_RESOLUTION_NOSIGNAL1No signal
PL_WINDOW_RESOLUTION_NT2The NT resolution for NTSC3_58 color system
PL_WINDOW_RESOLUTION_NT_N3NT_N resolution for NTSC4_43 color system
PL_WINDOW_RESOLUTION_PC4The PC resolution
PL_WINDOW_RESOLUTION_1080I5The 1080I resolution
PL_WINDOW_RESOLUTION_1080P6The 1080P resolution
PL_WINDOW_RESOLUTION_720P7The 720P resolution
PL_WINDOW_RESOLUTION_480P8The 480P resolution
PL_WINDOW_RESOLUTION_480I9The 480I resolution
PL_WINDOW_RESOLUTION_640X480P10The 640 x 480P resolution
PL_WINDOW_RESOLUTION_1440x480I11The 1440X480I resolution
PL_WINDOW_RESOLUTION_576P12The 576P resolution
PL_WINDOW_RESOLUTION_576I13The 576I resolution
PL_WINDOW_RESOLUTION_PAL14The PAL resolution for PAL color system
PL_WINDOW_RESOLUTION_PAL_M15The PAL_M resolution for PAL_M color system
PL_WINDOW_RESOLUTION_PAL_N16The PAL_N resolution for PAL_N color system
PL_WINDOW_RESOLUTION_SECAM17The PAL_N resolution for PAL_N color system
PL_WINDOW_RESOLUTION_YC_SECAM18The YC_SECAM resolution
PL_WINDOW_RESOLUTION_NOVIDEO19The no video resolution
PL_WINDOW_RESOLUTION_UNKNOWN20The unknown resolution
PL_WINDOW_RESOLUTION_UNSTABLE21The unstable resolution to control AV Mute without showing banner
PL_WINDOW_RESOLUTION_288I22The 352x288 resolution for MHEG to control AV Mute without showing banner.
PL_WINDOW_SEEK_UNKNOWN0The unknown seek type
PL_WINDOW_SEEK_FAVORITE1The favorite information seek
PL_WINDOW_SEEK_CURRENT2The current information seek
PL_WINDOW_SEEK_UP3The seek up for the next information to be set
PL_WINDOW_SEEK_DOWN4The seek down for the previous information to be set
PL_WINDOW_SEEK_FIRST5The first information seek
PL_WINDOW_SEEK_LAST6The last information seek
PL_WINDOW_SEEK_NEXT7The next input information seek
PL_WINDOW_SEEK_PREV8The previous input information seek
PL_WINDOW_SEEK_BACK9The information before changing to current information
PL_WINDOW_SEEK_EXE10The input information
PL_WINDOW_SEEK_DIRECT11The input information without checking whether it can be changed
PL_WINDOW_SEEK_TEMPORAL12After execution, change only current information
PL_WINDOW_SHOW_TYPE_OFF0The video off type
PL_WINDOW_SHOW_TYPE_ON1The video on type
PL_WINDOW_SHOW_TYPE_STOP2The video stop type
PL_WINDOW_SHOW_TYPE_START3The video start type
PL_WINDOW_SHOW_TYPE_NO_SIGNAL4The video no signal type (if blue screen option is set, set video blue screen)
PL_WINDOW_SHOW_TYPE_VCHIP_ON5The video blue screen on (when vchip, child lock on)
PL_WINDOW_SHOW_TYPE_VCHIP_OFF6The video blue screen off
PL_WINDOW_SOURCE_TV0The TV source
PL_WINDOW_SOURCE_ATV1The ATV source
PL_WINDOW_SOURCE_DTV2The DTV source
PL_WINDOW_SOURCE_CATV3The CATV source
PL_WINDOW_SOURCE_CDTV4The CDTV source
PL_WINDOW_SOURCE_PATV5The PATV source
PL_WINDOW_SOURCE_PDTV6The PDTV source
PL_WINDOW_SOURCE_SDTV7The SDTV source
PL_WINDOW_SOURCE_ATV111The ATV1 source
PL_WINDOW_SOURCE_ATV212The ATV2 source
PL_WINDOW_SOURCE_DTV113The DTV1 source
PL_WINDOW_SOURCE_DTV214The DTV2 source
PL_WINDOW_SOURCE_AV115The AV1 source
PL_WINDOW_SOURCE_AV216The AV2 source
PL_WINDOW_SOURCE_AV317The AV3 source
PL_WINDOW_SOURCE_AV418The AV4 source
PL_WINDOW_SOURCE_SVIDEO119The SVIDEO1 source
PL_WINDOW_SOURCE_SVIDEO220The SVIDEO2 source
PL_WINDOW_SOURCE_SVIDEO321The SVIDEO3 source
PL_WINDOW_SOURCE_SVIDEO422The SVIDEO4 source
PL_WINDOW_SOURCE_COMP123The COMP1 source
PL_WINDOW_SOURCE_COMP2 24The COMP2 source
PL_WINDOW_SOURCE_COMP3 25The COMP3 source
PL_WINDOW_SOURCE_COMP4 26The COMP4 source
PL_WINDOW_SOURCE_PC1 27The PC1 source
PL_WINDOW_SOURCE_PC2 28The PC2 source
PL_WINDOW_SOURCE_PC3 29The PC3 source
PL_WINDOW_SOURCE_PC4 30The PC4 source
PL_WINDOW_SOURCE_HDMI1 31The HDMI1 source
PL_WINDOW_SOURCE_HDMI2 32The HDMI2 source
PL_WINDOW_SOURCE_HDMI3 33The HDMI3 source
PL_WINDOW_SOURCE_HDMI4 34The HDMI4 source
PL_WINDOW_SOURCE_SCART1 35The SCART1 source
PL_WINDOW_SOURCE_SCART2 36The SCART2 source
PL_WINDOW_SOURCE_SCART3 37The SCART3 source
PL_WINDOW_SOURCE_SCART4 38The SCART4 source
PL_WINDOW_SOURCE_DVI1 39The DVI1 source
PL_WINDOW_SOURCE_DVI2 40The DVI2 source
PL_WINDOW_SOURCE_DVI3 41The DVI3 source
PL_WINDOW_SOURCE_DVI4 42The DVI4 source
PL_WINDOW_SOURCE_MEDIA 43The media source
PL_WINDOW_SOURCE_HOMING 44The DCR HOMING source
PL_WINDOW_SOURCE_NONE 45No 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 SupportY
SDK ConstraintNone
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 SupportYes
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
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 SupportY
SDK ConstraintNone
Example
var type = WindowPlugin.GetCurrentChannel_Type();