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

[android] Setting playermode within play method results in endless future #1176

Closed
Ephenodrom opened this issue Jun 20, 2022 · 2 comments · Fixed by #1272
Closed

[android] Setting playermode within play method results in endless future #1176

Ephenodrom opened this issue Jun 20, 2022 · 2 comments · Fixed by #1272
Labels

Comments

@Ephenodrom
Copy link

Ephenodrom commented Jun 20, 2022

I tried the newest version 1.0.1 on android and my app is not playing any sounds anymore. I just upgraded from 0.20.2 to 1.0.1 without changing any code on my side.

The following example code seems to create an endless future and does not play any sound. When i remove the mode parameter everything just works fine again.

await player!.play(
        DeviceFileSource(pathToSoundFile),
        volume: volume ,
        mode: PlayerMode.mediaPlayer,
      );

The strange thing in this case is, that there is no error or any message displayed.

Device / Flutter info :

  • Android Pixel 4a
  • Android 12 version with the latest patch from June.
  • Flutter 3.0.1
@Ephenodrom Ephenodrom added the bug label Jun 20, 2022
@WillianSalceda
Copy link

WillianSalceda commented Jun 20, 2022

Same problem, but even without setting mode parameter.

print('1');
final player = AudioPlayer();
await player.play(AssetSource(AppAssets.errorSound));
print('2');

Console log after some minutes: I/flutter (16205): 1

@WatchDogsDev
Copy link

Same problem here

Gustl22 added a commit that referenced this issue Sep 8, 2022
* ignoring live stream
* reset streamId on stop
Gustl22 added a commit that referenced this issue Sep 8, 2022
* ignoring live stream
* reset streamId on stop
Gustl22 added a commit that referenced this issue Sep 8, 2022
* ignoring live stream
* reset streamId on stop
Gustl22 added a commit that referenced this issue Sep 12, 2022
…) (#1272)

* fix(android): lowLatency bugs (closes #1176, closes #1193, closes #1165)

* ignoring live stream
* reset streamId on stop

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

Successfully merging a pull request may close this issue.

3 participants