# Cache Audio Player Plus

Cache Audio Player Plus is a Flutter plugin that extends the functionality of the audioplayers plugin. It allows you to play multiple network audio files simultaneously and provides caching capabilities for improved performance and offline playback. This plugin is particularly useful for voice chats and similar applications where audio files need to be played and cached for efficient playback without re-downloading from the network.

## Usage

To use Cache Audio Player Plus, follow these steps:

  1. Create an instance of the CacheAudioPlayerPlus class:
final player = CacheAudioPlayerPlus();
  1. Play audio from a URL and enable caching:
player.playerNetworkAudio(url: "https://youraudiofilelink", cache: true);
  1. Pause the currently playing audio:
  1. Stop playing the current audio:
  1. Resume the paused audio:
  1. Move the audio cursor to a specific position:
  1. Set the volume of the player:
  1. Set the balance of the player:
  1. Get the current state of the player:
PlayerState state = player.state;

Possible player states include:

  • Stopped
  • Playing
  • Paused
  • Completed
  • Disposed
  1. Subscribe to the stream of changes in audio duration:
player.onDurationChanged.listen((duration) {});
  1. Subscribe to the stream of changes in audio position:
player.onPositionChanged.listen((duration) {});
  1. Subscribe to the stream of player state changes:
player.onPositionChanged.onPlayerStateChanged((playerState) {});

Note: Ensure that you handle the appropriate events and errors when using the Cache Audio Player Plus plugin.

This readme file provides a simplified overview of the usage of Cache Audio Player Plus and its available methods. Refer to the plugin's documentation for detailed instructions and additional features.

We hope you find Cache Audio Player Plus helpful in incorporating network audio playback and caching functionality into your Flutter applications.