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

just audio background media item not changing before stop and re start. #488

Closed
jinsyu opened this issue Aug 22, 2021 · 4 comments
Closed
Assignees
Labels
1 backlog bug Something isn't working

Comments

@jinsyu
Copy link

jinsyu commented Aug 22, 2021

Which API doesn't behave as documented, and how does it misbehave?

final mediaItem = MediaItem(SOME_INFORMATION);
      await audioPlayer.setAudioSource(
          AudioSource.uri(AUDIO_STREAM_URL),
          tag: mediaItem));
      await audioPlayer.play();

this is my code. and it is for 24h live streaming app.
it receive icy metadata and update mediainfo using above code.
and the background notification information not changing.
it need to be stop first.
like

await audioPlayer.stop()
--- above code ---

I think this is not smooth way to update song information.

Minimal reproduction project

To Reproduce (i.e. user steps, not code)

Error messages

Expected behavior

Screenshots

Desktop (please complete the following information):

  • OS: MACOS 11.5.2

Smartphone (please complete the following information):

  • Device: Android Emulator, IOS Simulator, IPhone 12 pro max
    • OS: [e.g. iOS8.1]

Flutter SDK version
m1 silicon laptop so not described properly

[✓] Flutter (Channel stable, 2.2.2, on macOS 11.5.2 20G95 darwin-arm, locale
    ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[!] Android Studio
    ✗ Unable to find bundled Java version.
[!] Android Studio (version 2020.3)
    ✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3)
[✓] VS Code (version 1.59.1)
[✓] Connected device (2 available)

Additional context
Add any other context about the problem here.

@jinsyu jinsyu added 1 backlog bug Something isn't working labels Aug 22, 2021
@ryanheise
Copy link
Owner

Can you please provide a minimal reproduction project and user steps according to the instructions?

@dotdevx
Copy link

dotdevx commented Sep 28, 2023

Same issue.

  1. Start player by setAudioSource(AudioSource.uri(...)) of mediaitem.
    On the initial play, the notification mediaitem is fine.

  2. Update player with setAudioSource(AudioSource.uri(...)) of other mediaitem.
    On the subsequent play, the mediaitem (image and texts) in the notification is not updated at all with the other mediaitem, stuck on the first mediaitem.

The notification mediaitem only updates after await player.stop() and setAudioSource is called.
But, doing so will introduce "...player already exist" (maybe another bug?), that causes the player to be permanently stalled, cannot call any setAudioSource to play anymore. Need to restart the app to make the player play again.

@ryanheise
Copy link
Owner

@dotdevx would you consider submitting a valid bug report? I'll close this report since @jinsyu never responded to my request above.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants