Version
Media3 1.3.0
More version details
media3-extractor
Devices that reproduce the issue
Android Studio
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Use WebvttParser.parse() to parse the vtt captions below:
private const val vttSample = """WEBVTT
Kind: captions
Language: en
00:00:00.000 --> 00:00:01.712
[MUSIC PLAYING]
00:00:02.533 --> 00:00:03.950
SPEAKER: As an
Android engineer, I
00:00:03.950 --> 00:00:06.350
have seen firsthand how
the ecosystem is growing--
"""
val cuesWithTimingList = buildList {
WebvttParser().parse(
vttSample.toByteArray(),
SubtitleParser.OutputOptions.allCues()
) {
add(it)
}
}
Expected result
The cuesWithTimingList contains 3 items or lines
Actual result
The list contains 4 items, see screenshot
Media
WEBVTT
Kind: captions
Language: en
00:00:00.000 --> 00:00:01.712
[MUSIC PLAYING]
00:00:02.533 --> 00:00:03.950
SPEAKER: As an
Android engineer, I
00:00:03.950 --> 00:00:06.350
have seen firsthand how
the ecosystem is growing--
Bug Report