diff --git a/CHANGELOG.md b/CHANGELOG.md index 2db567e92..e74393b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ CHANGELOG -------------------- +## 5.9.2 (2016-04-19) +* @gkatsev grouped text track errors in the console, if we can ([view](https://github.com/videojs/video.js/pull/3259)) + ## 5.9.1 (2016-04-19) * @benjipott updated IS_CHROME to not be true on MS Edge ([view](https://github.com/videojs/video.js/pull/3232)) * @mister-ben blacklisted Chrome for Android for playback rate support ([view](https://github.com/videojs/video.js/pull/3246)) diff --git a/component.json b/component.json index 6c5255bb3..770bc093e 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "video.js", "description": "An HTML5 and Flash video player with a common API and skin for both.", - "version": "5.9.1", + "version": "5.9.2", "keywords": [ "videojs", "html5", diff --git a/package.json b/package.json index 0234717c8..3452bb598 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "video.js", "description": "An HTML5 and Flash video player with a common API and skin for both.", - "version": "5.9.1", + "version": "5.9.2", "copyright": "Copyright Brightcove, Inc. ", "license": "Apache-2.0", "keywords": [ diff --git a/src/js/tracks/text-track.js b/src/js/tracks/text-track.js index 1b510dc60..9e914522d 100644 --- a/src/js/tracks/text-track.js +++ b/src/js/tracks/text-track.js @@ -23,13 +23,14 @@ const parseCues = function(srcContent, track) { let parser = new window.WebVTT.Parser(window, window.vttjs, window.WebVTT.StringDecoder()); + let errors = []; parser.oncue = function(cue) { track.addCue(cue); }; parser.onparsingerror = function(error) { - log.error(error); + errors.push(error); }; parser.onflush = function() { @@ -40,6 +41,16 @@ const parseCues = function(srcContent, track) { }; parser.parse(srcContent); + if (errors.length > 0) { + if (console.groupCollapsed) { + console.groupCollapsed(`Text Track parsing errors for ${track.src}`); + } + errors.forEach((error) => log.error(error)); + if (console.groupEnd) { + console.groupEnd(); + } + } + parser.flush(); };