Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Phoenix integration: WebRTC video component #164

zachallaun started this conversation in Ideas
Discussion options

Hey all -- really cool project here!

I was wondering if there were any plans to package the client-side setup into a built-in video component and hook. For instance, the Broadcaster app uses this custom hook and I wonder if an ex_webrtc_phoenix could be published that basically packages all that up so that someone could build a basic WebRTC integration while writing essentially no JavaScript.

While I admit to having not dug too deeply into the code, it looks like most of the assumed variables in the hook (like the ICE servers, WHEP endpoint, etc.) could be passed as attributes.

This would have the side-benefit of potentially making the Broadcaster app example a bit slicker as the JS would be abstracted away, and LiveView streams could even be used for the chat instead of channels + DOM mutation 🙂

You must be logged in to vote

Replies: 3 comments 7 replies

Comment options

That's a cool idea (we thought of something similar at some point too, albeit its unrelated to the WebRTC implementation itself, so it landed in a drawer) - it might be worth tackling @mickel8

You must be logged in to vote
1 reply
Comment options

Yeah, I don't think it's something that belongs in ex_webrtc, but an ex_webrtc_phoenix would fit the bill!

Comment options

That would be awesome! Personally, I would love someone who knows LiveView better to implement this. I can help with explaining WebRTC. If not, I will try to create some PoC :)

You must be logged in to vote
4 replies
Comment options

I unfortunately don't have the bandwidth to commit to that, but if I find some time to play around, I'll drop a note here and share anything I come up with!

Comment options

Sure! Even references or examples that we could take a look at would be helpful. Just to know where to start

Comment options

Very generally, LiveToast is a small, really well-designed library that replaces the default Phoenix Flash system. It's a good example for how to package components and hooks for reuse.

Comment options

Perfect! Thank you, that's all I need :)

Comment options

You must be logged in to vote
2 replies
Comment options

Awesome! I'll give this a try tomorrow!

Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /