[webvtt] Unbounded Cue Use Cases (#496)

rjksmith has just created a new issue for https://github.com/w3c/webvtt:

== Unbounded Cue Use Cases ==
**Scope**

This issue has been raised to discuss unbounded cue use cases and proposed WebVTT syntax changes to support unbounded cues in order to decouple this conversation from Pull Request #493 as described in the [comment on 1 Apr 2021](https://github.com/w3c/webvtt/pull/493#issuecomment-811810387).

I have attempted to summarise the [preceding discussion](https://github.com/w3c/webvtt/pull/493#issuecomment-790758189) here with references to relevant comments and welcome constructive feedback to progress this issue.

**Definition**

An unbounded cue is defined as a cue with an _unspecified_ future end time.

**Origin**

The current WHATWG spec represents the duration of an unbounded stream with Infinity: [media.duration = Infinity](https://html.spec.whatwg.org/multipage/media.html#offsets-into-the-media-resource). The stream demonstrably has a finite duration, so Infinity is being used to represent _an unspecified future end time_ and the same definition applies to an unbounded cue - [as previously discussed](https://github.com/whatwg/html/issues/5297#issuecomment-652516934).

**Purpose**

Unbounded cues are aimed at _live_ use cases where the start time and content of the cue are known but its end time is not known until later (after the start time). This can be illustrated with a simple use case.

**Use Case: 0-0**

The score during a live sporting event is "0-0" at the start of the game. This may change to "1-0" or "0-1" at an unknown future time or may stay the same, and the duration of the match may be extended. There is no way of knowing the duration of the "0-0" cue until the score changes or the game ends, so this is an unbounded cue.

**WebVMT Syntax**

It is not possible to predict the end time of an unbounded cue (or stream) because it is unspecified by definition, which is reflected in the [WebVMT cue syntax](https://w3c.github.io/sdw/proposals/geotagging/webvmt/#webvmtcues):
```
00:30.000 -->
This cue is unbounded
```

**Simple Proposal: Start Time & Content Matching**

One solution is to update the end time of an unbounded cue by superseding it with a bounded cue which has matching start time and content.

For example:
```
NOTE Unbounded cue

00:30.000 -->
This cue lasts until...

NOTE Subsequent cues go here

00:40.000 --> 00:50.000
This is a later cue

NOTE When known, update the unbounded cue end time

00:30.000 --> 01:30.000
This cue lasts until...

NOTE Cues after update time go here

01:30.000 --> 01:35.000
...now.
```
This would not require an identifier and has the advantage of including a valid bounded cue in the stream at the earliest moment when all its attributes are known - for compatibility. @gkatsev has already confirmed that [unbounded cues will be ignored by current WebVTT parsers](https://github.com/w3c/webvtt/pull/493#issuecomment-795777639). WebVTT cue time ordering would need to be relaxed for this exceptional case and could be used as an efficient mechanism for identifying updates.

**Use Case: FOMS**

[Comment on 26 Mar 2021](https://github.com/w3c/webvtt/pull/493#issuecomment-808411871) by @gkatsev 
> At FOMS in previous years we discussed how WebVTT should be used for live and segmented vtt files, particularly around cues that span multiple segments. One of the things that came out there is that you could match up cues with the same text and start time across segments and update the end time to that of the last cue that you got, kind of like @rjksmith shows above. This actually also fits well with the unbounded cue with the missing end time thing.

**Use Case: WebKit**

[Comment on 26 Mar 2021](https://github.com/w3c/webvtt/pull/493#issuecomment-808429391) by @eric-carlson 
> We already have the situation where a cue's end time is "unbounded" at first and is updated later, because some in-band text track formats deliver cues with only a start time. In these formats a cue ends when the next cue or empty edit is delivered.
>
> We support this in WebKit by giving these cues an end time of positive-infinity when they are delivered, and updating the end time when it is known

**Use Case: WebVMT**

WebVMT allows unbounded cues to be superseded which is an integral part of [interpolation for live streaming](https://github.com/webvmt/community-group/issues/2#issuecomment-708529659) use cases as [discussed at TPAC 2020](https://www.w3.org/2020/10/TPAC/breakout-schedule.html#video-location).

Please view or discuss this issue at https://github.com/w3c/webvtt/issues/496 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 6 April 2021 10:51:43 UTC