Skip to content

[video_player_avplay] Fixed an issue where subtitles for content with pre-roll/insesrted ads in DASH could not be rendered.#1007

Draft
gin7773 wants to merge 2 commits intoflutter-tizen:masterfrom
gin7773:subtitle_issue03
Draft

[video_player_avplay] Fixed an issue where subtitles for content with pre-roll/insesrted ads in DASH could not be rendered.#1007
gin7773 wants to merge 2 commits intoflutter-tizen:masterfrom
gin7773:subtitle_issue03

Conversation

@gin7773
Copy link
Copy Markdown
Contributor

@gin7773 gin7773 commented Apr 20, 2026

No description provided.

@gin7773 gin7773 marked this pull request as draft April 20, 2026 09:34
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the caption selection logic in video_player.dart to include start-time checks for both text and picture captions. A logic error was identified in the picture caption implementation where the greater-than operator was used instead of the less-than operator for the start time check, which would cause captions to be hidden incorrectly during their display window.

Comment on lines +211 to +212
position > captions.pictureCaption!.end ||
position > captions.pictureCaption!.start)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logic for picture captions uses the wrong operator for the start time check. It should use the less-than operator (<) to hide the caption if the playback position is before the start time. Currently, it uses the greater-than operator (>), which will cause the caption to be hidden as soon as the playback reaches its intended start time.

Suggested change
position > captions.pictureCaption!.end ||
position > captions.pictureCaption!.start)
position > captions.pictureCaption!.end ||
position < captions.pictureCaption!.start)

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.

1 participant