Skip to content

Commit

Permalink
fix(client): attempt at improving loading speed and caching of videos
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Moss committed Jul 26, 2024
1 parent 6d20cc1 commit a2fe0c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,13 @@ const App = () => {

if (visibleIndex === false) return _visibleIndexes;

return [visibleIndex - 1, visibleIndex, visibleIndex + 1];
return [
visibleIndex - 1,
visibleIndex,
visibleIndex + 1,
visibleIndex + 2,
visibleIndex + 3,
];
});
};

Expand Down
5 changes: 3 additions & 2 deletions src/components/VideoCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const VideoCard = ({ index, url, title, isLoaded, isMuted, refForwarder }) => {
}}
onClick={togglePause}
muted={isMuted}
loop
playsInline
loop={true}
playsInline={true}
preload="auto"
/>
</div>
);
Expand Down

0 comments on commit a2fe0c1

Please sign in to comment.