Peer5 / videojs-contrib-hls.js

HLS library for video.js using Dailymotion's hls.js tech
Apache License 2.0
108 stars 55 forks source link

Uncaught TypeError: Cannot read property 'code' of null #16

Closed will3216 closed 7 years ago

will3216 commented 7 years ago

I am getting the following error from the mediaError eventListener

Uncaught TypeError: Cannot read property 'code' of null
    at HTMLVideoElement.<anonymous>

Which comes from:

// listen to error events coming from the video tag
el.addEventListener('error', function(e) {
  var mediaError = e.currentTarget.error; // => null

  if (mediaError.code === mediaError.MEDIA_ERR_DECODE) {
    videoTagErrorHandler();
  } else {
    console.error('Error loading media: File could not be played');
  }
});

Any idea why this is occurring?

will3216 commented 7 years ago

Turns out it was caused by the poster url set on the video tag 404'ing

mrbar42 commented 7 years ago

is the issue resolved?