just_audio icon indicating copy to clipboard operation
just_audio copied to clipboard

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

Open jinsyu opened this issue 3 years ago • 1 comments

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 avatar Aug 22 '21 01:08 jinsyu

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

ryanheise avatar Aug 22 '21 01:08 ryanheise

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.

dotdevx avatar Sep 28 '23 22:09 dotdevx

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

ryanheise avatar Sep 29 '23 02:09 ryanheise

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[bot] avatar Oct 14 '23 00:10 github-actions[bot]