Cloudkibo / Android

0 stars 0 forks source link

(webrtc library update) New Screen sharing method from android to android and web #532

Open sojharo opened 7 years ago

sojharo commented 7 years ago

I later came to know from WebRTC release notes that they are now supporting the screen sharing from Android. We had done workaround to use Android 5.0 MediaProjection API to capture screenshots and then send them using data channel to do screen sharing from android.

This had limited us to devices running Android 5.0 and above. But now we can again go back to support earlier android versions as well.

https://groups.google.com/forum/#!msg/discuss-webrtc/DyeVS9IMTLc/1gUM7osoCwAJ

https://bugs.chromium.org/p/webrtc/issues/detail?id=6524

sojharo commented 7 years ago

I learnt the API for this yesterday. And it would be needing a screen stream that we get using screen capturer class. Just like video, we would add this stream as a track. I have started coding on this and it would complete today IA.

jekram commented 7 years ago

Thanks

sojharo commented 7 years ago

I have worked on it and written the code to capture screen. There is still some work remaining on this i.e. to write screen observer and some other interfaces.

sojharo commented 7 years ago

I completed the code but screen sharing api is not capturing me any frames. I am trying to work more on this and this might be the problem on receiving side.

jekram commented 7 years ago

Thanks for the update

sojharo commented 7 years ago

I spent a lot of time on this today and I was able to find the error in the logs. When I inspected on this error and read on google groups, I found that this error is due to not adding libwebrtc.jar file into build during compilation of library. It said that the current code of pristine.io (which is the webrtc build script that we used to build webrtc) is not updated to include latest way of building webrtc. It is building the old way therefore it missed the creation of libwebrtc.jar. Here is the link which discuss this error that I was shown:

https://groups.google.com/forum/#!msg/discuss-webrtc/PkfAVr_TYQs/sndUN60VCQAJ;context-place=forum/discuss-webrtc

I will have build the webrtc library for android again to include the missing libwebrtc.jar file. For this, I would have to work on and modify the pristine.io script as it is not up-to-date with current way of building webrtc library.

https://github.com/pristineio/webrtc-build-scripts/blob/master/android/build.sh

jekram commented 7 years ago

OK. Thanks for the update

sojharo commented 7 years ago

We can mark defer to this task as we haven't compiled the new version of webrtc library. We tried but had build issues.