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

Property "muted" for <audio> and <video> #2998

Closed
fend25 opened this issue Jun 10, 2019 · 6 comments
Closed

Property "muted" for <audio> and <video> #2998

fend25 opened this issue Jun 10, 2019 · 6 comments

Comments

@fend25
Copy link

fend25 commented Jun 10, 2019

Hello!

Now <audio> and <video> components provide 3 two-way binding tags: currentTime, paused and volume.

I'd like to send a PR with the muted property.

This property is not the same as setting volume to 0. It has slightly different mechanics and in some cases is really needed (i.e. modern browsers disallow autoplay non-muted video. setting volume to 0 doesnt work).
Also it is useful in some scenarios (i. e. if we want to make volume controller like youtube one, where you can mute sound by the button, and the volume slider is still visible and showing volume level, which would be actual after unmutting)

Is this PR welcome?

PS. commit is already in my fork: fend25@a37ee81

(there are some unrelated linting fixes - I did the linting)

@Conduitry
Copy link
Member

Yes please! A PR for bind:muted would be appreciated! Please also include in the PR an update to https://github.com/sveltejs/svelte/blob/master/site/content/docs/02-template-syntax.md to mention the new binding.

@subz390
Copy link

subz390 commented Sep 6, 2019

Hi guys, may I enquire about the state of this PR @fend25 or @Conduitry as I'd love to have the use of bind:muted in my video component. Many thanks.

@arxpoetica
Copy link
Member

arxpoetica commented Apr 19, 2020

Draft PR for this, but it needs some fixing before it's good. #4690

Rich-Harris added a commit that referenced this issue May 19, 2020
Rich-Harris added a commit that referenced this issue May 19, 2020
@az67128
Copy link

az67128 commented May 26, 2020

Hello. Is there any progress on this PR?
Docs referes to muted binding
But I am getting an error

ValidationError: 'muted' is not a valid binding

@Conduitry
Copy link
Member

Sorry, I guess this means we've been officially bitten by not having a separate branch to deploy docs from. This feature is in master, as are its docs, but it hasn't been released yet. The docs just came along when I was deploying some other documentation fixes from master. This should be released soon.

@Conduitry
Copy link
Member

This has been released in 3.23.0.

taylorzane pushed a commit to taylorzane/svelte that referenced this issue Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants