title: custom HTML5 audio player addEventListener error
body: <pre><code>document.addEventListener("DOMContentLoaded", function(event) {
  
  var music = document.getElementById('music'); // id for audio element
  var duration; // Duration of audio clip
  var pButton = document.getElementById('pButton'); // play button
  var playhead = document.getElementById('playhead'); // playhead
  var timeline = document.getElementById('timeline'); // timeline
  
  // timeline width adjusted for playhead
  var timelineWidth = timeline.offsetWidth - playhead.offsetWidth;
  
  // play button event listenter
  pButton.addEventListener("click", play);
  
  // timeupdate event listener
  music.addEventListener("timeupdate", timeUpdate, false);
  </code></pre>
  
  <p>a this point i get error:
  "Uncaught TypeError: Cannot read property 'addEventListener' or null</p>
  
  <p>please help
  ive skipped rest of the code</p>