videojs / m3u8-parser

An m3u8 parser.
Other
473 stars 98 forks source link

Update parse-stream.js #87

Closed scruwi closed 4 years ago

scruwi commented 5 years ago

Duration can be negative: #EXTINF:-1,title

misteroneill commented 5 years ago

I may be missing something, but I'm not sure that's right according to the HLS spec:

...duration is a decimal-floating-point or decimal-integer number...

Where:

   o  decimal-integer: an unquoted string of characters from the set
      [0..9] expressing an integer in base-10 arithmetic in the range
      from 0 to 2^64-1 (18446744073709551615).  A decimal-integer may be
      from 1 to 20 characters long.

...

   o  decimal-floating-point: an unquoted string of characters from the
      set [0..9] and '.' which expresses a non-negative floating-point
      number in decimal positional notation.

Neither of those seem to allow negative numbers.