no casting required for mute/unmute
This commit is contained in:
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user