-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't emit a
CuesWithTiming
for zero-duration Subtitle
events
It's a bit arguable whether the `Subtitle` implementation supports zero-duration events, since `getEventTimeCount` is documented as effectively "the number of times the cues returns by `getCues(long)` changes", and zero-duration events violate that. However, the current `WebvttSubtitle` impl **does** produce zero-duration events, so it seems safer to handle them gracefully here and then, as a possible follow-up, fix the `WebvttSubtitle` impl (or remove it completely). Issue: #1177 #minor-release PiperOrigin-RevId: 616095798
- Loading branch information
1 parent
f39fe82
commit e9ed874
Showing
5 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
libraries/test_data/src/test/assets/media/webvtt/with_consecutive_cues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
WEBVTT | ||
|
||
00:00.000 --> 00:01.234 | ||
This is the first subtitle. | ||
|
||
00:01.234 --> 00:03.456 | ||
This is the second subtitle. |