disposeAll method

Future<void> disposeAll()

Dispose all players — use this on full cleanup.

Implementation

Future<void> disposeAll() async {
  for (final id in List<String>.from(_players.keys)) {
    await disposePlayer(id);
  }
  _players.clear();
  _states.clear();
  _onStopCallbacks.clear();
  _activePlayer = null;
  _activeId = null;
}