fix(web): image preload and cancelation #12765
Open
+193
−54
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.
This is the beginning of a multi-part set of PRs, each of which will stand on its own, mostly because it will be easier to review, and understand smaller changes, and its generally a best practice.
In this PR, the base functionality for image preload and cancelation is fixed, previously broken in #9684.
Additionally, video loads can also be canceled while they are still being buffered by pausing the video, and clearing the src attribute.
Also, the memory-lane component has been retrofitted to use image-thumbnail instead of bare images. In general, all thumbnails should be loaded via the image-thumbnail (or thumbnail) components.
The main part of this PR is the introduction of an image-manager component - it orchestrates the loading/cancelation of images.
A future PR will ensure that all images are loaded via the image-manager component.