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
{{ message }}
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.
I've observed spaces in generated m3u8 from CDNs for these tags. Note the space after colon. Do we need to handle this as part of library? Spec doesn't say whether space is allowed.
should be #EXT-X-TARGETDURATION:<s> but seen as #EXT-X-TARGETDURATION: <s>
should be #EXT-X-MEDIA-SEQUENCE:<number> but seen as #EXT-X-MEDIA-SEQUENCE: <number>
For now I've handled with below change in Constants.java.
public static final Pattern EXT_X_TARGETDURATION_PATTERN = Pattern.compile("^#" + EXT_X_TARGETDURATION_TAG + EXT_TAG_END + OPTIONAL_WHITESPACE_REGEX +"(" + INTEGER_REGEX + ")"+OPTIONAL_WHITESPACE_REGEX+"$");
public static final Pattern EXT_X_MEDIA_SEQUENCE_PATTERN = Pattern.compile("^#" + EXT_X_MEDIA_SEQUENCE_TAG + EXT_TAG_END + OPTIONAL_WHITESPACE_REGEX +"(" + INTEGER_REGEX + ")"+OPTIONAL_WHITESPACE_REGEX+"$");
Where regex for optional white space is as below
private static final String OPTIONAL_WHITESPACE_REGEX = "\\s*?";
Let me know if this makes sense. There is no harm if no spaces exist. regex takes care of that case too.
The text was updated successfully, but these errors were encountered:
The regexes look good. I would add an allowWhitespaceInTags flag in ParsingMode and set it to true for the LENIENT constant. At this point I'm considering making LENIENT the default.
I've observed spaces in generated m3u8 from CDNs for these tags. Note the space after colon. Do we need to handle this as part of library? Spec doesn't say whether space is allowed.
For now I've handled with below change in Constants.java.
Where regex for optional white space is as below
Let me know if this makes sense. There is no harm if no spaces exist. regex takes care of that case too.
The text was updated successfully, but these errors were encountered: