From: Anna Sobiepanek Date: Wed, 16 Feb 2011 17:06:45 +0000 (-0500) Subject: isNaN(video.duration) fix [#235] X-Git-Tag: v0.4~49 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=39b9d405bae57c4bcee0e9c04ac82476dfb9e26c;p=popcorn-js.git isNaN(video.duration) fix [#235] --- 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