[mediacapture-main] Shouldn't fire (un)mute event on already (un)muted track (#676)

jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-main:

== Shouldn't fire (un)mute event on already (un)muted track ==
We shouldn't fire the [mute](https://w3c.github.io/mediacapture-main/getusermedia.html#event-mediastreamtrack-mute) event on an already muted track (`track.muted == true`).
We shouldn't fire the [unmute](https://w3c.github.io/mediacapture-main/getusermedia.html#event-mediastreamtrack-unmute) event on an already unmuted track (`track.muted == false`).

This seems like a desirable property we should enforce in this spec. Yet we don't in the algorithm we expose, [set a track's muted state](https://w3c.github.io/mediacapture-main/getusermedia.html#set-track-muted) (it allows firing an event regardless of existing state).

We already do so with similar algorithms like [add a track](https://w3c.github.io/mediacapture-main/getusermedia.html#add-track) and [remove a track](https://w3c.github.io/mediacapture-main/getusermedia.html#remove-track), so we probably should here as well.

Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/676 using your GitHub account

Received on Friday, 3 April 2020 21:54:33 UTC