title: Playing audio file returns "Uncaught (in promise)" but works in console
body: <p>I'm trying to play audio files (I've tried many). All of them are mp3s.
  I've tested the following on both MAMP localhost and also by just running it in the browser.</p>
  
  <p>I use the following javascript:</p>
  
  <pre><code>var testSound = new Audio();
  testSound.src = "a.mp3"
  setTimeout(testSound.play.bind(testSound),100)
  </code></pre>
  
  <p>This returns the error:</p>
  
  <pre><code>Uncaught (in promise)
  </code></pre>
  
  <p>Trying to catch it:</p>
  
  <pre><code>var testSound = new Audio();
  testSound.src = "a.mp3"
  setTimeout(playSound,100)
  function playSound () {
      testSound.play().then(response =&gt; {
  
      }).catch(e =&gt; {
          console.log(e);
      })
  }
  </code></pre>
  
  <p>returns nothing (<code>""</code>)</p>
  
  <p>But if I now turn to the console and simply type:</p>
  
  <pre><code>testSound.play()
  </code></pre>
  
  <p>The sound plays as it's supposed to.</p>
  
  <p>Even if I comment the third line of the first code snippet like:</p>
  
  <pre><code>//setTimeout(testSound.play.bind(testSound),100)
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>Even if people don't know what the solution is I'd still be interested to know if they can reproduce the error.</p>
  
  <p><strong>Edit 2:</strong></p>
  
  <p>By the way, the problem doesn't persist in Firefox or Safari.</p>