Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Android WebRTC Library #75

Closed
sojharo opened this issue Oct 27, 2015 · 35 comments
Closed

Update Android WebRTC Library #75

sojharo opened this issue Oct 27, 2015 · 35 comments

Comments

@sojharo
Copy link
Contributor

sojharo commented Oct 27, 2015

We need to upgrade our webrtc library for android to latest version. It would solve screen sharing problems that we have had.

@jekram
Copy link

jekram commented May 19, 2016

@sojharo

WE should probably upgrade both WebRTC and the latest Android Library also

@jekram
Copy link

jekram commented Jul 23, 2016

@sojharo

What is the status of this? have we done any work?

Is this needed for 1-1 Call or for Android Chat also?

What version we are using and what is the latest version out there?

@sojharo
Copy link
Contributor Author

sojharo commented Jul 24, 2016

Our version is 8871 and latest version of webrtc library is 11139

https://mvnrepository.com/artifact/io.pristine/libjingle

It is for 1-1 webrtc call and not for chat.

Work was not done on this as changing the library would have demanded the changes in current code.

@sojharo
Copy link
Contributor Author

sojharo commented Jan 11, 2017

The latest library is still 11139 on the website.

I had completed my review on them before leaving. I also looked into some previous open webrtc questions to that we had asked on webrtc groups. Some of them are now fixed by webrtc team for android and in new version we would be changing our code for these features.

Data Channel: We use it to transfer the files between two peers. The problem was that we needed to include video and audio parameters in data only connection which was not needed. This was one workaround to work with data channel on Android. This has been fixed now and we have a changed function to use in our current webrtc.

Video Capturing This is modified and we can capture camera without audio as well. First our audio and camera went on same channel. However, also I found new functions to switch cameras on the go.

Screen Sharing There is still no update on this and we have to rely on Android getMediaProject to capture android screen and webrtc still doesn't support the screen sharing from android to other devices.

Graphics There was some problem that our video got skewed and when it was rendered on the graphics renderer. From Internet, I had found the workaround but now this is fixed and we don't need to use the workaround.

There were some interface classes that I couldn't understand they seemed to be related with making peer connection. I will have to download the library in any app in order to understand more on these.

@jekram jekram removed the v3 label Jan 25, 2017
@sojharo
Copy link
Contributor Author

sojharo commented Jan 30, 2017

https://mvnrepository.com/artifact/io.pristine/libjingle

This used to be organisation which compiled newer versions of library from webrtc source code for both android and iOS. It seems that they have stoped compiling the newer versions.

The last build that they had made was in December 2015. There are many changes in WebRTC source code since then. So this is outdated for us now. We will have to compile the source code for android and iOS ourselves. This usually takes hours as it downloads and processes data in GBs.

Pristine.io had started automated builds of WebRTC in February 2015. Looks like they ended this work at December 2015. After this, no new build of webrtc is available on their repository. Here is their old blogpost:

https://pristine.io/2015/02/automated-webrtc-building/

I am going to read on webrtc official website about the steps to build library ourselves. I would also try to find how to do it automated using CI (shippable) like pristine.io used to do.

@sojharo
Copy link
Contributor Author

sojharo commented Jan 30, 2017

I found the automated build scripts by pristine.io on the following github repository:

https://github.com/pristineio/webrtc-build-scripts

I have spent some time on it and it is doing some errors in the build process. I have opened the bug with repository:

pristineio/webrtc-build-scripts#219

Next, I would use the build process defined on WebRTC official website. It is not automated and I will follow steps one by one manually.

@jekram
Copy link

jekram commented Jan 30, 2017

@sojharo Thanks for the update

Did we use https://github.com/pristineio/webrtc-build-scripts before?

@sojharo
Copy link
Contributor Author

sojharo commented Jan 30, 2017

No, as they were already giving out the build file made using this script, therefore, we used the build file. But looks like they have stopped making build file after december 2015.

@jekram
Copy link

jekram commented Jan 30, 2017

If they have stopped building the automated scripts and for us, if this is a once a year event to get current to the libraries it will not be worth our effort to automate it. Probably manual effort would suffice.

@sojharo
Copy link
Contributor Author

sojharo commented Jan 30, 2017

They were running CI tool which got triggered whenever webrtc team did commit on webrtc main code. It automatically downloaded the code in CI and ran the build. This is how it was automated. To automate it we would need to work with CI tool like shippable. The manual process is what I tried to do today on my computer.

@jekram
Copy link

jekram commented Jan 30, 2017

I think I am OK with the manual process for now. If our frequency increases then we can automate it.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 1, 2017

I had started to build webrtc manually. Yesterday, for this, I installed and setup depot tools first. Afterwards, I updated the Xcode to latest version. I then started to fetch the webrtc source code and run gclient sync. However, it got stuck in the middle due to Internet disconnectivity. It downloads around 16. Therefore, it gave errors. I would try again with downloading today.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 2, 2017

I tried around 10 hours on this. It kept running and finally it did error of remote hung.

screen shot 2017-02-02 at 12 05 50 pm

The next I will try on Zarmeen desktop computer in office. That might be stable internet. The other options is to run on travis or shippable UI. They also have fast Internet.

@jekram
Copy link

jekram commented Feb 2, 2017

Thanks for the update.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 3, 2017

Yesterday, I installed Linux Operating System on the desktop computer of office as compiling of library on windows didn't work first. The installation took some time as I had to do dual OS to keep the files safe which were on windows. Today I have started the installation of webrtc and compilation work.

@jekram
Copy link

jekram commented Feb 3, 2017

OK.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 4, 2017

Yesterday, I setup the depot tools, git, python and other required things for building webrtc on linux. After this, I started the pulling and compilation work. It downloads 16 GB of data so I kept it running.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 6, 2017

I went on to travis CI and tried running the scripts there. However, I had some issues as it was demanding for yaml file or gradle file. I only had the linux bash script which automated the build. I first tried running with that but it didn't work. Also, I tried searching how to run linux scripts. Moreover, I also kept the running of library on lab computer again.

I have asked the question on forum now. Next, I will do it on docker maybe this time it works.

@jekram
Copy link

jekram commented Feb 6, 2017

Why we cannot build on this desktop server?

@sojharo
Copy link
Contributor Author

sojharo commented Feb 7, 2017

I tried building the code again and this time it is completely downloaded and did some errors in compilation. However, I have studied more on this and found some guides in compiling the webrtc library. Looks like scripts are also out-dated and information webrtc website is also scattered on two to three pages and are not in logical order. Next, I am going to follow these guides and see if any required dependency was missing:

https://software.intel.com/en-us/android/articles/webrtc-setup-and-build

http://mohdazharinamdar.blogspot.com/2015/05/building-webrtc-libraries-for-android.html

@jekram
Copy link

jekram commented Feb 7, 2017

@sojharo Both of these are from 2014 and 2015 so I am not sure they would work.

Let's ask this on WebRTC Fourm?

@sojharo
Copy link
Contributor Author

sojharo commented Feb 7, 2017

Yes, I would ask from webrtc forum. The main thing would be to know what is the main dependencies required for building library

@jekram
Copy link

jekram commented Feb 7, 2017

Also, ask Mauz khan

@sojharo
Copy link
Contributor Author

sojharo commented Feb 7, 2017

After a lot of work and careful inspection, I finally understood where the problem is in this. The desktop computer in the office is running behind proxy. Proxy is doing problems in pull the repositories and downloading the files. Tomorrow, I would look into how to fix this proxy issues. However they are very difficult to handle in console operations. Also, I would try to do this at home with linux in virtual machine.

@jekram
Copy link

jekram commented Feb 7, 2017

Sojharo can you not do this on a machine on Digital Ocean.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 7, 2017

I can check on this. As far as I know, when we do SSH into digital ocean and run any script which doesn't run in background then closing the SSH will close that script too. It is not possible to keep the SSH connection alive for such a long time. I can check if it is possible from web terminal of digital ocean.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 9, 2017

The idea of running Ubuntu on virtual machine on macbook and installing webrtc library at home Internet has proved to be useful. It has started to fetch library without any problems. I kept it running all the night and it has taken around 10 hours and still the code is being fetched. Soon, it would be done. In the screenshot, we can see the downloading in progress with elapsed time.

screen shot 2017-02-09 at 7 56 45 am

Hopefully, it would be done before meeting time and I would then go campus.

@jekram
Copy link

jekram commented Feb 9, 2017

Great news. It would continue if there is network glitch. Correct?

@sojharo
Copy link
Contributor Author

sojharo commented Feb 9, 2017

I think yes, because during the night computer had gone to sleep after 3 hours. In the morning when I saw it kept downloading.

@sojharo
Copy link
Contributor Author

sojharo commented Feb 10, 2017

It took another complete day of downloading as Internet glitch didn't start the entire webrtc code downloading from scratch but it started the android tools part downloading from start. After the downloading got complete, it finally showed me license agreement in morning today. Now it is doing setup steps as downloading is complete.

screen shot 2017-02-10 at 7 47 08 am

@jekram
Copy link

jekram commented Feb 10, 2017

ok

@sojharo
Copy link
Contributor Author

sojharo commented Feb 10, 2017

It has completed successfully now I am going to start the compilation and build.

screen shot 2017-02-10 at 9 10 00 am

@jekram
Copy link

jekram commented Feb 10, 2017

Thanks

@sojharo
Copy link
Contributor Author

sojharo commented Feb 10, 2017

i have finally compiled the WebRTC for android library and put the build files on Google Drive on following folder:

https://drive.google.com/drive/u/1/folders/0B1fvrsuLnp7sQkVxN29yeEZOU1k

CloudKibo Shared > WebRTC Builds

I have also saved the virtual machine state so that we won't need to go through such long process next time we build.

@jekram
Copy link

jekram commented Feb 10, 2017

Thanks

@jekram jekram closed this as completed Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants