pauseAudio method

dynamic pauseAudio()

function for pausing audio

Implementation

pauseAudio() async {
  if (player?.state == PlayerState.playing) {
    console(logs: "audio pause, messageID: ${_audioPlayInfo?.msgID}");
    await player?.pause();
  } else {
    console(logs: "current state is ${player?.state.name}, no need to pause");
  }
}