text: /* Get our elements */
  const player = document.querySelector(".player");
  const video = player.querySelector(".viewer");
  const progress = player.querySelector(".progress");
  const progressBar = player.querySelector(".progress__filled");
  const toggle = player.querySelector(".toggle");
  const skipButtons = player.querySelectorAll("[data-skip]");
  const ranges = player.querySelectorAll(".player__slider");
  
  /* Build out functions */
  function togglePlay() {
      const method = video.paused ? 'play' : 'pause';
      video[method]();
      /*if(video.paused){
          video.play();
      } else {
          video.pause();
      }*/
  }
  
  function updateButton() {
      const icon = this.paused ? '►' : '❚ ❚';
      toggle.textContent = icon;
  }
  
  function skip() {
      video.currentTime += parseFloat(this.dataset.skip);
  }
  
  function handleRangeChange(){
      console.log('this.name: ', this.name);
      console.log('this.value: ', this.value);
      video[this.name] = this.value;
  }
  
  function handleProgressBar(){
      const percent = (video.currentTime / video.duration) * 100;
      progressBar.style.flexBasis = `${percent}%`;
  }
  
  function scrub(e){
      console.log('e: ', e);
      const scrubTime = (e.offsetX / progress.offsetWidth) * video.duration;
      video.currentTime = scrubTime;
  }
  
  /* Hook up the event listeners */
  video.addEventListener('click', togglePlay);
  video.addEventListener('pause', updateButton);
  video.addEventListener('play', updateButton);
  video.addEventListener('timeupdate', handleProgressBar);
  toggle.addEventListener('click', togglePlay);
  skipButtons.forEach(button => button.addEventListener('click', skip));
  ranges.forEach(range => range.addEventListener('click', handleRangeChange));
  ranges.forEach(range => range.addEventListener('change', handleRangeChange));
  progress.addEventListener('click', scrub);
  let mousedown = false;
  progress.addEventListener('mousemove', (e) => mousedown && scrub(e));
  progress.addEventListener('mousedown', () => mousedown = true);
  progress.addEventListener('mouseup', () => mousedown = false);