Fix: RemoteTrack's initial mute state (#59)

This commit is contained in:
Hiroshi Horie
2021-12-17 12:26:33 +07:00
committed by GitHub
parent fa063ac352
commit f458f052a5
2 changed files with 46 additions and 26 deletions
+12 -6
View File
@@ -139,14 +139,20 @@ abstract class Track extends DisposableChangeNotifier
}
@internal
void updateMuted(bool muted, {bool shouldSendSignal = false}) {
void updateMuted(
bool muted, {
bool shouldNotify = true,
bool shouldSendSignal = false,
}) {
if (_muted == muted) return;
_muted = muted;
events.emit(InternalTrackMuteUpdatedEvent(
track: this,
muted: muted,
shouldSendSignal: shouldSendSignal,
));
if (shouldNotify) {
events.emit(InternalTrackMuteUpdatedEvent(
track: this,
muted: muted,
shouldSendSignal: shouldSendSignal,
));
}
}
@internal