]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Fixed potential issue with options.start or options.in being 0, also took scotts...
authorDavid Seifried <david.c.seifried@gmail.com>
Mon, 26 Sep 2011 17:57:08 +0000 (13:57 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Mon, 26 Sep 2011 17:57:08 +0000 (13:57 -0400)
popcorn.js

index fd55671df00fb74964c088c90ecf39bc2c36a7a5..ae5605b8b1b9de7e42368f00b1da632bdc2cc584 100644 (file)
       options._natives.type = name;
       options._running = false;
 
-      
       natives.start = natives.start || natives[ "in" ];
       natives.end = natives.end || natives[ "out" ]; 
 
       //  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