play method

Future<void> play()

Tells the media player to play the current song _assetsAudioPlayer.play();

Implementation

Future<void> play() async {
  if (_isLiveStream) {
    // on livestream, it re-open the media to be live and not on buffer
    await _openPlaylistCurrent();
  } else {
    if (_stopped) {
      _stopped = false;
      _lastOpenedAssetsAudio = null; //to force open again
      // open the last
      _playlist?.returnToFirst();
      await _openPlaylistCurrent();
    } else {
      await _play();
    }
  }
}