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

AudioPlayerError: pausePlaying() called duringinvalid state: 2 #399

Open
3 tasks
gofunbox opened this issue Sep 9, 2024 · 0 comments
Open
3 tasks

AudioPlayerError: pausePlaying() called duringinvalid state: 2 #399

gofunbox opened this issue Sep 9, 2024 · 0 comments

Comments

@gofunbox
Copy link

gofunbox commented Sep 9, 2024

Bug Report

Problem

While recording, the phone rang, prompting an AudioPlayerError: pausePlaying() called during invalid state: 2, but the recording was not affected, which is normal. I reviewed the code and believe that the pauseAllLostFocus method should not handle the audio class during recording.

What is expected to happen?

What does actually happen?

Information

Command or Code

public void pauseAllLostFocus() { for (AudioPlayer audio : this.players.values()) { if (audio.getState() == AudioPlayer.STATE.MEDIA_RUNNING.ordinal()) { this.pausedForFocus.add(audio); audio.pausePlaying(); } } }

Environment, Platform, Device

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant