title: Google Chrome Autoplay Policy Replaced disable-gesture-requirement-for-media-playback In Version 60.X
body: <p>I have a PHP webpage I created for our office and it automatically refreshes every minute looking for new changes in a bunch of different databases.  There are many different notifications I play in the form of wav files to our end users when changes are made.  </p>
  
  <p>For example I notify the employees on these events:</p>
  
  <p>Their AM Break</p>
  
  <p>Their Lunch</p>
  
  <p>Their PM Break</p>
  
  <p>When a new article is posted to our KB</p>
  
  <p>BUT, most importantly:
  I have an IFrame within this same page and the IFrame refreshes every 5 seconds looking for changes in a special table called "override_request".
  When someone clicks a button requesting for an override a sound will alarm for a large group of employees to accept the override.  The sound will repeat every 5 seconds until someone accepts the override.  This may sound annoying but this is a call center and every 5 seconds that someone waits while a customer is on the phone is crucial.</p>
  
  <p>In earlier versions of chrome background audio would play no matter what tab or application you were in.  Around version 54.X Chrome disabled the background audio by default and later provided a flag called (disable-gesture-requirement-for-media-playback)</p>
  
  <p>With the latest release of Google Chrome version 60.X up they have removed the (disable-gesture-requirement-for-media-playback) and provided another flag called (Autoplay Policy).  There are two big differences between the new flag and the old flag.</p>
  
  <p>First, the new flag allows for background audio to play only if background audio is played prior to switching tabs.  That's not the problem, I created a blank audio file to load upon logging into the site and it resolved that issue.</p>
  
  <p>Now, the problem:
  Once the new flag (Autoplay Policy) recognizes the background audio the first time upon login, it allows the audio to play in the background until the page performs a refresh!  Once the page automatically refreshes it resets the flag that was allowing the background audio.  Chrome is recognizing the fact that the page refreshed and the user wasn't on the page at time of refresh so it blocks any further background audio from that tab until it is brought back into the foreground.</p>
  
  <p>Does anyone know of another flag or javascript that will allow the page refresh and keep the background audio notifications alive?</p>