Skip to content

Commit

Permalink
Merge pull request video-dev#1424 from OrenMe/fixVttParser
Browse files Browse the repository at this point in the history
fix: vtt parser broke after master merge
  • Loading branch information
johnBartos authored Nov 10, 2017
2 parents fb09e12 + e96a2a1 commit 3cf35d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/webvtt-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ const WebVTTParser = {
// Convert byteArray into string, replacing any somewhat exotic linefeeds with "\n", then split on that character.
let re = /\r\n|\n\r|\n|\r/g;
// Uint8Array.prototype.reduce is not implemented in IE11
let vttLines = utf8ArrayToStr(Array.prototype.reduce
.call(new Uint8Array(vttByteArray), (raw, vttByte) => raw + String.fromCharCode(vttByte), ''))
.trim().replace(re, '\n').split('\n');
let vttLines = utf8ArrayToStr(new Uint8Array(vttByteArray)).trim().replace(re, '\n').split('\n');

let cueTime = '00:00.000';
let mpegTs = 0;
Expand Down

0 comments on commit 3cf35d6

Please sign in to comment.