Bläddra i källkod

fix bug when no start or end date is specified

Gil Pedersen 12 år sedan
förälder
incheckning
59add00fa8
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      lib/reader.js

+ 2 - 2
lib/reader.js

@@ -127,8 +127,8 @@ function HlsStreamReader(src, options) {
   this.noData = !!options.noData;
 
   // dates are inclusive
-  this.startDate = new Date(options.startDate);
-  this.stopDate = new Date(options.stopDate);
+  this.startDate = options.startDate ? new Date(options.startDate) : null;
+  this.stopDate = options.stopDate ? new Date(options.stopDate) : null;
 
   this.maxStallTime = options.maxStallTime || Infinity;