onUnpublish method

  1. @override
Future<bool> onUnpublish()
inherited

Implementation

@override
Future<bool> onUnpublish() async {
  final didUpdate = await super.onUnpublish();
  if (didUpdate) {
    // update counter
    await _trackCounterLock.synchronized(() async {
      _localTrackCount--;
      await _onAudioTrackCountDidChange();
    });
  }
  return didUpdate;
}