Преглед изворни кода

fix bug when no start or end date is specified

Gil Pedersen пре 12 година
родитељ
комит
59add00fa8
1 измењених фајлова са 2 додато и 2 уклоњено
  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;