Skip to content

API for Idle detection #48

@elondaits

Description

@elondaits

In exhibits it's useful / a requirement to do something when the exhibit has been idle (no touch / mouse or keyboard events for N seconds):

  • Return to the initial screen / reset the exhibit.
  • Enter demo mode.
  • Print an announcement.

Unfortunately this cannot be done at app level (allegedly) because when an event (mouse, touch) is captured within an iframe the hosting page never gets a notification. Schemes to capture and forward events would be complex and hacky.

This is simple to do at OS level through various system-specific mechanisms (such as X Screensaver in Linux).

I found there is a node.js / electron module which wraps these various mechanisms: node-desktop-idle. There is more than one suitable module, actually... so some quick research should be done before implementing this feature.

So my proposal is to:

  • Add a properly and thoroughly documented API to the Kiosk Browser to enable idle state detection (after N seconds) by apps running on it.
  • Add a testing web page for manual (regression) testing of this feature.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions