-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[twist] Use
IntersectionObserver
to avoid rendering players until t…
…hey're on the screen Since we set `contain: size` on the `.wrapper` inside the player, this should not affect page layout. Since the `TwistyProp` hierarchy can be initialized and updated independent of the DOM, this means that you can even call `.play()` on a player before it starts rendering, and the rendering will smoothly jump into the middle of the animation as soon as the player enters the viewport.
- Loading branch information
Showing
1 changed file
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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