We purchased (5) Samsung QM55B-T TV’s (touchscreen) with Tizen. We will be utilizing a series of layouts so that a user can walk up to the kiosk - see the main menu - select an option (ie: directory or maps), and those subsequent layouts will have a button leading back to the main menu.
What I’d like to happen, is that after 5min of inactivity on the screen, that the kiosk will start to play a playlist. (similar to a computer screensaver). And this playlist will continue playing in an endless loop. When a user comes up and touches the screen it will stop the playlist and take the user to the ‘main menu’ layout (every time).
I started playing with ChatGPT and it created a JavaScript as shown below. But looking for some help if this is on the right track or what I may need to do to make this work.
javascript
varidleTime = 0;
varidleInterval = setInterval(timerIncrement, 60000); // 1 minute
functiontimerIncrement() {
idleTime += 1;
if(idleTime > 4) { // 5 minutes
// Redirect to the Idle Playlist layout
window.location.href= 'URL_of_Idle_Playlist_Layout';
}
}
// Reset the idle timer on mouse movement or touch
document.onmousemove= document.onkeypress= function() {
idleTime = 0;
};