title: Playing a audio file in an onclick event
body: <p>I am trying to play an audio file that is when the button was pressed </p>
  
  <pre><code>&lt;audio controls&gt;
    &lt;source id="player" src="foo.mp3" type="audio/mpeg"&gt;&lt;/source&gt;
  &lt;/audio&gt;
  &lt;button onclick="functionName()"&gt;Play&lt;/button&gt;
  </code></pre>
  
  <p>When the play button pressed it has to call the function and it need to start my player , and some time i need to change the src content also when the button is pressed .
  Thanks in advance</p>