issue #11 Fix multiple play bug in welcome video playback. Preparing amenity order history feature.

This commit is contained in:
Paul Kim
2024-03-17 17:37:21 +09:00
parent 4ef3896e2c
commit d9f0ee0e34
4 changed files with 53 additions and 6 deletions

View File

@@ -441,7 +441,9 @@
switch (e.keyCode) {
case 602: // Portail
window.location.replace('./index.html');
if ( HotelTV.dbginfo['en'] == true ) {
window.location.replace('./index.html');
}
break;
case 409:
HotelTV.hcap.PwrOff();

View File

@@ -449,6 +449,7 @@ HotelTV.Init = async function() {
//Save to Session
sessionStorage.setItem("dbginfo", JSON.stringify(HotelTV.dbginfo));
sessionStorage.setItem("devinfo", JSON.stringify(HotelTV.devinfo));
sessionStorage.setItem("svrinfo", JSON.stringify(HotelTV.svrinfo));
sessionStorage.setItem("settings", JSON.stringify(HotelTV.settings));
@@ -489,6 +490,7 @@ HotelTV.LoadWelCome = async function() {
//Turn Off HCAP api log
extDisableHcapConsoleLog = true;
HotelTV.dbginfo = await JSON.parse(sessionStorage.getItem("dbginfo"));
HotelTV.devinfo = await JSON.parse(sessionStorage.getItem("devinfo"));
HotelTV.svrinfo = await JSON.parse(sessionStorage.getItem("svrinfo"));
//HotelTV.state = await JSON.parse(sessionStorage.getItem("state"));
@@ -622,6 +624,7 @@ HotelTV.LoadAppFull = async function() {
HotelTV.ui_utils.SetBusy(true);
//STEP#01: Load session info
HotelTV.dbginfo = await JSON.parse(sessionStorage.getItem("dbginfo"));
HotelTV.devinfo = await JSON.parse(sessionStorage.getItem("devinfo"));
HotelTV.svrinfo = await JSON.parse(sessionStorage.getItem("svrinfo"));
HotelTV.services = await JSON.parse(sessionStorage.getItem("services"));

View File

@@ -9,6 +9,42 @@
* Created at : 2020-11-26 02:21:56
* Last modified : 2020-11-26 15:31:40
*/
const gRmtKey = {
left: 37,
right: 39,
up: 38,
down: 40,
enter: 13,
back: 461,
red: 403,
green: 404,
yellow: 405,
blue: 406,
stop: 413,
play: 415,
num0: 48,
num1: 49,
num2: 50,
num3: 51,
num4: 52,
num5: 53,
num6: 54,
num7: 55,
num8: 56,
num9: 57,
chup: 427,
chdown: 428,
chprev: 711,
/** ENNPLE SPECIAL KEY */
amenity: -2072433963,
roomservice: -2072437788,
flight: -2072437533,
weather: -2072438298,
tv: -2072443143,
}
HotelTV.namespace('HotelTV.ui_welcome');
HotelTV.ui_welcome = (function() {
@@ -287,11 +323,13 @@ HotelTV.ui_welcome = (function() {
$(document).on('keydown', function(_evt) { //attach event listener
console.log("LANGSEL KEY EVENT::> " + _evt.keyCode);
if (_state.menu.stage.cur == "langSel") {
if (_evt.keyCode == 37) {
if (_evt.keyCode == gRmtKey.left) {
$('#lst_langsel').trigger('prev.owl')
} else if (_evt.keyCode == 39) {
} else if (_evt.keyCode == gRmtKey.right) {
$('#lst_langsel').trigger('next.owl')
} else if (_evt.keyCode == 13) {
} else if (_evt.keyCode == gRmtKey.enter) {
_state.menu.stage.cur = "preparingWelcomeCtz";
let found_dev_locale = false;
// SET PLATFORM LANGUAGE
// HotelTV.hcap.SetPlatformLanguage(_state.lang);
@@ -318,7 +356,7 @@ HotelTV.ui_welcome = (function() {
/** Play slide shows */
} else if (_ctzWc.intro == 'video') {
HotelTV.ui_utils.SetBusy(true);
/** Play movie clip */
HotelTV.hcap.MediaPlay(
_ctzWc.videos[_state.lang].download,
@@ -326,6 +364,7 @@ HotelTV.ui_welcome = (function() {
"video/mp4",
1,
() => {
HotelTV.ui_utils.SetBusy(false);
console.log("STARTUP Done CB.");
//Shows up skip button
let _elmnt_btn_skip = $(".control .skip_video");
@@ -336,6 +375,7 @@ HotelTV.ui_welcome = (function() {
},
() => {
console.log("STARTUP Fail CB.");
HotelTV.ui_utils.SetBusy(false);
HotelTV.UnloadWelCome();
}
);

View File

@@ -106,7 +106,9 @@
function(e) {
switch (e.keyCode) {
case 602: // Portail
window.location.replace('./index.html');
if ( HotelTV.dbginfo['en'] == true ) {
window.location.replace('./index.html');
}
break;
default:
console.log("Key Code:" + e.keyCode)