76
edits
| Line 58: | Line 58: | ||
* Active Notifications: | * Active Notifications: | ||
**When the user starts using the device again, i.e. becomes 'active', the web page is notified immediately if | **When the user starts using the device again, i.e. becomes 'active', the web page is notified immediately if the user directly interacted (mouse over event, keyboard event, touch based event) with the web page. | ||
** If the user interacts with another application other than the web page, the user has become 'active' but indirectly. When the user becomes indirectly active, 'active' notifications are sent to the registered idle observers after a fuzz time has elapsed. This fuzz time is randomly generated and is generated once per state transition. I.e. when the user transitions from an 'idle' state to an 'active' state a random fuzz time is generated and applied after which time the idle observers are notified that the user is 'active'. | ** If the user interacts with another application other than the web page, the user has become 'active' but indirectly. When the user becomes indirectly active, 'active' notifications are sent to the registered idle observers after a fuzz time has elapsed. This fuzz time is randomly generated and is generated once per state transition. I.e. when the user transitions from an 'idle' state to an 'active' state a random fuzz time is generated and applied after which time the idle observers are notified that the user is 'active'. | ||
| Line 77: | Line 77: | ||
! Where | ! Where | ||
|- | |- | ||
| | | Idle observer requested idle time in seconds | ||
| | | Array of idle observers | ||
|- | |||
| Idle callback function | |||
| Array of idle observers | |||
|- | |||
| Active callback function | |||
| Array of idle observers | |||
|} | |} | ||
| Line 92: | Line 98: | ||
| ''In:'' | | ''In:'' | ||
| addIdleObserver() | | addIdleObserver() | ||
| Requested idle time in seconds. Idle callback function. Active callback function. | | * Requested idle time in seconds. * Idle callback function. * Active callback function. | ||
| The requested idle time in seconds is the amount of idle time that needs to elapse before the idle observer receives 'idle | | The requested idle time in seconds is the amount of idle time that needs to elapse before the idle observer receives 'idle' notifications. Notifications are idle and active callback functions. The mininum requested idle time in seconds must be 1 second. | ||
|- | |- | ||
| ''In:'' | | ''In:'' | ||
| removeIdleObserver() | | removeIdleObserver() | ||
| Requested idle time in seconds. Idle callback function. Active callback function. | | Requested idle time in seconds. Idle callback function. Active callback function. | ||
| The requested idle time in seconds is the amount of idle time that needs to elapse before the idle observer receives 'idle | | The requested idle time in seconds is the amount of idle time that needs to elapse before the idle observer receives 'idle' notifications. The notifications are the idle and active callback functions. The mininum requested idle time in seconds must be 1 second. | ||
|- | |- | ||
| ''Out:'' | | ''Out:'' | ||
| Line 105: | Line 111: | ||
| The idle and active callback functions are determined by the front end developer. | | The idle and active callback functions are determined by the front end developer. | ||
|} | |} | ||
<br> | <br> | ||
edits