-
Notifications
You must be signed in to change notification settings - Fork 25
Update config on receiving remote SDP #37
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
Conversation
aee5f67 to
65f6b88
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #37 +/- ##
==========================================
+ Coverage 86.72% 87.34% +0.61%
==========================================
Files 14 14
Lines 633 664 +31
==========================================
+ Hits 549 580 +31
Misses 84 84
Continue to review full report in Codecov by Sentry.
|
0fd7395 to
6866f25
Compare
| @spec get_extensions(ExSDP.t()) :: %{(id :: non_neg_integer()) => extension() | :unknown} | ||
| @spec get_extensions(ExSDP.t()) :: [Extmap.t()] | ||
| def get_extensions(sdp) do | ||
| # we assume that, if extension is present in multiple mlines, the IDs are the same (RFC 8285) | ||
| sdp.media | ||
| |> Enum.flat_map(&ExSDP.Media.get_attributes(&1, :extmap)) | ||
| |> Map.new(fn extmap -> | ||
| # TODO: handle direction and extension attributes | ||
| ext = urn_to_extension(extmap.uri) | ||
| {extmap.id, ext} |
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 changed the implementation as:
- now I can reuse
get_extensionsin Configuration - for now it seems to be good enough to operate on
ExSDP.Attribute.Extmapinstead of{Extension.SourceDescription, :mid/:cname}.
3577bf1 to
9cdab00
Compare
696e227 to
5242870
Compare
A couple of things still won't work e.g.:
but I think this is good enough improvement to be merged