Participant ChangeNotifier
This commit is contained in:
@@ -10,4 +10,22 @@ class LocalTrackPublication extends TrackPublication {
|
||||
: super.fromInfo(info) {
|
||||
this.track = track;
|
||||
}
|
||||
|
||||
set muted(bool val) {
|
||||
if (val == muted) {
|
||||
return;
|
||||
}
|
||||
super.muted = val;
|
||||
track?.mediaTrack.enabled = !val;
|
||||
_participant.engine.client.sendMuteTrack(sid, val);
|
||||
|
||||
if (val) {
|
||||
_participant.delegate?.onTrackMuted(_participant, this);
|
||||
_participant.roomDelegate?.onTrackMuted(_participant, this);
|
||||
} else {
|
||||
_participant.delegate?.onTrackUnmuted(_participant, this);
|
||||
_participant.roomDelegate?.onTrackUnmuted(_participant, this);
|
||||
}
|
||||
_participant.muteChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ class RemoteTrackPublication extends TrackPublication {
|
||||
_participant.delegate?.onTrackUnmuted(_participant, this);
|
||||
_participant.roomDelegate?.onTrackUnmuted(_participant, this);
|
||||
}
|
||||
_participant.muteChanged();
|
||||
}
|
||||
|
||||
RemoteTrackPublication(TrackInfo info, this._participant, [Track? track])
|
||||
|
||||
Reference in New Issue
Block a user