react-native-track-player
react-native-track-player copied to clipboard
After call `TrackPlayer.add(track)`, artwork and progress bar not show in notification player
Describe the Bug
After call TrackPlayer.add(track)
, artwork and progress bar not show in notification player. But after call TrackPlayer.reset()
and add again, artwork show bug progress not show.
track data:
{
"album": "",
"artist": "路人抓马",
"artwork": "https://fdfs.xmcdn.com/storages/ae5d-audiofreehighqps/6A/10/GMCoOSQGkOeBAAJkOgFz3A0v.jpeg",
"contentType": "audio/x-m4a",
"duration": 4226,
"id": "yP9L2V",
"podcastId": "gK82Yb",
"podcastImageHref": "https://cdn.wavpub.com/images/podcast-logo/dramaboy-n.jpeg",
"podcastTitle": "路人抓马",
"position": 367.035,
"title": "095 哲学与雨刮器与沟通技术",
"url": "https://dl.wavpub.com/item/159_31573727_7700.m4a"
}
Steps To Reproduce How can someone else reproduce this bug?
Code To Reproduce Please provide a simple code example that allows others to replicate the bug.
Environment Info:
Paste the results of npx react-native info
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 255.72 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - ~/.volta/tools/image/node/16.15.1/bin/node
Yarn: 3.0.1 - ~/Projects/podium-app/node_modules/.bin/yarn
npm: 8.11.0 - ~/.volta/tools/image/node/16.15.1/bin/npm
Watchman: 2022.06.27.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not FoundSystem:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 255.72 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - ~/.volta/tools/image/node/16.15.1/bin/node
Yarn: 3.0.1 - ~/Projects/podium-app/node_modules/.bin/yarn
npm: 8.11.0 - ~/.volta/tools/image/node/16.15.1/bin/npm
Watchman: 2022.06.27.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Paste the exact react-native-track-player
version you are using
3.1.0
Real device? Or simulator?
Real device
What OS are you running?
MIUI 13.0.22. Android 12
How I can Help What can you do to help resolve this? Have you investigated the underlying JS or Swift/Android code causing this bug? Can you create a Pull Request with a fix?
screenshot:
The example app has the same issue.
@sarike , I just tested this on a real Android (Moto G Power - 2021 running Android 11), and I am not getting the same results. Can you please try installing the nightly
version and see if you have the issue remains?
I'll add my test steps here, since I'm not 100% sure we tested in the same way:
I added a button which, when clicked called a TrackPlayer.add
of the track you specified above.
- Played the first item(s) in the queue.
- Clicked my
Add
button to add your track. - Skipped to your track.
- Observe the notification player (and I'm able to scrub/seek)
@jspizziri
I can reproduce this issue use the latest example code.
expected:
received:
Steps to reproduce:
- Install example app in Android 12 (I use XiaoMi K50)
- Open example app and click play button.
- Observe the notification player (and the artwork is not shown)
- Skip to next in the notification player (and the artwork of the next track is not shown)
- Skip to prev in the notification player (and the artwork of the prev track is shown)
@sarike I'm not getting the same results.
@dcvz @mpivchev @puckey , I don't have access to an Android 12 device. Would one of you be able to retest this and confirm or deny reproduction?
I can reproduce with Android 13(Pixel5a) only about artwork. Artwork is not shown.
The artwork is also not being displayed in some cases for me. Will update on specific cases when I'm sure.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Any update on this??
Hello, I have this issue too. Android 13
Hey guys, what I identified, and that on the Xiaomi Android 12 device, with MIUI 13 these errors occur in the art, but on devices with different Android and without MIUI it worked perfectly and every time I pressed play it showed the art