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.26k stars 1.01k forks source link

Cannot use seek bar in media controls on Android #2005

Closed rmbusch closed 1 year ago

rmbusch commented 1 year ago

Describe the Bug The Android seek bar does not update with the track being played, and it does not allow the user to move it to change the track's position.

Steps To Reproduce I have the following capabilities:

    capabilities: [
      Capability.Play,
      Capability.Pause,
      Capability.SeekTo,
      Capability.JumpForward,
      Capability.JumpBackward,
    ],
    notificationCapabilities: [
      Capability.Play,
      Capability.Pause,
      Capability.SeekTo,
      Capability.JumpForward,
      Capability.JumpBackward,
    ],
    compactCapabilities: [
      Capability.Play,
      Capability.Pause,
      Capability.JumpForward,
      Capability.JumpBackward,
    ],

Code To Reproduce I have tried the above (and similar) capabilities and nothing works. I have also tried with and without this listener:

TrackPlayer.addEventListener(Event.RemoteSeek, (x) => TrackPlayer.seekTo(x.position));

Replicable on Example App? Can you replicate this bug in the React Native Track Player Example App?

Environment Info: Paste the results of npx react-native info System: OS: Windows 10 10.0.22621 CPU: (16) x64 AMD Ryzen 7 PRO 6850U with Radeon Graphics
Memory: 12.69 GB / 30.76 GB Binaries: Node: 18.16.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowAllTrustedApps: Disabled Versions: 10.0.19041.0 IDEs: Android Studio: AI-222.4459.24.2221.9862592 Visual Studio: Not Found Languages: Java: 17.0.4 npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.7 => 0.71.7 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found Paste the exact react-native-track-player version you are using 3.2.0 Real device? Or simulator? real What OS are you running? Android 13 and Android 12 (two devices both have the issue)

rmbusch commented 1 year ago

Update, I am able to get "JumpForward" and "JumpBackward" to work on Android 12 but not on Android 13. I am not able to get a progress bar or the ability to control the progress bar in either Android 12 or 13.

jspizziri commented 1 year ago

@rmbusch please create a repro in the example project by forking this repository. If this is a bug it's not one that anyone else seems to be having, so I'm a little skeptical here. Create the repro and I'll re-open.

rohit-dhingra commented 1 year ago

@jspizziri Any update on this

jspizziri commented 1 year ago

@RohitDhingra0786 please be a good citizen and the comments before you ping someone.

rohit-dhingra commented 1 year ago

Hi @jspizziri , Seek To isn't showing in the notification bar

rmbusch commented 1 year ago

For me, the problem went away when I switched to a nightly a few months back. There was no way to fix the problem on the version of RNTP I was running on at the time.

On Fri, Aug 18, 2023 at 12:27 PM Rohit Dhingra @.***> wrote:

Hi @jspizziri https://github.com/jspizziri , Seek To isn't showing in the notification bar

— Reply to this email directly, view it on GitHub https://github.com/doublesymmetry/react-native-track-player/issues/2005#issuecomment-1684219826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2P5LLP5ZA5LU5GCUZFJSLXV6QYVANCNFSM6AAAAAAXSOA76Q . You are receiving this because you were mentioned.Message ID: @.*** com>

rohit-dhingra commented 1 year ago

For me, the problem went away when I switched to a nightly a few months back. There was no way to fix the problem on the version of RNTP I was running on at the time. On Fri, Aug 18, 2023 at 12:27 PM Rohit Dhingra @.> wrote: Hi @jspizziri https://github.com/jspizziri , Seek To isn't showing in the notification bar — Reply to this email directly, view it on GitHub <#2005 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2P5LLP5ZA5LU5GCUZFJSLXV6QYVANCNFSM6AAAAAAXSOA76Q . You are receiving this because you were mentioned.Message ID: @. com>

Hi @rmbusch not working for me, i have installed the 3.2.0 nightly version