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

Jitterish audio with livestream specific stream #2163

Closed Thijmen closed 6 months ago

Thijmen commented 9 months ago

Describe the Bug When playing a specific livestream, the audio stutters- no matter which buffer settings I pick.

Steps To Reproduce Create a track with this URL to play: https://stream1.icehosting.nl/1twente-hengelo/;stream.mp3. This audio plays perfectly fine on my browser.

Code To Reproduce Open example app and use above stream to test.

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

Yes.

Environment Info:

System:
  OS: macOS 14.0
  CPU: (10) arm64 Apple M1 Pro
  Memory: 216.16 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.2.0
    path: ~/.nvm/versions/node/v20.2.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.nvm/versions/node/v20.2.0/bin/yarn
  npm:
    version: 9.8.0
    path: ~/.nvm/versions/node/v20.2.0/bin/npm
  Watchman:
    version: 2023.09.25.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.13.0
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK:
    Android NDK: 22.1.7171670
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.0/15A240d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.8.1
    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.72.6
    wanted: 0.72.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Using 3.2.0, but I tested it with the latest RC as well - same issue. Tested it on a simulator, and on my Samsung S23.

How I can Help I am unsure what is causing this. Once I know what is causing this, I can take a look at a possible PR, however I have slim to no experience with iOS development. I have some with Android, so happy to help out!

Hoping for anyone to have some information as to why this is happening.

puckey commented 9 months ago

is this happening on android or ios? (Since the first title of this issue contained ios and your test device was a Samsung)

Thijmen commented 9 months ago

Hi @puckey, the issue is happening on Android and iOS. I tested it on iOS emulator first and after creating this ticket I thought: hey, let me check my phone too! Hence I added my Samsung S23 Ultra as well.

puckey commented 9 months ago

Hmm I see what you mean with the stuttering audio – not sure what might be causing it though.. Especially since the underlying playback systems are completely different between android and ios.

Thijmen commented 9 months ago

Yes I wonder what this is, because its not happening on web. I tried to view logmessages of logcat on android but nothing really that pops out. Any ideas?

puckey commented 9 months ago

is your station carried on any other radio apps? might be interesting to see if the problem is occurring there also

DennisdeWitNL commented 9 months ago

I hear your stream stuttering in my Safari too. I think it is not an RNTP-related issue.

Thijmen commented 6 months ago

Indeed, this was an issue on our end. A reboot of the streaming server fixed the issue. Thanks all!