gustafn
committed
on 03 Jun 20
countdown alarm: add audible alarm when the countdown timer reaches expiration.

Per default, the audible alarm is turned off, but the user … Show more
countdown alarm: add audible alarm when the countdown timer reaches expiration.

Per default, the audible alarm is turned off, but the user sees a

mute symbol.  When the user activates the audible alarm, the browser

will announce the nearing end by beep signals in increasingly shorter

periods before its expiration (default settings: 60, 30, 20, 10, 5,

2s; these values can be changed via HTML). Once a user has activated

the audio signals, these are preseveed between page changes via a

cookie. On some browsers (e.g. Chrome), the audioContext settings are

so restrictive, that the full reload requires a new activation of the

alarm via a "user gesture" (i.e. clicking on the audio symbol). It

would be not surprising, if some other browsers show different

behavior, but the code follows the relatively new recommendations. The

code was tested with Chrome/Chromium 83 and Firefox 77).

Show less