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

Binding "muted" attribute on <video> does not work #2042

Closed
simplesmiler opened this issue Dec 17, 2015 · 3 comments
Closed

Binding "muted" attribute on <video> does not work #2042

simplesmiler opened this issue Dec 17, 2015 · 3 comments

Comments

@simplesmiler
Copy link
Member

Repro: https://jsfiddle.net/simplesmiler/qsuvjk3r/

@simplesmiler simplesmiler changed the title Binding <video> attributes does not work Binding "muted" attribute on <video> does not work Dec 17, 2015
@yyx990803
Copy link
Member

Cause: this is because muted works similar to value for <input>: if it is present inline when the element is first rendered, it sets the initial value; but if it's not, just changing the attribute has no effect, we need to set the corresponding property.

It's a bit frustrating that there is no centralized documentation on the correspondence of HTML attributes/properties... there may be other attributes like this, and if there are we need to add them to the list too.

@rhyzx
Copy link

rhyzx commented Jan 16, 2016

@yyx990803
open https://www.w3.org/TR/html5/single-page.html and drop these code in console:

[...new Set(document.body.innerText.match(/default[A-Z]\w+/g))]

// ["defaultView", "defaultPlaybackRate", "defaultMuted", "defaultChecked", "defaultValue", "defaultSelected"]

view belongs to document and playbackRate does not have a corresponding attribute yet, so the current list is complete.

@yyx990803
Copy link
Member

Looks like playbackRate doesn't have a content attribute though. It's property only.

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

3 participants