Use media atom images where possible for videos#16273
Merged
Merged
Conversation
Previously, it had to handle whether to show the composer trail image or the poster image based on if it should replace the article main media. This is no longer required as the card media has been seperated from the article main media.
|
Seen on PROD (merged by @abeddow91 10 minutes and 33 seconds ago) Please check your changes! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Simplifies the logic used to select the image for a video media atom on a front.
Previously, this function determined whether to use the composer trail image or the video poster image based on whether the video was replacing the article's main media. This distinction is no longer necessary now that card media and article main media have been separated.
This change also fixes a bug where videos that were not replacement videos (for example, self hosted video pages) incorrectly used the composer trail image instead of the video poster image.
Why?
This bug has only recently become visible because, historically, self-hosted videos displayed on fronts were always replacement atoms and had no associated video page. Now that self-hosted default videos can also have dedicated video pages, the existing image selection logic produces the wrong poster image in those cases.
Screenshots