Fixes to loadSegment since aborted and timeouts are now considered a type of error in videojs.xhr
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -875,12 +875,13 @@ videojs.Hls.prototype.loadSegment = function(segmentUri, offset) { | ... | @@ -875,12 +875,13 @@ videojs.Hls.prototype.loadSegment = function(segmentUri, offset) { |
875 | // the segment request is no longer outstanding | 875 | // the segment request is no longer outstanding |
876 | self.segmentXhr_ = null; | 876 | self.segmentXhr_ = null; |
877 | 877 | ||
878 | if (error) { | ||
879 | // if a segment request times out, we may have better luck with another playlist | 878 | // if a segment request times out, we may have better luck with another playlist |
880 | if (request.timedout) { | 879 | if (request.timedout) { |
881 | self.bandwidth = 1; | 880 | self.bandwidth = 1; |
882 | return self.playlists.media(self.selectPlaylist()); | 881 | return self.playlists.media(self.selectPlaylist()); |
883 | } | 882 | } |
883 | |||
884 | if (!request.aborted && error) { | ||
884 | // otherwise, try jumping ahead to the next segment | 885 | // otherwise, try jumping ahead to the next segment |
885 | self.error = { | 886 | self.error = { |
886 | status: request.status, | 887 | status: request.status, | ... | ... |
-
Please register or sign in to post a comment