Skip to content

Commit

Permalink
fix: check muted property for mute getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Tham committed Jan 18, 2024
1 parent 7737912 commit 5b7ad18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/media/local-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ abstract class _LocalStream extends Stream {
* @inheritdoc
*/
get muted(): boolean {
return !this.inputTrack.enabled;
// Calls to `setMuted` will only affect the "enabled" state, but there are specific cases in
// which the browser may mute the track, which will affect the "muted" state but not the
// "enabled" state, e.g. minimizing a shared window or unplugging a shared screen.
return !this.inputTrack.enabled || this.inputTrack.muted;
}

/**
Expand Down

0 comments on commit 5b7ad18

Please sign in to comment.