rxlabz / audioplayer

A flutter plugin to play audio files iOS / Android / MacOS / Web ( Swift/Java )

Home Page:https://pub.dartlang.org/packages/audioplayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pause stops instead of pause

arkaray opened this issue · comments

I copied, pasted (and modified the names a bit) this code from here:

void _pause() async {
  final result = await player.pause();
  if (result == 1) setState(() => playerState = PlayerState.paused);
}

but player starts from the start when following is invoked:

void _play() async {
  final result = await player.play(kUrl);
  if (result == 1) setState(() => playerState = PlayerState.playing);
}

I am using Android 7.1.1 on Moto G5S to test.

Console message on pause:
W/MediaPlayer(24746): mediaplayer went away with unhandled events

hi, does the pause button works for you in the example app ?

yes