Giter VIP home page Giter VIP logo

Comments (15)

Sean-Der avatar Sean-Der commented on May 21, 2024 11

Just to update anyone watching, great news in Slack today! Max was able to get pion-WebRTC working on Android (and will be doing iOS as well)

I am not involved in the work, but sounds very promising :)

from webrtc.

chertov avatar chertov commented on May 21, 2024 5

Hi, i am Max
To build pions with go-mobile is very simple!
I have two scripts for this. https://github.com/chertov/pions_gomobile
I'm using prebuild openssl binary from here https://www.teskalabs.com/blog/openssl-binary-distribution-for-developers-static-library
but you can build openssl from source if you want!
I don't know how to build universal aar library for all android platforms.
I linked armeabi-v7a binary in my script, it works on my old samsung galaxy S4!

I hope to see pure golang dtls implementation in pions!
But we have no problem with native openssl on mobile platforms!)

from webrtc.

chrisprobst avatar chrisprobst commented on May 21, 2024

How could one start working on this issue? I guess the openssl lib has to be cross compiled for ARM so that the C files link to correct library. Do you have a hint for how to start ? I'm on macOS and everything works beside the gomobile build process due to an missing import:

could not import github.com/pions/webrtc/internal/dtls (type-checking package "github.com/chunkedswarm/go-chunkedswarm/vendor/github.com/pions/webrtc/internal/dtls" failed (/Users/chrisprobst/dev/go/src/github.com/chunkedswarm/go-chunkedswarm/vendor/github.com/pions/webrtc/internal/dtls/dtls.go:66:15: undeclared name: _Ctype_struct_tlscfg)))))))

from webrtc.

 avatar commented on May 21, 2024

The only option is to split the codebase and use a c lib and wrap it.
This woudl mean that you need to be able to swap out what DTLS lib you use depending if your on desktop versus mobile.

This is ALL of course until a pure golang DTLS lib is sturdy enough. But this is the world we live in for now.

SO a very brief search came up with:

https://github.com/sics-iot/tinydtls-standalone
I found tindtls via the COAP page ( which also needs dtls ) here: http://coap.technology/impls.html
So this becomes an architecture similar to what happened with sqlite or rocksdb.

from webrtc.

backkem avatar backkem commented on May 21, 2024

We're going to focus on getting connections between two pions clients working for now. Afterwards we'll look into this. We intend to estimate the difference in effort between compiling the current version on ARM and porting DTLS to pure go. If the difference is minimal we'll likely pursue the latter since it is our goal to avoid the CGO dependency anyway.

from webrtc.

 avatar commented on May 21, 2024

from webrtc.

topfs2 avatar topfs2 commented on May 21, 2024

How did he achieve it? did he port the C parts to pure golang?
Mostly asking since I wanted to use this and cross compile to arm (synology), but got into issues with ssl. I got it to work on raspberry pi with ubuntu mate (without cross compile) but could not move that to another arm os (since it was missing ssl-dev)

Anyways, awesome work, the project seems to be real nice and would love to see it in pure golang, then it would be the only webrtc implementation that seems to be easily portable :)

from webrtc.

backkem avatar backkem commented on May 21, 2024

I think he cross compiled OpenSSL using a docker container. Hopefully we can get this added as an example at some point.

from webrtc.

 avatar commented on May 21, 2024

That would be awesome
Interesting to see his code and makefile

from webrtc.

 avatar commented on May 21, 2024

@backkem yes i am pretty sure this is what he did. On android you can build as a shared lib and on IOS as an archive and then use it

from webrtc.

 avatar commented on May 21, 2024

Hey Max . That's awesome. I will try it out with flutter for android and iOS and feedback my efforts

from webrtc.

Sean-Der avatar Sean-Der commented on May 21, 2024

We now have a 100% Go (no OpenSSL dependency) version of pion-WebRTC

Me and @backkem just got our DTLS branch to the point it is ready to be tested. You can try it out here I would really appreciate of people could test it out.

I am going to close this issue since I am assuming since we are 100% Go we no longer need special instructions. Feel free to re-open if there is something that we still need for mobile users, thanks!

from webrtc.

chrisprobst avatar chrisprobst commented on May 21, 2024

A.w.e.s.o.m.e.

from webrtc.

vmwsree avatar vmwsree commented on May 21, 2024

<3

from webrtc.

shushenghong avatar shushenghong commented on May 21, 2024

i tried the latest pion code and use gomobile bind to build android/ios library, it all failed, anyhelp?

from webrtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.