-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for remote mdns candidates #13
Conversation
539b2fd
to
e328194
Compare
depends on rosetta-home/mdns#19 |
33d6e03
to
778224c
Compare
lib/ex_libnice.ex
Outdated
state = %{ | ||
state | ||
| mdns_queries: Map.put(state.mdns_queries, address, {candidate, stream_id, component_id}) | ||
} |
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.
use put_in
lib/ex_libnice.ex
Outdated
|
||
state = | ||
case Map.pop(state.mdns_queries, dev.domain) 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.
state = | |
case Map.pop(state.mdns_queries, dev.domain) do | |
{query, state} = pop_in(state, [:mdns_queries, dev.domain]) | |
case query do |
lib/ex_libnice.ex
Outdated
| mdns_queries: Map.put(state.mdns_queries, address, {candidate, stream_id, component_id}) | ||
} | ||
|
||
state = Struct.put_in(state, [:mdns_queries, address], {candidate, stream_id, component_id}) |
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.
better use Bunch.Access
in the state
lib/ex_libnice.ex
Outdated
withl address_error: address when address != nil <- Enum.at(candidate_sp, 4), | ||
parse_error: 6 <- length(candidate_sp), | ||
not_mdns: true <- String.ends_with?(address, ".local") 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.
withl address_error: address when address != nil <- Enum.at(candidate_sp, 4), | |
parse_error: 6 <- length(candidate_sp), | |
not_mdns: true <- String.ends_with?(address, ".local") do | |
withl candidate_check: 6 <- length(candidate_sp), | |
do: address = Enum.at(candidate_sp, 4), | |
mdns_check: true <- String.ends_with?(address, ".local") do |
lib/ex_libnice.ex
Outdated
address_error: _ -> {:reply, {:error, :failed_to_parse_sdp_string}, state} | ||
parse_error: _ -> {:reply, {:error, :failed_to_parse_sdp_string}, state} | ||
not_mdns: _ -> do_set_remote_candidate(candidate, stream_id, component_id, state) |
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.
address_error: _ -> {:reply, {:error, :failed_to_parse_sdp_string}, state} | |
parse_error: _ -> {:reply, {:error, :failed_to_parse_sdp_string}, state} | |
not_mdns: _ -> do_set_remote_candidate(candidate, stream_id, component_id, state) | |
candidate_check: _ -> {:reply, {:error, :failed_to_parse_sdp_string}, state} | |
mdns_check: false -> do_set_remote_candidate(candidate, stream_id, component_id, state) |
related with membraneframework/membrane_demo#75