player.js 283 B

123456789101112
  1. const player = document.getElementById('player');
  2. const playerBtn = document.getElementById('videoBtn')
  3. function PlayPause() {
  4. if (player.paused) {
  5. player.play();
  6. playerBtn.src = './img/pause.svg';
  7. } else {
  8. player.pause();
  9. playerBtn.src = './img/play.svg';
  10. }
  11. }