From 39b9d405bae57c4bcee0e9c04ac82476dfb9e26c Mon Sep 17 00:00:00 2001 From: Anna Sobiepanek Date: Wed, 16 Feb 2011 12:06:45 -0500 Subject: [PATCH] isNaN(video.duration) fix [#235] --- popcorn.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/popcorn.js b/popcorn.js index 9f63c0c..012d8e5 100644 --- a/popcorn.js +++ b/popcorn.js @@ -111,7 +111,10 @@ // adding padding to the front and end of the arrays // this is so we do not fall off either end - var videoDurationPlus = that.video.duration + 1; + var duration = that.video.duration; + // Check for no duration info (NaN) + var videoDurationPlus = duration != duration ? Number.MAX_VALUE : duration + 1; + Popcorn.addTrackEvent( that, { start: videoDurationPlus, end: videoDurationPlus -- 2.43.0