Open ketankhairnar opened 8 years ago
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.
While default LENIENT
mode seems easy option with allowWhitespaceInTags
set to true; Am wondering when would need STRICT
parsing mode.
Let me know when can this be added? you need any PR for this?
You would need strict for non-forgiving M3u8 consumers (So far I haven't seen any - usually they are all very forgiving)
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.