This is the code to detect the mic mute. stream.getAudioTracks()[0].muted this code doesn't change the mic to muted state.
Issue:
The Below code doesn't detect the mic mute or unmute/state on the chrome browser on a Chromebook device.
navigator.mediaDevices.getUserMedia({audio: true})
.then(stream => {
console.log("MediaStreamTrack muted:", stream.getAudioTracks()[0].muted);
})
.catch(err => console.log(err));