Comments (15)
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.
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.
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.
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.
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.
from webrtc.
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.
I think he cross compiled OpenSSL using a docker container. Hopefully we can get this added as an example at some point.
from webrtc.
That would be awesome
Interesting to see his code and makefile
from webrtc.
@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.
Hey Max . That's awesome. I will try it out with flutter for android and iOS and feedback my efforts
from webrtc.
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.
A.w.e.s.o.m.e.
from webrtc.
<3
from webrtc.
i tried the latest pion code and use gomobile bind to build android/ios library, it all failed, anyhelp?
from webrtc.
Related Issues (20)
- Trickle ICE not working properly HOT 1
- OnTrack will not be fired HOT 10
- Pion cannot connect with Janus without manually specifying Candidates SDPMid
- Improve pluggability and testability across pion modules though Interfaces HOT 1
- Single Port mode second connect failed HOT 3
- rtp-to-webrtc H264 via gstreamer issue HOT 4
- Sending two separate video streams with rtp-to-webrtc under two different ports HOT 1
- data-channels-detach-create example is missing HOT 1
- Is there any example where the original h264 data can be sent to pion directly at the interface layer? HOT 2
- Go version in mod file too low for webrtc v3 HOT 5
- Generate host candidates with component 1 only when a=rtcp-mux is present HOT 6
- Goroutine leaks when using datachannel with a multi mux with single port HOT 3
- SampleBuilder causes segmentation fault HOT 5
- Ontrack is never be fired on client side neither with pion OnNegotiationNeeded HOT 1
- Test Coverage for Receiving RTXs HOT 1
- Specific port to automatically open? HOT 1
- How do I make Multicasting by one-to-many transmissions HOT 1
- DTLS with webRTC. HOT 1
- Problem/solution: stream disconnects after 30 seconds when remote doesn't support rtcp-rsize HOT 3
- Logs written to stdout when accessing stats on a closed connection peer connection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webrtc.