-
Notifications
You must be signed in to change notification settings - Fork 14
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 initial implementation of craete_offer
, apply_local_description
and add_transceiver
#6
Conversation
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
lib/ex_webrtc/rtp_transceiver.ex
Outdated
{:fingerprint, Keyword.fetch!(config, :fingerprint)}, | ||
{:setup, Keyword.fetch!(config, :setup)}, | ||
:rtcp_mux | ||
] ++ if(Keyword.get(config, :rtcp, false), do: [{"rtcp", "9 IN IP4 0.0.0.0"}], else: []) |
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.
Nitpick but if that's not a big problem I would put this as first attribute.
This way we will have something like this
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
so all address related lines next to each other
lib/ex_webrtc/peer_connection.ex
Outdated
else | ||
for mline <- state.current_remote_desc.media, | ||
{:mid, mid} <- ExSDP.Media.get_attribute(mline, :mid), | ||
{mid, _} <- Integer.parse(mid) 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.
Use String.to_integer
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.
why tho? String.to_integer
might rise and I wanted to avoid that.
lib/ex_webrtc/peer_connection.ex
Outdated
max_mid = Enum.max(crd_mids ++ tsc_mids, &>=/2, fn -> -1 end) + 1 | ||
max(state.next_mid, max_mid + 1) |
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.
Looks like one +1
is not needed
}; | ||
|
||
const mode = "passive" |
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.
Very nice example modification 👍
lib/ex_webrtc/peer_connection.ex
Outdated
@@ -35,7 +41,10 @@ defmodule ExWebRTC.PeerConnection do | |||
:dtls_buffered_packets, | |||
dtls_finished: false, | |||
transceivers: [], | |||
signaling_state: :stable | |||
signaling_state: :stable, | |||
next_mid: 0, |
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.
IMO this can be deleted
No description provided.