const video = document.getElementById('video'); const playButton = document.getElementById('play-button'); playButton.addEventListener('click', toggleVideo); function toggleVideo() { if (video.paused) { video.play(); playButton.textContent = 'Pause'; } else { video.pause(); playButton.textContent = 'Play'; } }