Skip to content

[video_player] Add html 5 video poster support (thumbnail) as a VideoPlayerWebOptions #8940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ortes
Copy link

@Ortes Ortes commented Mar 31, 2025

This PR adds support for the poster attribute on web by introducing a poster field in VideoPlayerWebOptions. It allows setting a thumbnail image for videos using the native HTML5 poster property, improving the out-of-the-box web experience.

Solve this issue:
flutter/flutter#166232

Pre-Review Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I linked to at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which test exemption this PR falls under1.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@Ortes Ortes requested review from ditman and tarrinneal as code owners March 31, 2025 01:12
@Ortes Ortes force-pushed the video-player-html-poster-support branch from 713c652 to d529939 Compare March 31, 2025 22:43
@Ortes Ortes force-pushed the video-player-html-poster-support branch from d529939 to b43bf65 Compare April 1, 2025 18:03
@Ortes Ortes force-pushed the video-player-html-poster-support branch 2 times, most recently from 2b124fe to 71ea426 Compare April 1, 2025 18:37
@Ortes Ortes changed the title [video_player] Add html 5 video poster support (thumbnail) as a VideoPlayerWebOptions [video_player_platform_interface] Add html 5 video poster support (thumbnail) as a VideoPlayerWebOptions Apr 1, 2025
@stuartmorgan-g stuartmorgan-g added the triage-web Should be looked at in web triage label Apr 1, 2025
@stuartmorgan-g
Copy link
Contributor

Where is the combination PR for initial review that this was split from (per the documented process)?

@Ortes Ortes force-pushed the video-player-html-poster-support branch from c3d02e8 to eb0d4b7 Compare April 1, 2025 20:20
@Ortes Ortes changed the title [video_player_platform_interface] Add html 5 video poster support (thumbnail) as a VideoPlayerWebOptions [video_player] Add html 5 video poster support (thumbnail) as a VideoPlayerWebOptions Apr 1, 2025
@Ortes
Copy link
Author

Ortes commented Apr 1, 2025

Where is the combination PR for initial review that this was split from (per the documented process)?

Is this ok like this ? here is the PR for platform_interface

@stuartmorgan-g stuartmorgan-g added the federated: all_changes PR that contains changes for all packages for a federated plugin change label Apr 2, 2025
@Ortes Ortes force-pushed the video-player-html-poster-support branch 4 times, most recently from 8db4982 to 691d64f Compare April 3, 2025 19:21
@Ortes Ortes force-pushed the video-player-html-poster-support branch from 691d64f to 6db1d9c Compare April 7, 2025 18:35
@stuartmorgan-g
Copy link
Contributor

From triage: @tarrinneal This should be ready for initial review.

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

Not seeing any issues here, I didn't know the term "poster" was used for this. lgtm

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
federated: all_changes PR that contains changes for all packages for a federated plugin change p: video_player platform-web triage-web Should be looked at in web triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants