Use mediaprojection as a videosource for libstreaming

248 views Asked by At

I'm new in android developing and i want to develop an app about (android) screen sharing to multiple android device in a local network. I want to send the output of mediaprojection in real time using libstreaming library. Is it possible? How can i replace the video source of libstreaming with the mediaprojection output?

1

There are 1 answers

1
shalm On

Inside the VideoStream.java file wherein the source of the media recording is set to Camera, go ahead and change it to Surface.

MediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE)

This is assuming you want the screen recording to be streamed live to another screen.