CAPH.PLATFORM.DTV.DEVICE
Device is an object which provides various kinds of methods related to a DTV platform. The main APIs of Device are 'sefPlugin', 'plugin', 'registerKey' and 'unregisterKey.' Using sefPlugin method, a user can get a plugin or result of that method of plugin executed. Using plugin method, a user can get a plugin. Using registerKey method, a user can register a key code. Also, using unregisterKey method, a user can unregister a key code.
Contents
Methods
hideSettingPopup | ||
Description | ||
Hides setting popup of DTV. | ||
Parameters | ■Void | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
caph.platform.dtv.Device.hideSettingPopup( ); |
registerKey | ||
Description | ||
Registers the keycode. | ||
Parameters | ■keyCode - Number - keycode mapping DTV. One of caph.key enumeration | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
caph.platform.dtv.Device.registerKey(caph.key.VOL_UP); |
showSettingPopup | ||
Description | ||
Shows setting popup of DTV. | ||
Parameters | ■mode - Number * mode 0 : Sound setting. * mode 1 : Picture setting. ■callback (Optional) - Function - callback function to be called when the popup is closed. | |
Return | ■Object - Return value of Nnavi.ActivateWithData() method. | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
caph.platform.dtv.Device.showSettingPopup(1, function () { console.log('callback is called'); }); |
unRegisterKey | ||
Description | ||
Unregisters the keycode. | ||
Parameters | ■keyCode - Number - keycode mapping DTV. One of caph.key enumeration | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
caph.platform.dtv.Device.unRegisterKey(caph.key.VOL_UP); |
setVolumeAndChannelControl | ||
Description | ||
Enables DTV volume and channel control | ||
Parameters | ■bEnable - Boolean - DTV Volume and Channel control is enabled or not | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var bEnable = true; caph.platform.dtv.Device.setVolumeAndChannelControl(bEnable); |
setVolumeControl | ||
Description | ||
Enables DTV volume control | ||
Parameters | ■bEnable - Boolean - DTV Volume control is enabled or not | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var bEnable = true; caph.platform.dtv.Device.setVolumeControl(bEnable); |
checkSupportedFeature | ||
Description | ||
Checks whether feature is supported in device | ||
Parameters | ■feature - string - one of ( gesturerecognition / voicerecognition / mouse / 3dplayback ) | |
Return | ■Number - 1 : supported, 0: not supported, - -1 : firmware update needed | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var feature = 'mouse'; caph.platform.dtv.Device.checkSupportedFeature(feature); |
getTargetLocation | ||
Description | ||
Returns the country or region providing service to device | ||
Parameters | ■Void | |
Return | ■String - this means the country or region providing service to device. - [default : 'USA'] | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var location = caph.platform.dtv.Device.getTargetLocation(); doSomething(location); |
plugin | ||
Description | ||
Returns plugin | ||
Parameters | ■name - String - Plugin name as below. * 'TV', 'TVMW', 'NNavi', 'Audio', 'APPCommon', 'FrontPanel', 'ImageViewer', 'Player', 'AUI', 'Storage', 'Network', 'Download', 'Screen', 'Time', 'Video', 'Window', 'ExternalWidgetInterface', 'FileSystem', 'Gamepad', 'Michroph' | |
Return | ■Object - plugin | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var np = caph.platform.dtv.Device.plugin('NNavi'); np.SendEventToDevice(EVENT_TO_DEVICE_HIDE_TOOLS, 0); |
sefPlugin | ||
Description | ||
Returns plugin or result that method of plugin is executed | ||
Parameters | ■name - String - Name of plugin ■method (Optional) - String - Method of plugin will be executed | |
Return | ■Object - If optional parameter is not input, plugin is returned ■Return value of method of plugin - If optional parameter is input, return value of method of plugin is returned. | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var nTargetLocation = caph.platform.dtv.Device.sefPlugin('TV', 'GetTargetLocation'); doSomething(nTargetLocation); |
getScreenSize | ||
Description | ||
Returns the screen resolution of the device | ||
Parameters | ■Void | |
Return | ■Array - An array of [width, height] | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var size = caph.platform.dtv.Device.getScreenSize(); |
getAudioOutputDevice | ||
Description | ||
Returns Audio Output Device type. | ||
Parameters | ■Void | |
Return | ■String - this means the type of audio output device. - [default : unknown] | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var str = caph.platform.dtv.Device.getAudioOutputDevice( ); doSomething(str); |