I am trying to make a mute and unmute function. But I'm not sure how to display an image path through an if statement. Currently it is just a button with text that switches back and forth on click.
mute() {
const video = this.refs.video;
const muteButton = this.refs.mute;
if (video.muted === false) {
video.muted = true;
muteButton.innerHTML = "Unmute"; // this should be where the image is linked
} else {
video.muted = false;
muteButton.innerHTML = "Mute"; // this should be where the image is linked
}
}
<Button ref="mute" onClick={() => this.mute()} color="danger">
Unmute
</Button>