no casting required for mute/unmute

This commit is contained in:
Hiroshi Horie
2021-12-03 01:01:01 +07:00
parent 4c66704427
commit 9ef84dd4e2
@@ -54,15 +54,9 @@ class LocalTrackPublication<T extends LocalTrack> extends TrackPublication {
@override @override
bool get muted => track?.muted ?? super.muted; bool get muted => track?.muted ?? super.muted;
Future<void> mute() async { /// Mute the track associated with this publication
if (track is! LocalTrack) return; Future<void> mute() async => await track?.mute();
// Mute the track associated with this publication
return (track as LocalTrack).mute();
}
Future<void> unmute() async { /// Unmute the track associated with this publication
if (track is! LocalTrack) return; Future<void> unmute() async => await track?.unmute();
// Unmute the track associated with this publication
return (track as LocalTrack).unmute();
}
} }