From: David Seifried Date: Mon, 26 Sep 2011 17:57:08 +0000 (-0400) Subject: Fixed potential issue with options.start or options.in being 0, also took scotts... X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3aaf9bf8f14eb30cd8dbdd901e86f116f2a2d37c;p=popcorn-js.git Fixed potential issue with options.start or options.in being 0, also took scotts advice on handling start over in --- diff --git a/popcorn.js b/popcorn.js index fd55671..ae5605b 100644 --- a/popcorn.js +++ b/popcorn.js @@ -1207,7 +1207,6 @@ options._natives.type = name; options._running = false; - natives.start = natives.start || natives[ "in" ]; natives.end = natives.end || natives[ "out" ]; @@ -1237,21 +1236,13 @@ // Ensure a manifest object, an empty object is a sufficient fallback options._natives.manifest = manifest; - if ( options[ "in" ] ) { - options.start = options[ "in" ]; - } - - if ( options[ "out" ] ) { - options.end = options[ "out" ]; - } - // Checks for expected properties if ( !( "start" in options ) ) { - options.start = 0; + options.start = options[ "in" ] || 0; } if ( !( "end" in options ) ) { - options.end = this.duration() || Number.MAX_VALUE; + options.end = options[ "out" ] || this.duration() || Number.MAX_VALUE; } // Merge with defaults if they exist, make sure per call is prioritized