I'm an android developer but a noob in nodejs.I want to create a live radio appliction so I use android to create the client app and nodejs to create the server.
Step:
- Android : MediaRecord to record video and transfer to nodejs server.
- Nodejs server : Receive the stream and transfer it to another clients or save it in the database.
I read the MediaRecord apis and found the native way to send stream videos to server.
Socket socket = new Socket(“xxx.xxx.x.xxx”, 8890);
ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket);
MediaRecorder.setOutputFile(pfd.getFileDescriptor());
But it the NATIVE socket. NOT suit for nodejs server.
I use the Socket.io to establish the socket server and the socket.io-client in android client to connect to the socket server. But it doesn't support to transfer the stream video info from android to server. Then I found socket.io-stream. It supports to transfer the stream info but no any android api. So I want to know what should I do or what should I use to transfer stream videos from Android to a nodejs server? Do I need to estabilsh my own nodejs socket libs to finish this work?
Any help will be appreciated. Thanks anyway.