-
Couldn't load subscription status.
- Fork 1.8k
Add simple datachannel example with demo.html #3252
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3252 +/- ##
=======================================
Coverage 82.68% 82.69%
=======================================
Files 80 80
Lines 11196 11196
=======================================
+ Hits 9257 9258 +1
- Misses 1514 1516 +2
+ Partials 425 422 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hm, what's the difference between this and https://github.com/pion/webrtc/tree/master/examples/data-channels ? |
The proposed simple-datachannels automatically performs the handshake which hides the handshake which the user would otherwise have to manually perform. I think I updated that example as this one was being written, but I'm not opposed to this being added to show how the handshake can be automated, although maybe this one can have more comments in the code to distinguish itself from the original datachannels example. Just a suggestion, but unsure if there's more to this PR atm. |
|
@philipch07 I think that we need some sort of either example or tutorial showing how to setup a signaling server. It's probably the one things I've struggled with when it comes to WebRTC. Granted, we now have the WHIP/WHEP standard, but that doesn't really apply to datachannel applications. It's why in the https://github.com/pion/example-webrtc-applications/tree/master/ebiten-game example, I included a sample signaling server I wrote for the game (though I don't think the code in it is very good) |
|
@philipch07 @ValorZard I feel like this example solves another problem of providing an easy to use example for datachannels for new users. WHIP and WHEP would be cool but datachannels aren't standard too. I think we can add as much examples as we can to make things easier. |
I'll see if I can take a look into learning about the signaling server if an example is needed for it.
That's fair, it is a bit of a simpler example for datachannels which the name implies. I did have an issue with the example: I followed the instructions as I checked out the branch and ran it in VSC connected to WSL. When I opened the page in Firefox it wasn't connecting to the channel, but when I used the "simple browser" inside VSC it was fine. I'm what was causing that issue, since every time I opened the page in Firefox it was showing the ICE candidates in my terminal but it would never connect. |
|
@philipch07 It just needs to gather and send the ICE candidates, which is what i was going to do before merging it and fix the lint, I think the talk here is about the idea of adding a simple / just work. I think we should merge @Sundenis example is a good idea. What do you think? |
|
Oops yeah, sorry I was thinking a little out of scope. This pr sounds good to me! |
|
@ValorZard Are you okay with merging this after some fixes? |
|
@JoeTurki yeah sure, I'm just more so thinking about like, maybe adding some sort of example for signaling servers specifically in a later PR maybe |
|
@ValorZard That will be cool btw no pressure but if you can move your whep-like example from being a draft we should merge it. |
|
@Sundenis hello I fixed the lint issues, and the ICE issue. Merging this now. |
9a22b74 to
2c80f4a
Compare
|
Also i renamed the example directory to data-channels-simple so it's sortable with other examples. |
This PR adds a new simple -datachannel example to help newcomers understand how to create and test a basic WebRTC DataChannel using Go and a static HTML page (demo.html).