Show HN: Pion/handoff – Move WebRTC out of browser and into Go (github.com)

by Sean-Der 17 comments 101 points
Read article View on HN

17 comments

[−] Sean-Der 38d ago
I wrote this to make Reverse Engineering WebRTC services easier. Will also let you save/send arbitrary media from WebRTC sessions. The idea is you do all your auth/interaction in the browser, but then do all WebRTC in Go. So you have lots more control. More to do with it, but it is far enough along to share at least.

In the README is an screenshot of sending my webcam, but replacing outgoing video with a ffmpeg testsrc. Handoff sits between so it can replace with any arbitrary video.

[−] czbond 38d ago
Interesting and novel project. I don't have anything constructive to add, but well done.
[−] Sean-Der 38d ago
Thanks :)

No better feeling to work on something and hear it is novel! So many projects that I think will be useful miss the mark.

[−] irq-1 38d ago
Connect it to an AI talking head and you have a customer service center - users browsing a store can click to talk with 'someone'.
[−] ikety 38d ago
I've bookmarked your project years ago to attempt implementing webrtc fully in a niche programming language. But I think I may have vastly underrated how difficult this is.

Have you come across https://github.com/elixir-webrtc/ex_webrtc ?

Wasn't sure if they used Pion as a guide

[−] Sean-Der 38d ago
What language? Would love to help :) especially with AI Coding I think it would be a lot more accessible these days.

ex_webrtc is super cool. They have a cool built-in dashboard/analytics flow. It is way more 'operations friendly' then Pion it seems. I haven't used it heavily myself though.

[−] ericmcer 38d ago
I am kind of a WebRTC noob but... this means after I define my input channel (audio track, video, etc.) and establish a peer connection I can send data from a different source?

Are there any complications with that or is it kind of on me to not confuse the other peer by sending unexpected formats?

[−] Hakkin 38d ago
Oh, this is interesting. I have been messing around with a WebExtension for dumping encoded WebRTC media streams by intercepting streams on RTCPeerConnection.addTrack, but it doesn't work reliably since the current WebRTC encoded stream API(s) only supports a single reader, so if the actual website is also using the API, it either breaks the site or it's impossible to intercept the media. This seems like a nice workaround, I had briefly considered some kind of proxy but I wrote it off since WebRTC traffic is encrypted, I never considered proxying the peer connection API calls themselves. Pretty clever.
[−] hparadiz 38d ago
Would be interesting for a Wayland DM to catch this and draw to a picture in picture overlay
[−] esafak 38d ago
Is this a good way to improve performance (frame rate, latency, CPU load) ?