countdown alarm: add audible alarm when the countdown timer reaches expiration.
Per default, the audible alarm is turned off, but the user …
countdown alarm: add audible alarm when the countdown timer reaches expiration.Per default, the audible alarm is turned off, but the user sees amute symbol. When the user activates the audible alarm, the browserwill announce the nearing end by beep signals in increasingly shorterperiods before its expiration (default settings: 60, 30, 20, 10, 5,2s; these values can be changed via HTML). Once a user has activatedthe audio signals, these are preseveed between page changes via acookie. On some browsers (e.g. Chrome), the audioContext settings areso restrictive, that the full reload requires a new activation of thealarm via a "user gesture" (i.e. clicking on the audio symbol). Itwould be not surprising, if some other browsers show differentbehavior, but the code follows the relatively new recommendations. Thecode was tested with Chrome/Chromium 83 and Firefox 77).