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

Android, artwork from base64 String, not working

Open psquizzle opened this issue 2 years ago • 4 comments

Describe the Bug Setting artwork to a base64 string 'data:image/png;base64,iVBORw0KGg, doesn't work on Android. Works perfectly on iOS. I have also tried setting {uri:'base64'} this also works on iOS, but not on Android. When using the same base64 string in an image component you have to set width and height {uri:'base64', width:480, height:480} this also doesn't work

I am using "react-native-track-player": "^4.0.0-rc08" at the moment but also didn't work on v3.xx

Steps To Reproduce How can someone else reproduce this bug?

Code To Reproduce var track1 = { url: 'http://example.com/avaritia.mp3', // Load media from the network title: 'Avaritia', artist: 'deadmau5', album: 'while(1<2)', genre: 'Progressive House, Electro House', date: '2014-05-20T07:00:00+00:00', // RFC 3339 artwork: 'data:image/png;base64,iVBORw0KGg....' duration: 402 // Duration in seconds }; await TrackPlayer.add([track1]);

Replicable on Example App? Yes

Environment Info: System: OS: macOS 13.2.1 CPU: (10) arm64 Apple M1 Pro Memory: 641.36 MB / 16.00 GB Shell: version: 5.8.1 path: /bin/zsh Binaries: Node: version: 16.15.1 path: /usr/local/bin/node Yarn: version: 1.22.19 path: ~/Code/react-native/audio-flashcards/node_modules/.bin/yarn npm: version: 8.11.0 path: /usr/local/bin/npm Watchman: version: 2023.05.22.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.11.0 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 22.4 - iOS 16.4 - macOS 13.3 - tvOS 16.4 - watchOS 9.4 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: version: 14.3.1/14E300c path: /usr/bin/xcodebuild Languages: Java: version: 11.0.15.1 path: /usr/bin/javac Ruby: version: 2.7.6 path: /Users/peter/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.3 wanted: 0.72.3 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false

Real device? Or simulator? Real device What OS are you running? Android 12

psquizzle avatar Sep 17 '23 09:09 psquizzle

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 Dec 17 '23 01:12 github-actions[bot]

Still an ongoing issue.

psquizzle avatar Dec 17 '23 06:12 psquizzle

yes getting same issue working perfectly on iOS but not working on Android.

AmmarKhan21 avatar Jan 22 '24 16:01 AmmarKhan21

i recently was also passing base64 as artwork on android; it works on my end but often crashes the app, which i presume the base64 string becomes too large. whiile i dont do this id imagine writing base64 to the cache folder and point the artwork uri to that would work.

lovegaoshi avatar Mar 08 '24 17:03 lovegaoshi

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 Jun 07 '24 01:06 github-actions[bot]

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

github-actions[bot] avatar Jun 15 '24 01:06 github-actions[bot]