I'm creating a program to record the screen and use a socket to send the data over socket to server. I've successfully implemented it on my sdcard but how do I create a socket from Socket.io library? setOutputFile asks for filedescriptor. Where is it in socket.io?
Socket.io code:
try {
socket = IO.socket("http://192.168.0.105:3000");
socket.connect();
// works
} catch (Exception e) {
e.printStackTrace();
}
Now for mediarecorder:
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
// ... some more props...
mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mMediaRecorder.setOutputFile(NEED A FILE DESCRIPTOR HERE);
How do I go about this? Help!