Plugin Objects
Allows you to use some plugin functions.
The Application Manager provides a wrapper class that allows you to use some plugin functions. To use this class, insert the objects needed for the use of plugins in the index.html file.
Plugin | |
---|---|
Library path | $MANAGER_WIDGET/Common/API/Plugin.js |
Syntax | new Common.API.Plugin() |
Methods | |
Parameter | None |
Return Value | Plugin object |
Remarks | Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOnWatchDog();
|
Members | None |
Object list |
// pluginObjectTVMW
<object id="pluginObjectTVMW" border="0" classid="clsid:SAMSUNG-INFOLINK-TVMW" style="opacity: 0.0; background-color: #000; width: 0px; height: 0px;"></object>
// pluginObjectVideo
<object id="pluginObjectVideo" border="0" classid="clsid:SAMSUNG-INFOLINK-VIDEO" style="opacity: 0.0; background-color: #000;"></object>
// pluginObjectNNavi
<object id="pluginObjectNNavi" classid="clsid:SAMSUNG-INFOLINK-NNAVI" style="opacity: 0.0; background-color: #000; width: 0px; height: 0px;"></object>
// pluginObjectAppCommon
<object id="pluginObjectAppCommon" classid="clsid:SAMSUNG-INFOLINK-APPCOMMON" style="opacity: 0.0; background-color: #000; width: 0px; height: 0px;"></object>
|
setOnWatchDog | |
---|---|
The setOnWatchDog() method turns on the Watch dog function. | |
Syntax | setOnWatchDog() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks | Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOnWatchDog();
|
setOffWatchDog | |
---|---|
The setOffWatchDog() method turns off the Watch dog function. | |
Syntax | setOffWatchDog() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks | Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOffWatchDog();
|
setOnOSDState | |
---|---|
The setOnOSDState() method sets the area where the OSD is protected. | |
Syntax | setOnOSDState(left, top, width, height) |
Parameter |
left: left coordinate of the area top: top coordinate of the area width: width of the area height: height of the area |
Return Value | None |
Enumeration | None |
Remarks | Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOnOSDState(0, 0, 330, 540);
|
setOffOSDState | |
---|---|
The setOffOSDState() method cancels the previously set OSD area. | |
Syntax | setOffOSDState(left, top, width, height) |
Parameter |
left: left coordinate of the area top: top coordinate of the area width: width of the area height: height of the area |
Return Value | None |
Enumeration | None |
Remarks | Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOffOSDState(0, 0, 330, 540);
|
registKey | |
---|---|
The registKey() method lets the Application Manager register a specific key. | |
Syntax | registKey(pNumKeyCode) |
Parameter | pNumKeyCode: key code |
Return Value | None |
Enumeration | None |
Remarks |
Registration/unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.registKey(tvKey.KEY_ TOOLS);
|
unregistKey | |
---|---|
The unregistKey() method lets the Application Manager unregister a specific key. | |
Syntax | unregistKey(pNumKeyCode) |
Parameter | pNumKeyCode: key code |
Return Value | None |
Enumeration | None |
Remarks |
Registration/unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI =>new Common.API.Plugin();
pluginAPI.unreistKey(tvKey.KEY_ TOOLS);
|
registIMEKey | |
---|---|
The registIMEKey() method lets the Application Manager register IME key. | |
Syntax | registIMEKey() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Registers number keys from 0 to 9, - (hyphen), and previous channel key used for entering IME. Registration/unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.registIMEKey();
|
unregistIMEKey | |
---|---|
The unregistIMEKey() method lets the Application Manager unregister IME key. | |
Syntax | unregistIMEKey() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Unregisters number keys from 0 to 9, - (hyphen), previous channel key used in entering IME. Registration/unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.unregistIMEKey();
|
registAllKey | |
---|---|
The registAllKey() method let the Application Manager register all keys. | |
Syntax | registAllKey() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Registers all keys Registration/Unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.registAllKey();
|
unregistAllKey | |
---|---|
The unregistAllKey() method let the Application Manager unregister all keys. | |
Syntax | unregistAllKey() |
Parameter | None |
Return Value | None |
Remarks |
Unregisters all keys. Registration/Unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.unregistAllKey();
|
Enumeration | None |
registFullWidgetKey | |
---|---|
The registFullWidgetKey() method let the Application Manager register a specific key group. | |
Syntax | registFullWidgetKey() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Registers keys for fullwidget. Registration/Unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.registFullWidgetKey();
|
registPartWidgetKey | |
---|---|
The registPartWidgetKey() method lets the Application Manager register a specific key group. | |
Syntax | registPartWidgetKey() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Registers keys for part widget. Registration/Unregistration of keys should be done after window.onshow event. For more information, see Handling Remote Control Key Events. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.registPartWidgetKey();
|
SetBannerState | |
---|---|
The SetBannerState() method sets volume and channel OSD with the application. | |
Syntax | SetBannerState(nState) |
Parameter |
nState: Defined value on OSD you want to bring with the application: PL_NNAVI_STATE_BANNER_NONE = 0; Not Overwrapped OSD
PL_NNAVI_STATE_BANNER_VOL = 1; Overwapped Volume OSD
PL_NNAVI_STATE_BANNER_VOL_CH = 2; Overwapped Volume and Channel OSD (ex: Ticker App)
|
Return Value | None |
Enumeration | None |
Remarks |
To have the volume OSD on the screen, the volume key value should be registered. This is also applicable for channel OSD. Since Samsung Smart TV version 2.265 |
Example |
var PL_NNAVI_STATE_BANNER_NONE = 0;
var PL_NNAVI_STATE_BANNER_VOL = 1;
var PL_NNAVI_STATE_BANNER_VOL_CH = 2;
var pluginAPI = new Common.API.Plugin();
var tvKey = new Common.API.TVKeyValue();
pluginAPI.unregistKey(tvKey.KEY_VOL_UP);
pluginAPI.unregistKey(tvKey.KEY_VOL_DOWN);
pluginAPI.SetBannerState(PL_NNAVI_STATE_BANNER_VOL);
|
ShowTools | |
---|---|
The ShowTools() method displays pop-up windows for screen and sound adjustment. | |
Syntax | ShowTools(nTool) |
Parameter |
nTool: Defined value on the pop-up window to be displayed:
|
Return Value | None |
Enumeration | None |
Remarks |
You can see the point when the popup window is closed by signing up for curWidget.onWidgetEvent. Since Samsung Smart TV version 2.265 |
Example |
curWidget.onWidgetEvent = function() {
// Code that will be executed after closing the pop-up window
}
var pluginAPI = new Common.API.Plugin();
pluginAPI.ShowTools(1);
|
setOnIdleEvent | |
---|---|
The setOnIdleEvent() method enables the closing of the application if there is no input for a certain amount of time. | |
Syntax | setOnIdleEvent() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOnIdleEvent();
|
setOffIdleEvent | |
---|---|
The setOffIdleEvent() method sets idle OFF, which disables the closing of the application even if there is no input for a certain amount of time. | |
Syntax | setOffIdleEvent() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOffIdleEvent();
|
setOnScreenSaver | |
---|---|
The setOnScreenSaver() sets the screen saver on. | |
Syntax | setOnScreenSaver() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Screensaver is OFF when the application is closed. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOnScreenSaver();
|
setOffScreenSaver | |
---|---|
The setOffScreenSaver() method sets off the screen saver. | |
Syntax | setOffScreenSaver() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Available after calling setOnScreenSaver. Since Samsung Smart TV version 2.265 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOffScreenSaver();
|
isViewerKey | |
---|---|
The isViewerKey() method decides whether the key value entered is applicable for TV View or for the application. | |
Syntax | isViewerKey(pKeyCode) |
Parameter | pKeyCode: entered remote control key value at present |
Return Value |
True - Key processing for TV Viewer False - Key processing for Application |
Enumeration | None |
Remarks |
For processing the entered remote control keys, the input value in TV viewer is automatically transferred. Since Application Manager 2.266 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.isViewerKey(KEY_ENTER)
|
setOnFullScreen | |
---|---|
The setOnFullScreen() method turns on full screen. | |
Syntax | setOnFullScreen() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
In case of <fullwidget>y</fullwidget>, it is not necessary to call this function. Since Samsung Smart TV version 2.306 |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOnFullScreen();
|
setOffFullScreen | |
---|---|
The setOffFullScreen() method turns off full screen. | |
Syntax | setOffFullScreen() |
Parameter | None |
Return Value | None |
Enumeration | None |
Remarks |
Available after calling setOnFullScreen. Since Samsung Smart TV version 2.306) |
Example |
var pluginAPI = new Common.API.Plugin();
pluginAPI.setOffFullScreen();
|