Skip to content
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

Make DataChannel support optional #163

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ def deps do
end
```

Elixir WebRTC comes with optional support for DataChannels, but it must be explicitely turned on by
adding optional `ex_sctp` dependency

```elixir
def deps do
[
{:ex_webrtc, "~> 0.4.1"},
{:ex_sctp, "~> 0.1.0"}
]
end
```

Please note that `ex_sctp` requires you to have Rust installed in order to compile.

## Getting started

To get started with Elixir WebRTC, check out:
Expand Down
2 changes: 1 addition & 1 deletion lib/ex_webrtc/peer_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ defmodule ExWebRTC.PeerConnection do
end

defp dc_negotiation_needed?(state) do
first_channel = map_size(state.sctp_transport.channels) == 1
first_channel = SCTPTransport.channel_count(state.sctp_transport) == 1

has_channels =
case state.current_local_desc do
Expand Down
Loading