Skip to content

Stop defining volumechange in terms of public API#12428

Merged
annevk merged 2 commits intomainfrom
annevk/volumechange
May 8, 2026
Merged

Stop defining volumechange in terms of public API#12428
annevk merged 2 commits intomainfrom
annevk/volumechange

Conversation

@annevk
Copy link
Copy Markdown
Member

@annevk annevk commented May 8, 2026

cf4109f made it so that technically the muted content attribute and playing backwards would result in a volumechange event. That was not intentional. This restores those aspects to before that commit and also modernizes the editorial style of the concepts involved.

(See WHATWG Working Mode: Changes for more details.)


/media.html ( diff )

cf4109f made it so that technically the muted content attribute and playing backwards would result in a volumechange event. That was not intentional. This restores those aspects to before that commit and also modernizes the editorial style of the concepts involved.
Copy link
Copy Markdown
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll write some tests.

Comment thread source Outdated
Comment thread source
getter steps are to return true if this is <span
data-x="concept-media-muted">muted</span>; otherwise false.</p>
<p>To <dfn export>set the muted state</dfn> of a <span>media element</span> <var>element</var> to
a boolean <var>value</var>:</p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice solution, this algorithm only takes a boolean so the boolean → "default" cases cannot happen.

@foolip
Copy link
Copy Markdown
Member

foolip commented May 8, 2026

I've written some additional tests in https://chromium-review.git.corp.google.com/c/chromium/src/+/7831199 which I think cover the main ways this could be buggy.

@annevk annevk merged commit 5545634 into main May 8, 2026
2 checks passed
@annevk annevk deleted the annevk/volumechange branch May 8, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants