Bug 127133
Summary: | In-band text track cue duplicate detection shouldn't consider manually added cues | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brendan Long <b.long> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | acolwell, eric.carlson |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Brendan Long
Based on this email to the HTML mailing list, after describing how we check for duplicates when adding cues from in-band text tracks:
> Does this behavior take into account cues added by the application itself.
> For example if the application uses addCue()
> with data that is identical to something in the in-band track, will 2 cues
> get displayed or only the one? It sounds like it would only be 1 which also
> might be surprising to the developer.
http://lists.w3.org/Archives/Public/public-html/2014Jan/0087.html
Looking at our code, we don't check for duplicates in TextTrack::addCue(), so that's fine, but we do consider those cues when looking for duplicates for in-band cues. We should probably fix this so only in-band cues are considered when looking for duplicates.
For a concrete example, consider these two cases:
1. A video is loaded with an in-band text track, but no cues.
2. The user adds a cue with addCue().
3. The exact same cue (start time, end time, text content) shows up in the video.
In this case, the TextTrackList will contain one cue.
1. A video is loaded with an in-band text track, but no cues.
2. A cue shows up in the video.
3. The user adds the exact same cue with addCue().
In this case, the TextTrackList will contain two identical cues.
I'm proposing changing this so we have two identical cues in both cases.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |