-
Notifications
You must be signed in to change notification settings - Fork 49.5k
Description
As @gaearon mentioned, React does not guarantee an attribute will be set, so probably this is not a bug.
If I understand well, react will ensure the property is set anyway.
Current behaviour
React renders the html <video />
element without the attribute muted
when explicitly passed.
Demo time
In this pen I made a simple example setting muted
to the element and obtaining the result below:
Actually the property is set well, since the original medial file has an audio track and in the pen result is muted.
The point
I think is most a specific need than the expected behaviour.
From the functionality POV, it is absolutely ok, my Component renders a <video />
muted as requested and so on.
But there are browsers and policies, more specifically related to this issue, Webkit and the New updated one year ago, with some interesting changes for the <video />
element.
The part interested is
<video muted>
elements will also be allowed to autoplay without a user gesture.
So, the specific need is to have the explicit attribute
to tell the browser that this video could be autoPlay
ed.
There's a similar issue