Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  15 Nov 2019, Andreas Suter, Suggestion, javascript comunication 
    Reply  15 Nov 2019, Stefan Ritt, Suggestion, javascript comunication 
       Reply  17 Nov 2019, Konstantin Olchanski, Suggestion, javascript comunication 
          Reply  18 Nov 2019, Stefan Ritt, Suggestion, javascript comunication 
             Reply  18 Nov 2019, Konstantin Olchanski, Suggestion, javascript comunication 
    Reply  17 Nov 2019, Konstantin Olchanski, Suggestion, javascript comunication 
       Reply  18 Nov 2019, Stefan Ritt, Suggestion, javascript comunication 
Message ID: 1739     Entry time: 18 Nov 2019     In reply to: 1738     Reply to this: 1741
Author: Stefan Ritt 
Topic: Suggestion 
Subject: javascript comunication 
> Hi, Stefan - I did not look at your code, if all midas tabs are inactive, will the alarm sound still play?

Nope. All updates are done in mhhtpd_refresh(), and I changed it such that nothing is updated if hidden.

I agree however that this is bad. You want to hear alarms always. So I added some code to do ONLY alarm updates if in the background. 
No GUI changes, only audio playing. Checking is reduced from 1 Hz to 0.1 Hz (once every 10 seconds). I don't have however a solution 
to your problem "not enough interaction with page" which I have never seen so far.

I wonder if we should try push notifications: https://developers.google.com/web/fundamentals/codelabs/push-notifications
which seems a bit complicated to me. It might also be too subtle if someone is sleeping in front of the computer.

Stefan
ELOG V3.1.4-2e1708b5