Changing from Play to Pause after set is clicked

Pressing set would trigger the svg to change to the pause button.

Using which of these is better to use?

Code 1:

button.click();
https://jsfiddle.net/192h0w85/203/

  sent.addEventListener("click", function() {
    player.volume = 1.0;
    player.src = value.value;
    button.click();

Code 2:

button.classList.toggle('is-playing');
https://jsfiddle.net/192h0w85/202/

  sent.addEventListener("click", function() {
    player.volume = 1.0;
    player.src = value.value;
    button.classList.toggle('is-playing');