diff --git a/src/video/HTMLSubtitles.js b/src/video/HTMLSubtitles.js index 2ac5eeced..a9764557e 100644 --- a/src/video/HTMLSubtitles.js +++ b/src/video/HTMLSubtitles.js @@ -159,6 +159,10 @@ function HTMLSubtitles(options) { .then(function(text) { if (typeof text === 'string' && selectedTrackId === selecterdTrack.id) { cuesByTime = subtitlesParser.parse(text); + if (cuesByTime.times.length === 0) { + throw new Error('parse failed'); + } + events.emit('trackLoaded', selecterdTrack); } })