Skip to content
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

Cherry pick PR #1037: [media] Workaround to support video poster #1051

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

cobalt-github-releaser-bot
Copy link
Collaborator

Refer to the original PR: #1037

This CL allows the web app to set a poster image for video element by:

  1. Playing the video in decode-to-texture mode.
  2. Setting the poster image as the background image of the video element.

Previously the video background is painted to black when there are no frames to display. This isn't the expected behavior as it overwrites any background image or color settings on the video element.

Now by default Cobalt won't paint the video background to black.

H5vcc setting MediaElement.PaintingVideoBackgroundToBlack is also introduced so the web app can opt for the previous behavior, i.e. set the background to black.

b/261922568

This CL allows the web app to set a poster image for video element by:
1. Playing the video in decode-to-texture mode.
2. Setting the poster image as the background image of the video
element.

Previously the video background is painted to black when there are no
frames to display. This isn't the expected behavior as it overwrites any
background image or color settings on the video element.

Now by default Cobalt won't paint the video background to black.

H5vcc setting `MediaElement.PaintingVideoBackgroundToBlack` is also
introduced so the web app can opt for the previous behavior, i.e. set
the background to black.

b/261922568

(cherry picked from commit a816c49)
@kaidokert kaidokert merged commit 53cf758 into 24.lts.1+ Jul 26, 2023
325 checks passed
@kaidokert kaidokert deleted the 24.lts.1+-1037 branch July 26, 2023 23:59
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.

3 participants