title: Playing a sound in a browser (Chrome), from javascript
body: <p>I am writing an html page. I want it to make sounds, as specified by some javascript as it runs.</p>
  
  <p>In the html, as recommended in the answers I have read here, I have the line</p>
  
  <pre><code>&lt;embed src="wavs/beep.wav" autostart="true" width="0" height="0" id="beep" 
    enablejavascript="true"&gt;
  </code></pre>
  
  <p>This plays the sound at load time, so I am confident I have given a valid path to a valid .wav file. (I will set autostart to false once everything is working.)</p>
  
  <p>I have a function</p>
  
  <pre><code>function playSound ( soundname )   
    {
      var thissound = document.getElementById( soundname );
      thissound.Play();
      alert( "Played " + soundname );
    }
  </code></pre>
  
  <p>which I call using </p>
  
  <pre><code>  playSound( "beep" );
  </code></pre>
  
  <p>But when that call is made, there is no sound, although the alert happens. It looks to me as if I am doing everything in the recommended way, but I must have got something wrong.  What should I check next?</p>