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

Requiring unknown module "2537" #2367

Open jerome-whatson opened 2 months ago

jerome-whatson commented 2 months ago

Describe the Bug Can't setup on web

Steps To Reproduce When i call await TrackPlayer.setupPlayer();

Code To Reproduce await TrackPlayer.setupPlayer(); on web

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

Environment Info: System: OS: macOS 14.4.1 CPU: (10) arm64 Apple M1 Pro Memory: 1.01 GB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.10.0 path: ~/.nvm/versions/node/v20.10.0/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v20.10.0/bin/yarn npm: version: 10.2.3 path: ~/.nvm/versions/node/v20.10.0/bin/npm Watchman: version: 2023.12.04.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /Users/jeromelebleu/.rvm/gems/ruby-3.2.2/bin/pod SDKs: iOS SDK: Platforms:

Paste the exact react-native-track-player version you are using : 4.1.1-nightly-9ff32f0f5a7b4f96900bf422810d587f5d2e3789

Real device? Or simulator? Web

What OS are you running? MacOS 14

YajanaRao commented 1 month ago

I am facing the same issue on web:

image

Importing the player before setupPlayer method fixes the issue

const shaka = require("shaka-player/dist/shaka-player.ui");
puckey commented 1 week ago

@jspizziri perhaps you have an idea on this

jspizziri commented 1 week ago

@YajanaRao were you able to confirm that my fix here resolves your issue? https://github.com/doublesymmetry/react-native-track-player/pull/2299

I suspect that your issue is related, buts o far, I haven't gotten anyone (other than myself) to confirm that it results I've gotten. If you could send me a minimal repro of your issue I could do the confirmation for you.

@jerome-whatson same goes for you.