When I try to click on the play button, it does not start playing. I suspect there is something that needs to be adjusted in the javascript. Can someone please assist me in fixing this issue?
<script>
(function iife() {
"use strict";
document.querySelector(".myLink1").classList.add("hide");
var playButton = document.querySelector(".playButton1");
playButton.addEventListener("click", firstClick);
function firstClick() {
document.querySelector(".myLink1").classList.remove("hide");
var button = document.querySelector(".playButton1");
var player = document.querySelector("#player1");
document.querySelector('.playButton1 .initial1').style.display = 'none';
playButton.addEventListener("click", playButtonClickHandler);
document.querySelector(".playButton1 .play1").style.display = "inline-block";
document.querySelector(".playButton1 .pause1").style.display = "none";
button.classList.add("playing");
}
function playButtonClickHandler() {
player.volume = 1.0;
if (player.paused) {
document.querySelector(".playButton1 .play1").style.display = "none";
document.querySelector(".playButton1 .pause1").style.display = "inline-block";
player.play();
} else {
document.querySelector(".playButton1 .play1").style.display = "inline-block";
document.querySelector(".playButton1 .pause1").style.display = "none";
player.pause();
}
}
}());
</script>