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

[RTC-308] Make simulcast configurable #68

Merged
merged 2 commits into from Aug 11, 2023

Conversation

sgfn
Copy link
Member

@sgfn sgfn commented Aug 10, 2023

@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #68 (2271cdc) into main (e2fdff7) will decrease coverage by 0.43%.
The diff coverage is 84.37%.

@@            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     
Files Changed Coverage Δ
lib/jellyfish/peer.ex 85.71% <50.00%> (-14.29%) ⬇️
lib/jellyfish/peer/webrtc.ex 46.42% <80.00%> (+0.27%) ⬆️
lib/jellyfish/room.ex 83.03% <88.88%> (-0.90%) ⬇️
lib/jellyfish_web/api_spec/peer.ex 100.00% <100.00%> (ø)
lib/jellyfish_web/api_spec/peer/webrtc.ex 100.00% <100.00%> (ø)
.../jellyfish_web/controllers/component_controller.ex 100.00% <100.00%> (ø)
lib/jellyfish_web/controllers/peer_controller.ex 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2fdff7...2271cdc. Read the comment docs.

@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) ::
Copy link
Member

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

Copy link
Member Author

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 ¯_(ツ)_/¯

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def add_peer(room_id, peer_type, options) do
def add_peer(room_id, peer_type, options \\ %{}) do

network_options: state.network_options,
video_codec: state.config.video_codec
},
if(is_nil(options), do: %{}, else: options)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(is_nil(options), do: %{}, else: options)
options

@sgfn sgfn force-pushed the sgfn/RTC-308-configurable-simulcast branch from e520ffc to 2271cdc Compare August 11, 2023 13:01
@sgfn sgfn merged commit a69d1fc into main Aug 11, 2023
6 checks passed
@sgfn sgfn deleted the sgfn/RTC-308-configurable-simulcast branch August 11, 2023 13:07
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.

None yet

2 participants