Skip to content

Conversation

Azarattum
Copy link

@Azarattum Azarattum commented Jun 27, 2025

Currently data channels created on any end are simply ignored and not forwarded to other peers. This PR establishes data channels that are properly broadcasted from streamer to all the viewers and back.

@Sean-Der
Copy link
Collaborator

This is fantastic! Thank you so much for the PR.

I am going to add a simple test and merge it now :)

@Sean-Der
Copy link
Collaborator

@Azarattum How important do you think supporting multiple DataChannels is?

This could be a lot simpler if each side could open one DataChannel.

Publishers <-> Subscribers could push messages. If a publisher (or subscriber) hasn't opened a DataChannel the message doesn't get delivered.

What do you think? I love adding DataChannel support. I just want to see if I can lower the amount of code, but enable you to build the thing you care about :)

@Azarattum
Copy link
Author

@Sean-Der, I think broadcast-box should be as transparent as possible. So that it could be a drop-in replacement for an implementation that works with direct streaming. And since WebRTC API in browsers supports multiple data channels, I think it would be more appropriate to support them here too. It means that apps written for direct WebRTC streaming could work seamlessly with broadcast-box.

@Sean-Der
Copy link
Collaborator

@Azarattum Unfortunately Broadcast Box isn't really a drop in replacement for direct streaming today. It only supports 1 audio and 1 video track. It also supports Simulcast (which you can't do with direct streaming)

I am really excited about DataChannel support and want to add it. However I think it would be better to only support one. It simplifies the code, and we can still build all the same exact stuff with it.

@Sean-Der
Copy link
Collaborator

Sorry I accidentally closed the PR :( mind re-opening? I was fixing up stuff and pushing to your repo.

@Azarattum
Copy link
Author

@Sean-Der, no problem. Reopened at #385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants