stop method
Stop this Track if not stopped. Returns true if stopped, false if already stopped
Implementation
@override
Future<bool> stop() async {
final didStop = await super.stop();
if (didStop) {
// update counter
await _trackCounterLock.synchronized(() async {
if (this is LocalAudioTrack) {
_localTrackCount--;
} else if (this is! LocalAudioTrack) {
_remoteTrackCount--;
}
await _onAudioTrackCountDidChange();
});
}
return didStop;
}