how to detect if the user using Google Chrome in kiosk mode?
I want to know if the user is using chrome in kiosk mode if it is not for me to display a message to put teaching so she can use the resources that only the kiosk mode can provide
You can check the isKioskSession
property on the launchData
object you get from the chrome.app.runtime.onLaunched event.
chrome.app.runtime.onLaunched.addListener(function(launchData) {
if (launchData.isKioskSession) {
// yes, we are in kiosk mode
}
});
EDIT
The above answer assumes that you are in a Chrome app. If you are trying to detect whether a page is in a Chrome browser launched with the --kiosk option, I don't know of a way to detect that. However, this is functionally equivalent to running in fullscreen mode, which you can detect with the Fullscreen API.
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With