Skip to content

Commit

Permalink
fix track.stop for remote track. (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc authored Dec 23, 2024
1 parent f6a8f24 commit 2afc996
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/track/remote/remote.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ abstract class RemoteTrack extends Track {

@override
Future<bool> stop() async {
final didStop = await super.stop();
final didStop = await super.stop() || !muted;
if (didStop) {
await disable();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/track/track.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ abstract class Track extends DisposableChangeNotifier
logger
.fine('$objectId.disable() disabling ${mediaStreamTrack.objectId}...');
try {
if (_active) {
if (_active || !_muted) {
mediaStreamTrack.enabled = false;
}
} catch (_) {
Expand Down

0 comments on commit 2afc996

Please sign in to comment.