11

I want to be able to send music to sonos using its API. Unfortunately the only way I know is to send an URI to the device so it can download it.

I have visited already the package react-native-httpserver. This one has not been tested in Android. So I had a look over Android's nanoHTTPD and other similar packages in iOS as CocoaHTTPServer is.

It should not very difficult to create a wrapper over those packages to build something cross-platform but I wonder if there is another solution in Javascript or some work developing over react-native-tcp

2 Answers 2

16

I'll answer my own question, time has passed by and some packages have been released. Even with limitations, but looks promising so far:

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for this! It is so difficult to search for this and not get basic tutorials on react-native-cli.
I am now searching for one of these two things and I'm having similar trouble: Serving a webm file over one of these http servers, or starting a Websocket server. Any thoughts?
For serving files I guess I'd use HTTP Static server
I am trying to create an app that cast local files but I am unable to do that, any idea how to access local files on server using above module
1

For those of you still looking for a good package to open a HTTP server in react native, react-native-http-bridge is unmaintained, but there is a maintained version:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.