Skip to content

[video_player_videohole] Fix value update after dispose and WebVTT cues without identifier - #1182

Merged
seungsoo47 merged 2 commits into
flutter-tizen:mainfrom
seungsoo47:fix-video-player-videohole-dispose-seek-webvtt
Oct 13, 2026
Merged

seungsoo47 merged 2 commits into
flutter-tizen:mainfrom
seungsoo47:fix-video-player-videohole-dispose-seek-webvtt

Conversation

@seungsoo47

Copy link
Copy Markdown
Contributor

Main changes:

  • Fix a "used after being disposed" error when a seek, position, or duration update completes after the controller is disposed.
  • Fix multi-line WebVTT cues without an identifier being dropped.

The controller and WebVTT parser in this package were copied from upstream video_player, which has the same code and fixed it the same way:

seekTo() awaits the platform call and then calls _updatePosition(), so
when the controller is disposed while a seek is pending, the late
completion sets value on a disposed ValueNotifier and debug builds throw
"A VideoPlayerController was used after being disposed". The periodic
position and duration timers have the same race through
_updatePosition() and _updateDuration(), and play() sets value after
awaiting its seek to the start. Return early in all of these when the
controller is disposed.

This package's controller was copied from upstream video_player, which
has the same code and fixed _updatePosition() the same way in
video_player 2.14.1: flutter/packages#12971
A cue was treated as having an identifier whenever it had more than two
lines, so a multi-line cue without an identifier used its first text
line as the timing line and was dropped. Detect the identifier by
checking whether the first line is the timing line instead.

This package's WebVTT parser was copied from upstream video_player,
which has the same code and fixed it the same way in video_player 2.9.3:
flutter/packages#8555
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T11:32:56.258850Z b8b4f4d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@seungsoo47
seungsoo47 merged commit 0ef526a into flutter-tizen:main Oct 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants