javascript - Can an HTML5 notification fire from an inactive tab and play an audio alert? -


say, want play beep.mp3 on hour wrote javascript code this, not hard. when user switches tab, , page becomes living in inactive tab, won't hear audio alerts more.

is there remedy this?

if include audio in html can play using javascript, if browser tab inactive.

<body>     <audio id="beep" src="audio source file" preload="auto" ></audio>      <script>         function playbeep() {            document.getelementbyid("beep").play();         }         playbeep();     </script> </body> 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -