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 #36

Open synaesthesia opened 6 years ago

synaesthesia commented 6 years ago

Hi,

in the error handler:

// listen to error events coming from the video tag
el.addEventListener('error', function(e) {

line https://github.com/Peer5/videojs-contrib-hls.js/blob/9e1faddae5adbd27860b602376a705c793d5ff71/src/videojs.hlsjs.js#L55

I don't know why, but sometimes mediaError can be null.

Maybe could you just check if mediaError is not null before doing the comparaison ?