04:43
<jmdyck>
In https://html.spec.whatwg.org/#steps-to-expose-a-media-resource-specific-text-track, under MPEG-4, there are a couple occurrences of roughly "the concatenation of A, B, and C, or D if condition". It's unclear what the 'scope' of the "or" is. Is it (A+B+C) or (D)? Or is it A+B+(C or D)?
13:26
<zcorpan>
Domenic: fyi https://www.debugbear.com/blog/google-blocked-website
16:27
<jmdyck>
I looked for how browsers implemented that MPEG-4 paragraph, but haven't yet found one that does.
17:21
<jmdyck>
Looks like Hixie added it in 2012 (d485159e) and it hasn't been touched much since then.
17:41
<Ms2ger (🇪🇸)>
I have an open PR that I need to get back to to clean up that algorithm a bit, but I don't touch that part
18:13
<TabAtkins>
Testing would be good to verify, but I'm 95% certain that "or" is tightly bound, so it's just "C or D". The C is always "the first FOO field" and the D condition is"if there is no FOO field", so it's extremely likely that the D (always an empty string) is providing a default for the missing C case.
19:33
<jmdyck>
Testing implementations? You'd first have to find one that implements that chunk of the spec, and I'm doubtful there is one. (I don't think anything in WPT calls inBandMetadataTrackDispatchType, so you can't find implementations that way.) And then you'd need to find or create an MPEG-4 file that triggered the condition in question.
19:39
<jmdyck>
The A+B+(C or D) interpretation is 'better' in that it distinguishes more cases. But it seems odd to me that a dispatch type could have a trailing space.
19:47
<TabAtkins>
Oh, you know what, you're right, I misread. This is absolutely (A + B + C) or D, I was being silly. So you get either "metx FOO" or "" (or whatever, for the other field names).
19:48
<TabAtkins>
Anyway, 100% needs a rewrite
21:37
<jmdyck>
Wouldn't have to be a rewrite to disambiguate: you can establish the left edge of the or's scope just by inserting an "either". But a bigger rewrite could improve the readability. (It's interesting that the source, with its judicious linebreaks, is more readable than the rendered spec.) OTOH, if nobody is implementing it, maybe it's not worth the bother.
21:59
<TabAtkins>
I've committed the same sins when writing before, precisely because my source linebreaks make it clearer, and it's more ambiguous when rendered inline instead :/
21:59
<TabAtkins>
But anyway, it's the work of like a minute to fix.