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

[proposal] An option to remove alternative sources for media urls #379

Open
jdmichaud opened this issue Apr 12, 2024 · 1 comment
Open

Comments

@jdmichaud
Copy link

Well behave websites will provide alternative versions of a media with different formats:

<video>
  <source src="..." type="video/webm">
  <source src="..." type="video/ogg">
  <source src="..." type="video/mp4">
  ...
</video>

In order to reduce file size, I propose to add an option to only keep one media format. Maybe the option takes the first source found or allow the user to indicate the format it prefers.

@snshn
Copy link
Member

snshn commented Apr 13, 2024

Hello @jdmichaud,

thank you for the idea! If it reduces the file size but may impact the browser's ability to read the file in the future, it could be an issue... however, if e.g. video/mp4 is known to be supported by every browser, I agree that there's no need to save the other formats along with it. It should probably be like that by default, with some kind of flag or environmental variable overriding the behavior in case there's a need to save all sources. I gotta look into different formats for <picture> and <video> tags, to make sure there are universal ones out there. I believe the same logic should apply to the web fonts.

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

No branches or pull requests

2 participants