@daily-co/daily-js
Advanced tools
Comparing version 0.51.0 to 0.51.1
{ | ||
"name": "@daily-co/daily-js", | ||
"version": "0.51.0", | ||
"version": "0.51.1", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=10.0.0" |
import { getBrowserName } from './Environment'; | ||
// remote tracks oftentimes toggle between muted/unmuted in quick succession. | ||
// For this reason, we don't actually consider a track muted until it has been | ||
// so for 3 seconds. During this period, the track is added to the | ||
// maybeTransientMutedTracks list below so that we can ignore and treat them | ||
// as not muted in `isTrackMuted()`. | ||
// Note: We can't use this same approach for the local screenshare because we | ||
// don't have a mute handler attached but mainly because they remain muted but | ||
// valid for long periods of as long as they are static. | ||
export let maybeTransientMutedTracks = new Set(); | ||
// Returns whether `track` is `muted`. | ||
@@ -11,6 +21,2 @@ // Assumes that `track` exists. | ||
// scenario). | ||
// Note: for remote screenshare tracks we rely on the _maybeTransientMute | ||
// flag below. We can't do this for the local screenshare because we | ||
// don't have a mute handler attached but also, they don't seem to be so | ||
// transient | ||
if (isLocalScreenVideo && getBrowserName() === 'Chrome') { | ||
@@ -20,3 +26,3 @@ return false; | ||
return track.muted && !track._maybeTransientMute; | ||
return track.muted && !maybeTransientMutedTracks.has(track.id); | ||
} | ||
@@ -23,0 +29,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
703080
10556