stopAllPlayers method

void stopAllPlayers()

This method is to free all players resources all at once.

This method is required to call only once from any one of the PlayerControllers.

Note -:this method will close stream and free resources taken by players but it will only dispose controller who's stopAllPlayers method was called calling dispose is still required for every other PlayerController

Implementation

void stopAllPlayers() async {
  PlatformStreams.instance.dispose();
  await AudioWaveformsInterface.instance.stopAllPlayers();
  PlatformStreams.instance.playerControllerFactory.remove(this);
  super.dispose();
}