From 3aaf9bf8f14eb30cd8dbdd901e86f116f2a2d37c Mon Sep 17 00:00:00 2001 From: David Seifried Date: Mon, 26 Sep 2011 13:57:08 -0400 Subject: [PATCH] Fixed potential issue with options.start or options.in being 0, also took scotts advice on handling start over in --- popcorn.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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 -- 2.43.0