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
Post a Comment