There are two buttons in the audio player code: start and stop. These two functions are required to work on a single button on a click. Preferably with the corresponding icon change.

<audio id='player' src='http://retroserver.streamr.ru:8040/radio7128.mp3'/> <button onclick='document.getElementById(&apos;player&apos;).play()'><font size='+1'><i aria-hidden='true' class='fa fa-play'/></font></button> <button onclick='document.getElementById(&apos;player&apos;).pause()'><font size='+1'><i aria-hidden='true' class='fa fa-stop'/></font></button> <button onclick='document.getElementById(&apos;player&apos;).volume+=0.1'><font size='+2'><i aria-hidden='true' class='fa fa-volume-up'/></font></button> <button onclick='document.getElementById(&quot;player&quot;).volume=Math.max(document.getElementById(&quot;player&quot;).volume - 0.1, 0)'><font size='+2'><i aria-hidden='true' class='fa fa-volume-down'/></font></button> 
  • And to call when you click on what button? - ʞɔᴉN ɹǝꓥ pm
  • one
    When you click to check the playback process. If active, then stop, if not, then start. There also insert a change of icons. - Enikeyschik 2:17 pm

0