This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25737 - [WebVTT] file using only nested cues definition is too lax
Summary: [WebVTT] file using only nested cues definition is too lax
Status: NEW
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: Web Media Text Tracks CG
URL:
Whiteboard: v1
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-16 08:11 UTC by Philip Jägenstedt
Modified: 2014-10-10 09:05 UTC (History)
2 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2014-05-16 08:11:53 UTC
http://dev.w3.org/html5/webvtt/#dfn-webvtt-file-using-only-nested-cues

> given any two cues cue1 and cue2 with start and end time offsets
> (x1, y1) and (x2, y2) respectively,
>
> either cue1 lies fully within cue2, i.e. x1 ≥ x2 and y1 ≤ y2
> or cue1 fully contains cue2, i.e. x1 ≤ x2 and y1 ≥ y2.

The following file would match the definition:

WEBVTT

00:00.000 --> 00:01.000
A

00:00.000 --> 00:01.000
B

Yet, neither cue is nested in the other, and a tree of chapters cannot be constructed from the file.
Comment 1 Philip Jägenstedt 2014-05-16 08:24:59 UTC
The definition would also fail for something like this:

WEBVTT

00:00.000 --> 00:10.000
Chapter 1

00:00.000 --> 00:05.000
Chapter 1.1

00:05.000 --> 00:10.000
Chapter 1.2

Neither of the two last cues contains the other.
Comment 2 Philip Jägenstedt 2014-05-16 08:46:59 UTC
I think the definition should be that no two cues can have the same start and end time, and the intersection of any two cues should be equal to one of the cues.

Not sure how to phrase it in a way that is easily understood.
Comment 3 Philip Jägenstedt 2014-05-16 08:47:22 UTC
(In reply to Philip Jägenstedt from comment #2)
> I think the definition should be that no two cues can have the same start
> and end time, and the intersection of any two cues should be equal to one of
> the cues.

Or empty, d'oh.
Comment 4 Silvia Pfeiffer 2014-05-16 08:59:45 UTC
(In reply to Philip Jägenstedt from comment #0)
> http://dev.w3.org/html5/webvtt/#dfn-webvtt-file-using-only-nested-cues
> 
> > given any two cues cue1 and cue2 with start and end time offsets
> > (x1, y1) and (x2, y2) respectively,
> >
> > either cue1 lies fully within cue2, i.e. x1 ≥ x2 and y1 ≤ y2
> > or cue1 fully contains cue2, i.e. x1 ≤ x2 and y1 ≥ y2.
> 
> The following file would match the definition:
> 
> WEBVTT
> 
> 00:00.000 --> 00:01.000
> A
> 
> 00:00.000 --> 00:01.000
> B
> 
> Yet, neither cue is nested in the other, and a tree of chapters cannot be
> constructed from the file.


"Nested" doesn't have to mean that one can't be completely contained in the other. I think in this case B would be a subtree of A. I think this should be allowed. The first one to come will be the top chapter, the second one the subchapter and so on. I certainly wouldn't want the second chapter to be dropped because it covers the same time interval as the first one.


(In reply to Philip Jägenstedt from comment #1)
> The definition would also fail for something like this:
> 
> WEBVTT
> 
> 00:00.000 --> 00:10.000
> Chapter 1
> 
> 00:00.000 --> 00:05.000
> Chapter 1.1
> 
> 00:05.000 --> 00:10.000
> Chapter 1.2
> 
> Neither of the two last cues contains the other.

Right, I guess there should be a third case where they are totally independent of each other. :-)
Comment 5 Philip Jägenstedt 2014-05-16 11:10:51 UTC
(In reply to Silvia Pfeiffer from comment #4)
> (In reply to Philip Jägenstedt from comment #0)
> > http://dev.w3.org/html5/webvtt/#dfn-webvtt-file-using-only-nested-cues
> > 
> > > given any two cues cue1 and cue2 with start and end time offsets
> > > (x1, y1) and (x2, y2) respectively,
> > >
> > > either cue1 lies fully within cue2, i.e. x1 ≥ x2 and y1 ≤ y2
> > > or cue1 fully contains cue2, i.e. x1 ≤ x2 and y1 ≥ y2.
> > 
> > The following file would match the definition:
> > 
> > WEBVTT
> > 
> > 00:00.000 --> 00:01.000
> > A
> > 
> > 00:00.000 --> 00:01.000
> > B
> > 
> > Yet, neither cue is nested in the other, and a tree of chapters cannot be
> > constructed from the file.
> 
> 
> "Nested" doesn't have to mean that one can't be completely contained in the
> other. I think in this case B would be a subtree of A. I think this should
> be allowed. The first one to come will be the top chapter, the second one
> the subchapter and so on. I certainly wouldn't want the second chapter to be
> dropped because it covers the same time interval as the first one.

A subchapter with the exact same extent seems odd, when would you deliberately author a chapter hierarchy like that?

As for being dropped, the WebVTT spec need only be concerned with validity, not processing, which is defined by HTML:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#rules-for-constructing-the-chapter-tree-from-a-text-track

(This split across two specs is a bit weird, but I'm not sure in which spec should take it all.)
Comment 6 Silvia Pfeiffer 2014-06-09 13:40:57 UTC
(In reply to Philip Jägenstedt from comment #5)
> 
> A subchapter with the exact same extent seems odd, when would you
> deliberately author a chapter hierarchy like that?

I've seen book chapters with only one subchapter. I think it's possible and wouldn't want to forbid it.
 

> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-
> element.html#rules-for-constructing-the-chapter-tree-from-a-text-track
> 
> (This split across two specs is a bit weird, but I'm not sure in which spec
> should take it all.)

If we can't find anyone else buying into the same hierarchical chapter structure to WebVTT, we might as well move it all into the WebVTT spec. It's what happened with VTTCue. But I am not sure about that either.