简体   繁体   中英

Detect Google Chrome in Kiosk Mode

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM