Screen sharing from android native app

1,713 views
Skip to first unread message

samfast

unread,
Oct 28, 2015, 9:02:06 AM10/28/15
to discuss-webrtc
Hi,

Are there any plans to add screen sharing support in WebRTC android library? 

I mean just like VideoCapturer or VideoCapturerAndroid, do we have ScreenCapturer and ScreenCapturerAndroid also under development?

Android has given the API called MediaProjection API which captures the screen of Android. Is it a good option to integrate MediaProjection API with WebRTC for Android?

Any recommended direction for implementing screen sharing in android would be helpful.

Thanks

Benjamin Hamrick

unread,
Nov 19, 2015, 4:32:38 PM11/19/15
to discuss-webrtc
I am trying to do the same thing! Did you figure it out? Is it necessary to make a ScreenCapturer class in addition to ScreenCapturerAndroid?

Sojharo Mangi

unread,
Nov 19, 2015, 5:38:54 PM11/19/15
to discuss-webrtc
Hello,

I also could not understand the implementation of VideoCapturer. However, I changed the direction and am trying to do Screen Sharing from Android using MediaProjection API of Android 5.0. It is not good solution as it continuously takes the snapshots of Android screen and send them using DataChannel to other peer. For other peer, continuously changing images give the feel of shared screen.

I know it is just a workaround and not an efficient solution. I would change it once AndroidScreenCapturer is provided by WebRTC guys.

My work is still under construction and not complete, but it can give you some direction (I am stuck on some stupid place where I try to render sent images on canvas on web, and they are not being rendered there). The following question I asked might give you some hint on what I am trying to do:


Also if you find the solution to this, then do answer please :)

The SO question discusses the complete code which captures the android screen and then takes snapshots continuously and then send them using data channel. The idea was taken by this open source sample code which uses TemaSys SDK to share screen from Android. I just did not want to use their SDK so I tried to do myself.


You might like to see the sample code I use to render the sent images from android on web. This is the part where I am having issues:


Once again, I know it is not a good solution but a good workaround until this feature is officially supported in android by webrtc team. Kindly, also let me know if you are successful on doing this as I am also not able to render the sent images on web.

Regards

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/75bcdb71-8cdf-4abe-9406-7f0b453b161e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
 
Sojharo


Reply all
Reply to author
Forward
0 new messages