2

I have an alert system web app, where if a new alert shows up, the app plays sound. But since there is this Autoplay Policy, the user must interact with a page first if I want to play an audio on a page. I read a lot of SO questions about this issue, like this, but what I want is to store let say in local storage if user already interacted with page and play the audio automatically if he is a returning user. Since my users opens my web app frequently, they dont want to click on a button every time to allow playing notifications. Any idea how to achieve that?

Runtime Terror
  • 6,242
  • 11
  • 50
  • 90
  • A user can create a launcher which runs the program with appropriate flags or policy set to disable default browser policy. – guest271314 Feb 01 '19 at 07:23

1 Answers1

1

You need https connection for it. when users grant the permission once, its save and not ask again for that page. for more check https://www.html5rocks.com/en/tutorials/getusermedia/intro/

Usama Kiyani
  • 195
  • 10