issue #10 #11 Add exception routine for power off by remote with hdmi input mode. Fix news doesn't show correctly after hdmi input disconnected.
This commit is contained in:
@@ -36,6 +36,7 @@ HotelTV.hcap = (function() {
|
||||
'clock_display', 'teletext', 'secure_mmr_pairing', 'dial', 'alljoyn', 'clock_source', 'xait_version',
|
||||
'asl_mode', 'screensaver_control', 'rms_trusted_ip', 'lg_service_xml_version', 'cec_device_control',
|
||||
'input_splash_image', 'block_usb', 'tv_channel_attribute_floating_ui',
|
||||
'room_number',
|
||||
'instant_power', 'hardware_version',
|
||||
'network_info',
|
||||
'tv_channel_ui', "mute_on_tv_input",
|
||||
@@ -900,7 +901,14 @@ HotelTV.hcap = (function() {
|
||||
});
|
||||
})
|
||||
|
||||
// STEP#004::> Power Mode
|
||||
// SETP#004::> Room Number(Device Name)
|
||||
let _str_newDevName = _devinfo['manufacture'] + "[" + _devconfig.roomNumber.toString() + "]";
|
||||
if ( _devinfo['room_number']!=_str_newDevName ){
|
||||
console.log("Set device name and room number as " + _str_newDevName );
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('room_number', _str_newDevName));
|
||||
}
|
||||
|
||||
// STEP#005::> Power Mode
|
||||
if (_devinfo["instant_power"] !== undefined) {
|
||||
let _instant_pwr_target_mode = 2;
|
||||
if (_devinfo["instant_power"] != _instant_pwr_target_mode) {
|
||||
@@ -936,7 +944,7 @@ HotelTV.hcap = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
// STEP#00X::> SERVICE RELATED PARAMETERS
|
||||
// STEP#006::> SERVICE RELATED PARAMETERS
|
||||
for (let _cfg in _devconfig) {
|
||||
if (_cfg == 'video') {
|
||||
for (let _item in _devconfig.video) {
|
||||
@@ -1087,42 +1095,42 @@ HotelTV.hcap = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
//Specifial parameters
|
||||
// STEP#007::> Specifial parameters
|
||||
if (_devinfo["boot_sequence_option"] !== undefined) {
|
||||
if (_devinfo["boot_sequence_option"] != 1) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('boot_sequence_option', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// Clock Display
|
||||
// STEP#008::> Clock Display
|
||||
if (_devinfo["clock_display"] !== undefined) {
|
||||
if (_devinfo["clock_display"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('clock_display', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// Input splash Image
|
||||
// STEP#009::> Input splash Image
|
||||
if (_devinfo["input_splash_image"] !== undefined) {
|
||||
if (_devinfo["input_splash_image"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('input_splash_image', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// USB Device Blocking
|
||||
// STEP#010::> USB Device Blocking
|
||||
if (_devinfo["block_usb"] !== undefined) {
|
||||
if (_devinfo["block_usb"] != 1) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('block_usb', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// WOL
|
||||
// STEP#011::> WOL
|
||||
if (_devinfo["wol_m"] !== undefined) {
|
||||
if (_devinfo["wol_m"] != "normal") {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('wol_m', "normal"));
|
||||
}
|
||||
}
|
||||
|
||||
// WIFI SCREEN SHARE
|
||||
// STEP#012::> WIFI SCREEN SHARE
|
||||
if (_devinfo["wifi_screen_share"] !== undefined) {
|
||||
// if (_devinfo["wifi_screen_share"] != 1) {
|
||||
// _pmFxnArProperty.push(__hcapfxn_set_property('wifi_screen_share', 1));
|
||||
@@ -1134,77 +1142,77 @@ HotelTV.hcap = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
// SMART SHARE
|
||||
// STEP#013::> SMART SHARE
|
||||
if (_devinfo["smart_share"] !== undefined) {
|
||||
if (_devinfo["smart_share"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('smart_share', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// SMART PARING
|
||||
// STEP#014::> SMART PARING
|
||||
if (_devinfo["smart_pairing"] !== undefined) {
|
||||
if (_devinfo["smart_pairing"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('smart_pairing', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// DIAL
|
||||
// STEP#015::> DIAL
|
||||
if (_devinfo["dial"] !== undefined) {
|
||||
if (_devinfo["dial"] != 1) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('dial', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// DMR
|
||||
// STEP#016::> DMR
|
||||
if (_devinfo["dmr"] !== undefined) {
|
||||
if (_devinfo["dmr"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('dmr', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// SOFTAP UI
|
||||
// STEP#017::> SOFTAP UI
|
||||
if (_devinfo["soft_ap_ui"] !== undefined) {
|
||||
if (_devinfo["soft_ap_ui"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('soft_ap_ui', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// SOFTAP
|
||||
// STEP#018::> SOFTAP
|
||||
if (_devinfo["soft_ap"] !== undefined) {
|
||||
if (_devinfo["soft_ap"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('soft_ap', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// APPLICATION CHANNEL CONTROL
|
||||
// STEP#019::> APPLICATION CHANNEL CONTROL
|
||||
if (_devinfo["application_channel_control"] !== undefined) {
|
||||
if (_devinfo["application_channel_control"] != 1) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('application_channel_control', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// TV CHANNEL UI
|
||||
// STEP#020::> TV CHANNEL UI
|
||||
if (_devinfo["tv_channel_ui"] !== undefined) {
|
||||
if (_devinfo["tv_channel_ui"] != 0) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('tv_channel_ui', 0));
|
||||
}
|
||||
}
|
||||
|
||||
// MUTE ON TV INPUT: Prevent TV channel auto play when exit OTT
|
||||
// STEP#021::> MUTE ON TV INPUT: Prevent TV channel auto play when exit OTT
|
||||
if (_devinfo["mute_on_tv_input"] !== undefined) {
|
||||
if (_devinfo["mute_on_tv_input"] != 1) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('mute_on_tv_input', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// SECURITY LEVEL
|
||||
// STEP#022::> SECURITY LEVEL
|
||||
if (_devinfo["security_level"] !== undefined) {
|
||||
if (_devinfo["security_level"] != 1) {
|
||||
_pmFxnArProperty.push(__hcapfxn_set_property('security_level', 1));
|
||||
}
|
||||
}
|
||||
|
||||
// // OSD LAYER ID
|
||||
// STEP#0XX::> OSD LAYER ID
|
||||
// if (_devinfo["osd_layer_id"] !== undefined) {
|
||||
// if (_devinfo["osd_layer_id"] != 0) {
|
||||
// _pmFxnArProperty.push(__hcapfxn_set_property('osd_layer_id', 0));
|
||||
@@ -1711,19 +1719,33 @@ HotelTV.hcap = (function() {
|
||||
|
||||
},
|
||||
|
||||
// _type은 hcap.externalinput.ExternalInputType형이고, 현재는 HDMI로 고정
|
||||
// _index는 HDMI포트 번호
|
||||
/**
|
||||
* _type은 hcap.externalinput.ExternalInputType형이고, 현재는 HDMI로 고정
|
||||
* _index는 HDMI포트 번호
|
||||
* @param {string} _type
|
||||
* @param {Number} _index
|
||||
* @returns
|
||||
* true: Success
|
||||
* false: Failure
|
||||
*/
|
||||
SetExternalInput: function(_type, _index) {
|
||||
hcap.externalinput.setCurrentExternalInput({
|
||||
"type" : hcap.externalinput.ExternalInputType.HDMI,
|
||||
"index" : _index,
|
||||
"onSuccess" : function() {
|
||||
console.log("onSuccess");
|
||||
},
|
||||
"onFailure" : function(f) {
|
||||
console.error("onFailure : errorMessage = " + f.errorMessage);
|
||||
}
|
||||
});
|
||||
try {
|
||||
hcap.externalinput.setCurrentExternalInput({
|
||||
"type" : hcap.externalinput.ExternalInputType.HDMI,
|
||||
"index" : _index,
|
||||
"onSuccess" : function() {
|
||||
console.log("onSuccess");
|
||||
return true;
|
||||
},
|
||||
"onFailure" : function(f) {
|
||||
console.error("onFailure : errorMessage = " + f.errorMessage);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} catch(_err) {
|
||||
console.log(`fail to perform getCurrentExternalInput() ${_err}`);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
Test: function() {
|
||||
|
||||
Reference in New Issue
Block a user