Repository navigation
Conversation
…size GaplessAsset gets fit and backgroundColor. Video slots track the picture's pixel size so Original can show it unscaled, and image preloads decode the way the slot will show the image so the slot stays a cache hit. The sample app takes fit and background as launch extras and in samples.json.
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.
Content rarely has the screen's exact shape.
GaplessAssetgets two fields, both per asset:fit:Contain(the old behaviour and the default),Cover,StretchorOriginal. Original shows the picture at its own size in layout pixels, centred, cropped when larger and barred when smaller.backgroundColor: the ARGB colour of the bars, opaque black by default.Web pages lay themselves out and ignore both.
Video slots now track the picture's pixel size instead of only its aspect ratio, so Original can draw it unscaled. A frozen frame during a hard cut keeps its framing until the new clip draws, as it already kept its shape. Image preloads decode the way the slot will show the image (fit inside, fill, or whole for Original), so the slot's own request stays a cache hit. Each image slot's background now draws inside its fade.
The sample app takes
--es fit coverand--es background 202020, and assets insamples.jsoncan setfitandbackground. The colour goes without#because the device shell reads#as a comment.Checked on both TVs: a portrait video in each mode with coloured bars, and a 640x360 image at its own size.