-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
HTML <audio> volume attribute #1143
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
Comments
I think the element just wants to have the property set directly ( |
Looks like it should support this?: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio#attr-volume edit: removed some stupid stuff |
I tested this REPL in Firefox Nightly and Chrome, both behave the same way: https://svelte.technology/repl?version=1.54.0&gist=718ff93aa528f49030c68a988108a0c2 |
Here's an example with audio instead of relying on that property value: https://svelte.technology/repl?version=1.54.0&gist=7cad943bb07c698cb02d5e9efbe74621 |
The fix to this is probably to just implement bind for the volume property for video and audio elements, I'll try to do that soon! Edit: Or yes, just use the |
The I'm surprised the MDN page doesn't show the specific types of the attributes. |
Oh interesting, I guess I misunderstood the MDN page. Thanks for clearing that up! |
Not much of a misunderstanding when they completely omitted it from the page! 😄 |
* Add audio/video volume binding Fixes #1143 * Update test and add volumechange event * Set volume on initial update * Update test after setting volume initially Oops.
I know that
volume
is not one of the documented bind properties for<audio>
, but I'm surprised that setting the attribute doesn't work at all. This can be worked around with refs, but it would be handy if svelte did that for us when changingvolume
.I imagine this shouldn't be terribly difficult, I'll try to look at this as soon as I find the time.
Thank you!
The text was updated successfully, but these errors were encountered: