Skip to content

Commit

Permalink
1.9.3/#437
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed May 2, 2019
1 parent d084d74 commit 0063339
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/util/text-tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ export const addMetadata = ({
metadataArray.forEach((metadata) => {
let time = metadata.cueTime + timestampOffset;

// if time isn't a finite number between 0 and Infinity, like NaN,
// ignore this bit of metadata.
// This likely occurs when you have an non-timed ID3 tag like TIT2,
// which is the "Title/Songname/Content description" frame
if (typeof time !== 'number' || window.isNaN(time) || time < 0 || !(time < Infinity)) {
return;
}

metadata.frames.forEach((frame) => {
let cue = new Cue(
time,
Expand Down

0 comments on commit 0063339

Please sign in to comment.