Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resume after stopped in android #1820

Open
2 tasks done
2shrestha22 opened this issue Jul 21, 2024 · 4 comments
Open
2 tasks done

Can't resume after stopped in android #1820

2shrestha22 opened this issue Jul 21, 2024 · 4 comments
Labels

Comments

@2shrestha22
Copy link

Checklist

  • I read the troubleshooting guide before raising this issue
  • I made sure that the issue I am raising doesn't already exist

Current bug behaviour

After stopping a audio stream it can't be resumed. Resuming the audio stream does nothing on android.

What is working:

  • resume from pause on android
  • resume from stopped on linux

Expected behaviour

A stopped audio should be resumed when calling resume();

Steps to reproduce

  1. Play an audio stream on android
  2. Stop the audio
  3. Resume the audio

Code sample

Code sample
  /// Play focused station.
  Future<void> play() async {
    await _audioPlayer.resume();
  }

  // Pause focused station.
  Future<void> pause() async {
    await _audioPlayer.pause();
  }

  Future<void> stop() => _audioPlayer.stop();

Affected platforms

Android

Platform details

No response

AudioPlayers Version

6.0.0

Build mode

debug, profile, release

Audio Files/URLs/Sources

https://radio-broadcast.ekantipur.com/stream

Screenshots

No response

Logs

my relevant logs
Full Logs
my full logs or a link to a gist

Flutter doctor:

Output of: flutter doctor -v

Related issues / more information

No response

Working on PR

no way

@AndreasGradinger
Copy link

I have the same issue - did you find any solution?

@2shrestha22
Copy link
Author

I have the same issue - did you find any solution?

I switched to just_audio.

@duytq2dsv
Copy link

I have the same issue

@progamax
Copy link

progamax commented Oct 8, 2024

If this can help you, I had the same issue and I found the solution :
My audio file was very short and the default release mode of the player releases the resource (so, resume method can't work anymore)
I just wrote : _player.setReleaseMode(ReleaseMode.stop);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants