diff --git a/lib/src/publication/local_track_publication.dart b/lib/src/publication/local_track_publication.dart index 49d3396..7a4bbd4 100644 --- a/lib/src/publication/local_track_publication.dart +++ b/lib/src/publication/local_track_publication.dart @@ -54,15 +54,9 @@ class LocalTrackPublication extends TrackPublication { @override bool get muted => track?.muted ?? super.muted; - Future mute() async { - if (track is! LocalTrack) return; - // Mute the track associated with this publication - return (track as LocalTrack).mute(); - } + /// Mute the track associated with this publication + Future mute() async => await track?.mute(); - Future unmute() async { - if (track is! LocalTrack) return; - // Unmute the track associated with this publication - return (track as LocalTrack).unmute(); - } + /// Unmute the track associated with this publication + Future unmute() async => await track?.unmute(); }