issue #7 #10 NETFLIX,YOUTUBE실행시 한글 및 영문으로 구동되도록 수정. YOUTUBE및 NETFLIX종료시 TV OSD출력 이슈 해결.

This commit is contained in:
Paul Kim
2023-02-14 18:16:55 +09:00
parent 7677b903d8
commit 4fd1762d4b
3 changed files with 77 additions and 28 deletions

View File

@@ -38,6 +38,7 @@ HotelTV.hcap = (function() {
'input_splash_image', 'block_usb', 'tv_channel_attribute_floating_ui',
'instant_power', 'hardware_version',
'network_info',
'tv_channel_ui',
'soft_ap_ui', "soft_ap", "soft_ap_password",
'end_of_item'
];
@@ -183,6 +184,21 @@ HotelTV.hcap = (function() {
});
};
/**
* HCAP Wrapper Function::> Get Device Locale List
* @param {string} sz_key property key name.
* @param {callback} callback is callback object
*/
function __hcapfxn_get_dev_locale_info(sz_key, callback) {
return new Promise((resolve, reject) => {
let param = {
"onSuccess": function(p) { resolve({ "key": sz_key, "info": p }) },
"onFailure": function(f) { resolve({ "key": sz_key, "info": null }); }
}
hcap.system.getLocaleList(param);
});
};
/**
* HCAP Wrapper Function::> Get ProCentric Server Info(Realted HCAP API:hcap.system.getProcentricServer)
* @param {string} sz_key property key name.
@@ -585,6 +601,10 @@ HotelTV.hcap = (function() {
}
//console.log(`Item[${_dic_item.key}] ::> ${_dic_item.value}`);
};
//Locale Information
__hcapfxn_get_dev_locale_info("getLocaleList").then(result => {
_devinfo['getLocaleList'] = result.info.list;
});
//Server Information
__hcapfxn_get_pctrsvrinfo("pro_centric_server_info").then(result => {
@@ -1018,6 +1038,13 @@ HotelTV.hcap = (function() {
}
}
// TV CHANNEL UI
if (_devinfo["tv_channel_ui"] !== undefined) {
if (_devinfo["tv_channel_ui"] != 0) {
_pmFxnArProperty.push(__hcapfxn_set_property('tv_channel_ui', 0));
}
}
// // OSD LAYER ID
// if (_devinfo["osd_layer_id"] !== undefined) {
// if (_devinfo["osd_layer_id"] != 0) {
@@ -1511,6 +1538,19 @@ HotelTV.hcap = (function() {
});
},
SetDeviceLocale: function(_new_locale) {
hcap.system.requestLocaleChange({
"specifier" : _new_locale,
"onSuccess" : function() {
console.log("onSuccess");
},
"onFailure" : function(f) {
console.error("onFailure : errorMessage = " + f.errorMessage);
}
});
},
Test: function() {
console.log("Test Start....");

View File

@@ -602,27 +602,18 @@ HotelTV.LoadAppFull = async function() {
let recvMsg = e.data;
//console.log(`Recv Msg[${recvMsg.event}]::> ${recvMsg.ret} ::> ${recvMsg.data}`);
//console.log(`Recv Msg[${recvMsg.event}]::> ${recvMsg.ret}`);
if (recvMsg.event == "update_epg") {
if (recvMsg.ret === "OK") {
HotelTV.epg = recvMsg.data;
HotelTV.ui_appfull.UpdateEpg();
}
} else if (recvMsg.event == "update_flight") {
if (recvMsg.ret === "OK") {
HotelTV.flight = { "count": recvMsg.data.count, "info": recvMsg.data.items };
}
} else if (recvMsg.event == "update_weather") {
// if (recvMsg.event == "update_epg") {
// if (recvMsg.ret === "OK") {
// HotelTV.epg = recvMsg.data;
// HotelTV.ui_appfull.UpdateEpg();
// }
// } else if (recvMsg.event == "update_news") {
// if (recvMsg.ret === "OK") {
// HotelTV.news = recvMsg.data;
// }
// } else if (recvMsg.event == "update_flight") {
// if (recvMsg.ret === "OK") {
// let x2js = new X2JS();
// _rspJson = x2js.xml2json($.parseXML(recvMsg.data));
// HotelTV.flight = { "count": Number(_rspJson.response.body.totalCount), "info": _rspJson.response.body.items.item };
// }
// } else if (recvMsg.event == "update_weather") {
// }
if (recvMsg.event == "update_report") {
} else if (recvMsg.event == "update_report") {
HotelTV.hcap.GetUptime();
HotelTV.hcap.GetDeviceUsage().then(_usage => {
//console.log(`USAGE::> CPU[${_usage.cpu}%]`);

View File

@@ -292,8 +292,26 @@ HotelTV.ui_welcome = (function() {
} else if (_evt.keyCode == 39) {
$('#lst_langsel').trigger('next.owl')
} else if (_evt.keyCode == 13) {
let found_dev_locale = false;
// SET PLATFORM LANGUAGE
// HotelTV.hcap.SetPlatformLanguage(_state.lang);
if ( 'getLocaleList' in HotelTV.devinfo )
{
for( let _localeIdx in HotelTV.devinfo.getLocaleList )
{
if ( HotelTV.devinfo.getLocaleList[_localeIdx].specifier== _state.lang ){
found_dev_locale = true;
break;
}
}
}
if ( found_dev_locale==true ){
HotelTV.hcap.SetDeviceLocale(_state.lang);
}else{
console.log("Set Default device locale set to en-US");
HotelTV.hcap.SetDeviceLocale('en-US');
}
// LANGUAGE 선택
if (_ctzWc.intro == 'image') {