disposePlayer method
Dispose a specific player.
Implementation
Future<void> disposePlayer(String id) async {
final p = _players.remove(id);
_states.remove(id);
_onStopCallbacks.remove(id);
if (p != null) {
try {
await p.release();
await p.dispose();
} catch (_) {}
}
if (_activeId == id) {
_activePlayer = null;
_activeId = null;
}
}