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.18k stars 981 forks source link

`remove(lastTrack)` inconsistent behaviour between iOS and Android #2243

Closed Dajust closed 2 months ago

Dajust commented 5 months ago

Describe the Bug When the last track is removed, the first track in the queue gets activated on both platforms correctly.

Now, if the last track removed was actively playing (The player was not in a paused state ), then, after activating the first track, iOS starts playing the first track immediately, but Android does not.

Steps To Reproduce On both platforms, play the last song on the queue, and try to remove it while playing. Observe that the first track is activated and starts playing immediately on iOS, but on Android, it activates but does not play until a play action is triggered.

Code To Reproduce N/A

Replicable on Example App? N/A

Environment Info:

System:
  OS: macOS 14.1.1
  CPU: (8) arm64 Apple M1
  Memory: 138.56 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.14.0
    path: ~/.nvm/versions/node/v18.14.0/bin/node
  Yarn:
    version: 1.22.21
    path: ~/.../.../node_modules/.bin/yarn
  npm:
    version: 9.6.6
    path: ~/.nvm/versions/node/v18.14.0/bin/npm
  Watchman:
    version: 2023.05.01.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "29"
      - "30"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Google APIs Intel x86 Atom
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-S | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.2
    wanted: ^0.73.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Paste the exact react-native-track-player version you are using Real device? Or simulator? Real device What OS are you running? Android 13, iOS 17

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?

github-actions[bot] commented 2 months ago

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] commented 2 months ago

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