Skip to content

The muted attribute does not render in the video tag Svelte-5 #15014

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

Closed
tbpatj opened this issue Jan 14, 2025 · 1 comment
Closed

The muted attribute does not render in the video tag Svelte-5 #15014

tbpatj opened this issue Jan 14, 2025 · 1 comment

Comments

@tbpatj
Copy link

tbpatj commented Jan 14, 2025

Describe the bug

Upgraded from svelte-4 to svelte-5 and found that the muted attribute does not render in the video tag which prevents autoplay on Safari when using client side routing. This is also currently happening in my chrome browser as well.

This is a problem as it makes autoplay not possible by default. Browsers won't start a video automatically if the video isn't muted.

Looks like this was an issue prior for svelte-3 and svelte-4
#6536

Reproduction

try to add a video tag with the attribute muted, when you go into the dev tools it doesn't render it in the actual html. It does appear in the properties, but I'm still getting issues with autoplay. I assume this is related to the muted attribute not actually being rendered?

Image Image

It appears that even the muted property is always true even when explicitly passing false too. not sure if this is intended behavior but furthers my suspicion around the muted attribute

Image Image

Logs

System Info

System:
    OS: macOS 13.7.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 70.71 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
  Browsers:
    Brave Browser: 131.1.73.104
    Safari: 18.1.1
  npmPackages:
    svelte: ^5.0.0 => 5.10.0

Severity

annoyance

@tbpatj tbpatj closed this as completed Jan 14, 2025
@tbpatj
Copy link
Author

tbpatj commented Jan 14, 2025

Looks like it might have been actually browser settings were blocking autoplay for some reason. Sorry all. Hopefully this helps someone

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

1 participant