react-native-track-player icon indicating copy to clipboard operation
react-native-track-player copied to clipboard

After call `TrackPlayer.add(track)`, artwork and progress bar not show in notification player

Open sarike opened this issue 2 years ago • 7 comments

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?

sarike avatar Sep 08 '22 18:09 sarike

screenshot: IMG_20220909_015702

sarike avatar Sep 09 '22 01:09 sarike

The example app has the same issue.

sarike avatar Sep 12 '22 13:09 sarike

@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?

screenshot

jspizziri avatar Sep 12 '22 14:09 jspizziri

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.

  1. Played the first item(s) in the queue.
  2. Clicked my Add button to add your track.
  3. Skipped to your track.
  4. Observe the notification player (and I'm able to scrub/seek)

jspizziri avatar Sep 12 '22 14:09 jspizziri

@jspizziri

I can reproduce this issue use the latest example code.

expected: image

received: image

Steps to reproduce:

  1. Install example app in Android 12 (I use XiaoMi K50)
  2. Open example app and click play button.
  3. Observe the notification player (and the artwork is not shown)
  4. Skip to next in the notification player (and the artwork of the next track is not shown)
  5. Skip to prev in the notification player (and the artwork of the prev track is shown)

sarike avatar Sep 12 '22 15:09 sarike

@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?

jspizziri avatar Sep 12 '22 15:09 jspizziri

I can reproduce with Android 13(Pixel5a) only about artwork. Artwork is not shown.

Screenshot_20220913-150826

Spice-Z avatar Sep 13 '22 06:09 Spice-Z

The artwork is also not being displayed in some cases for me. Will update on specific cases when I'm sure.

RamProg avatar Nov 06 '22 19:11 RamProg

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.

github-actions[bot] avatar Feb 05 '23 02:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Feb 13 '23 02:02 github-actions[bot]

Any update on this??

ravi-roxiler avatar Mar 20 '23 08:03 ravi-roxiler

Hello, I have this issue too. Android 13

KornelKwiatkowski avatar May 18 '23 11:05 KornelKwiatkowski

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

pheonix5 avatar Feb 23 '24 00:02 pheonix5