Skip to content

fix: parse WebVTT cues with settings - #243

Merged
kdroidFilter merged 1 commit into
kdroidFilter:masterfrom
itboy87:fix/webvtt-cue-settings
Aug 7, 2026
Merged

fix: parse WebVTT cues with settings#243
kdroidFilter merged 1 commit into
kdroidFilter:masterfrom
itboy87:fix/webvtt-cue-settings

Conversation

@itboy87

@itboy87 itboy87 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow WebVTT cue timing lines to contain standard cue settings
  • preserve existing parsing behavior for timing and subtitle text
  • add regression coverage for STYLE metadata and line/vertical settings

Previously, the parser required the first timing line to fully match a timestamp-only regex. Valid lines such as:

00:00:01.000 --> 00:00:03.000 line:0

were skipped, resulting in an empty cue list.

Testing

  • ./gradlew :mediaplayer:jvmTest --tests 'io.github.kdroidfilter.composemediaplayer.subtitle.WebVttParserTest'
  • ./gradlew :mediaplayer:ktlintCheck

Reproduction samples

These public WebVTT files reproduce the issue:

They contain valid cue settings such as line:0, line:-1, and vertical:rl. Previously, the parser skipped the first timing line because it required the timestamp-only pattern to match the entire line.

@itboy87

itboy87 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Hi @kdroidFilter, just wanted to follow up on the PR I created a couple of days ago. When you have some time, could you please review it? We’ll need to get it merged for our next product release. Thanks!

@kdroidFilter
kdroidFilter merged commit 44e0d1f into kdroidFilter:master Aug 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants