Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media filter: many videos cause long loading time #478

Open
vincent-peugnet opened this issue Oct 31, 2024 · 0 comments
Open

Media filter: many videos cause long loading time #478

vincent-peugnet opened this issue Oct 31, 2024 · 0 comments
Labels

Comments

@vincent-peugnet
Copy link
Owner

vincent-peugnet commented Oct 31, 2024

While using media filters to list 50 videos, the page load is very slow and feels buggy (I was using Firefox). Using dev tools, I measured that 22Mo where downloaded only to get the videos duration and poster. And it took around 10 seconds.

I don't think this could be an expected behavior.

To solve this, we need to disallow the browser from fetching the video metadata.

This can be done in HTML by setting the preload attribute to none.
By using individual HTML code file, editors can manually add this attribute, but not using Media lists function.

Or maybe if I want some kind of "smart" feature, I could use artificial intelligence count the number of video in the media list or even in the whole page, and add that attribute if there is over 10 videos. (It looks like something the browser itself should do)
Even smarter, and easier to code: after the 10th video, set preload to none. That way, only the 10 first videos of the HTML will be loaded. (hoping that those are the first seen on the page 🤭😋) LoL, it's a bit too smart.
As this ideas may broke web designs, I don't think it's a good idea.

A parameter in media list function, with default to none sound like a better idea to let full control to editors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant