You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortnately I cannot share the stream url but basically I was waiting for a long time and suddenly a playlist manifest started to include a tag EXT-X-DATERANGE with a field END-DATE but not START-DATE that m3u8-parser expects.
So, are you checking if dateRange.endDate is defined to decide whether to update it? I'm unclear about that part. Shouldn't the criteria be dateRange.duration && dateRange.startDate? If dateRange.endDate is defined but one of the others is missing, we could just maintain the current daterange.endDate, right?
The text was updated successfully, but these errors were encountered:
I think the issue here is more so that the stream is providing invalid EXT-X-DATERANGE tags: Per the spec:
START-DATE
A quoted-string containing the [[ISO_8601](https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-16#ref-ISO_8601)] date/time at which the
Date Range begins. This attribute is REQUIRED.
Although the parser doesn't explicitly check in this case, I think the motivation behind the endDate check comes from this bit in the EXT-X-DATERANGE portion of the spec:
If a Date Range contains both a DURATION attribute and an END-DATE
attribute, the value of the END-DATE attribute MUST be equal to the
value of the START-DATE attribute plus the value of the DURATION
attribute.
Clients SHOULD ignore EXT-X-DATERANGE tags with illegal syntax.
All that said, I agree we should be avoiding this error by checking for startDate and never entering this block to begin with. I think we may want to check for startDate && endDate and do a quick equality check if we really want this to be spec compliant.
@adrums86 I added a warn event trigger if END-DATE and DURATION are present but START-DATE is missing. I also returned the END-DATE to the constraint to better align with the spec
Error:
Steps to replicate:
Unfortnately I cannot share the stream url but basically I was waiting for a long time and suddenly a playlist manifest started to include a tag
EXT-X-DATERANGE
with a fieldEND-DATE
but notSTART-DATE
thatm3u8-parser
expects.Basically I put a break point and wait:
here is the value for
this
:Analysis
1. Observing
this.lineStream.buffer
:There is
END-DATE
but notSTART-DATE
2. To confirm, I checked
t = this.manifest.dateRanges[e]
with (e=1
)3. My question:
In
parser.js
I see:So, are you checking if
dateRange.endDate
is defined to decide whether to update it? I'm unclear about that part. Shouldn't the criteria bedateRange.duration && dateRange.startDate
? IfdateRange.endDate
is defined but one of the others is missing, we could just maintain the currentdaterange.endDate
, right?The text was updated successfully, but these errors were encountered: