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
[RTC-308] Make simulcast configurable #68
Conversation
Codecov Report
@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 84.02% 83.59% -0.43%
==========================================
Files 35 36 +1
Lines 507 512 +5
==========================================
+ Hits 426 428 +2
- Misses 81 84 +3
Continue to review full report in Codecov by Sentry.
|
lib/jellyfish/room.ex
Outdated
@spec add_peer(id(), Peer.peer()) :: {:ok, Peer.t()} | {:error, :reached_peers_limit} | ||
def add_peer(room_id, peer_type) do | ||
GenServer.call(registry_id(room_id), {:add_peer, peer_type}) | ||
@spec add_peer(id(), Peer.peer(), map() | nil) :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering, whether the options
shouldn't have a defined type instead of just map
.
I'm not saying that we necessarily need this new type tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be, but I think I'll leave it as-is ¯_(ツ)_/¯
lib/jellyfish/room.ex
Outdated
GenServer.call(registry_id(room_id), {:add_peer, peer_type}) | ||
@spec add_peer(id(), Peer.peer(), map() | nil) :: | ||
{:ok, Peer.t()} | :error | {:error, :reached_peers_limit} | ||
def add_peer(room_id, peer_type, options) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def add_peer(room_id, peer_type, options) do | |
def add_peer(room_id, peer_type, options \\ %{}) do |
lib/jellyfish/room.ex
Outdated
network_options: state.network_options, | ||
video_codec: state.config.video_codec | ||
}, | ||
if(is_nil(options), do: %{}, else: options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(is_nil(options), do: %{}, else: options) | |
options |
e520ffc
to
2271cdc
Compare
ref: