This commit is contained in:
@@ -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....");
|
||||
|
||||
|
||||
@@ -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}%]`);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @summary short description for the file
|
||||
* @author Joel <joel.kim@centirm.com>
|
||||
*
|
||||
* Created at : 2020-11-26 02:21:56
|
||||
* Created at : 2020-11-26 02:21:56
|
||||
* Last modified : 2020-11-26 15:31:40
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@ HotelTV.ui_welcome = (function() {
|
||||
_media_status = 'playing';
|
||||
HotelTV.hcap.VideoWinSize(null);
|
||||
|
||||
//Hide welcome page
|
||||
//Hide welcome page
|
||||
__uifxn_WC_Show(null, function() {
|
||||
_state.menu.stage = "playWelcomeMovie";
|
||||
|
||||
@@ -212,7 +212,7 @@ HotelTV.ui_welcome = (function() {
|
||||
let _langCnt = Object.keys(_ctzOpening.languages).length;
|
||||
let _SupportedLang = _ctzOpening.languages;
|
||||
|
||||
//Add html elements for language selection
|
||||
//Add html elements for language selection
|
||||
let _div_langsel = document.querySelector('.welcome #lst_langsel');
|
||||
for (let __lang in _SupportedLang) {
|
||||
let _div_lang_btn = document.createElement('div');
|
||||
@@ -257,7 +257,7 @@ HotelTV.ui_welcome = (function() {
|
||||
*/
|
||||
function __uifxn_WC_Show(uri_img, _callback) {
|
||||
if (uri_img != null) {
|
||||
//Decision fist displyed language
|
||||
//Decision fist displyed language
|
||||
let _state = HotelTV.state;
|
||||
let _ctzOpening = HotelTV.opening;
|
||||
let _ctzWc = _ctzOpening.welcome;
|
||||
@@ -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') {
|
||||
@@ -357,7 +375,7 @@ HotelTV.ui_welcome = (function() {
|
||||
|
||||
|
||||
hndl_langSel.on('changed.owl.carousel', function(event) {
|
||||
// Update Language
|
||||
// Update Language
|
||||
console.log("LANG SEL[CHANGED]::>" + event.page.index);
|
||||
_state.lang = Object.keys(_ctzOpening.languages)[event.page.index];
|
||||
__uifxn_WC_SetCtz(_ctzGst.name, _ctzWc.message);
|
||||
@@ -365,9 +383,9 @@ HotelTV.ui_welcome = (function() {
|
||||
} else {
|
||||
//Hide welcome main frame
|
||||
if (_callback != null) {
|
||||
$(".welcome").fadeOut(1000, _callback); // display 속성을 none 으로 바꾼다.
|
||||
$(".welcome").fadeOut(1000, _callback); // display 속성을 none 으로 바꾼다.
|
||||
} else {
|
||||
$(".welcome").fadeOut(1000); // display 속성을 none 으로 바꾼다.
|
||||
$(".welcome").fadeOut(1000); // display 속성을 none 으로 바꾼다.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -380,7 +398,7 @@ HotelTV.ui_welcome = (function() {
|
||||
//ADD Network related event handler
|
||||
document.addEventListener("network_event_received", __uifxn_WC_OnNetEvt, false);
|
||||
|
||||
// Build up Welcome Page
|
||||
// Build up Welcome Page
|
||||
__uifxn_WC_BldPage();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user