just_audio
just_audio copied to clipboard
just audio background media item not changing before stop and re start.
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.
Can you please provide a minimal reproduction project and user steps according to the instructions?
Same issue.
-
Start player by
setAudioSource(AudioSource.uri(...))
of mediaitem. On the initial play, the notification mediaitem is fine. -
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 would you consider submitting a valid bug report? I'll close this report since @jinsyu never responded to my request above.
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.