title: Wait until sound finishes to use a web page
body: <p>I need to play a sound using JavaScript / jQuery. Currently, I'm using this code to play the sound:</p>
  
  <pre><code>var snd = new Audio('dir/file.wav');
  snd.play();
  </code></pre>
  
  <p>What I need is a web page to be unusable until the sounds ends playing. Probably with some kind of dialog while the sound is playing. When the sound ends, the modal displays a "Ok" button, and after pressing the button, you can continue using the page.</p>