JSFiddle - React, Tailwind, and code Playground

HTML

<h1>
asdasdasd
</h1>
<audio id='player' controls>
  <source id='haha' src="some.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

JavaScript

$('h1').click(function(){
 var audio = $("#player");      
    $("#haha").attr("src", 'http://www.stephaniequinn.com/Music/Allegro%20from%20Duet%20in%20C%20Major.mp3');
    /****************/
    audio[0].pause();
    audio[0].load();//suspends and restores all audio element

    //audio[0].play(); changed based on Sprachprofi's comment below
    audio[0].oncanplaythrough = audio[0].play();
	
})