doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.2k stars 984 forks source link

Event.PlaybackMetadataReceived not fired anymore ?? #2149

Closed DrMickArtisan closed 9 months ago

DrMickArtisan commented 9 months ago

Describe the Bug I have an android app to read a radio stream. The stream is continuous I used to use Event.PlaybackMetadataReceived to update artist/title in my app. This as always worked (and in fact it works on the current version found on app store (notylus radio)).

Recently I tried to add a new feature, and then update some package, test on android simulator and ... never see the event anymore ! In fact it seems that it's fired only on startup :( .

Steps To Reproduce How can someone else reproduce this bug? Replicable on Example App? I tried to install examples and run => click on Update Notification Metadata Randomly seems to do nothing, but I'm not sure what to expect ..

Environment Info:

System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (16) x64 Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz
    Memory: 17.05 GB / 31.24 GB
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.20.2 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.4 - /usr/bin/npm
    Watchman: 4.9.0 - /usr/bin/watchman
  IDEs:
    Android Studio: Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
  Languages:
    Java: 11.0.20.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0 
    react-native: 0.69.9 => 0.69.9 
  npmGlobalPackages:
    *react-native*: Not Found

react-native-track-player 3.2.0 The only package modified are @react-native-picker/picker (2.4.2 to 2.5.1), react-native-autocomplete-dropdown (new) react-native-svg (new)

dcvz commented 9 months ago

Hi @DrMickArtisan, we haven't changed anything in v3.2 -- currently we're close to releasing v4. Are you sure you are perhaps not trying on a stream that isn't emitting timed data? Perhaps you updated to nightly?

DrMickArtisan commented 9 months ago

In fact I just test it on a real device (android 13), and it works. It seems to fail only on my device simulator .. but I can't find why :(

dcvz commented 9 months ago

Simulator sometimes has quirks depending on OS, IDE version and the type of track playing. I'm glad this is working in real app for you! We'll likely not look into the simulator issue, so I'm going to close this issue.