globocom / m3u8

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions
Other
2.03k stars 471 forks source link

Issue 284: follow RFC 8261 section 4.3.4.2 for CLOSED-CAPTIONS #285

Closed bbayles closed 2 years ago

bbayles commented 2 years ago

Re: https://github.com/globocom/m3u8/issues/284, this PR undoes https://github.com/globocom/m3u8/pull/125 to promote compliance with RFC 8261 section 4.3.4.2.

Per the spec, in an EXT-X-STREAM-INF tag that has a CLOSED-CAPTIONS attribute should not use quotes for the value NONE and should use quotes for all other values.


From the spec:

The value can be either a quoted-string or an enumerated-string with the value NONE

The definition of a quoted-string is:

quoted-string: a string of characters within a pair of double quotes

The definition of an enumerated-string is:

an unquoted character string from a set that is explicitly defined by the AttributeName. An enumerated-string will never contain double quotes ("), commas (,), or whitespace.