-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix no supported codecs scenario #61
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
==========================================
- Coverage 88.85% 88.57% -0.29%
==========================================
Files 25 25
Lines 1059 1068 +9
==========================================
+ Hits 941 946 +5
- Misses 118 122 +4
Continue to review full report in Codecov by Sentry.
|
cdcaf49
to
f373f2d
Compare
.credo.exs
Outdated
@@ -104,7 +104,7 @@ | |||
{Credo.Check.Readability.ParenthesesInCondition, []}, | |||
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, | |||
{Credo.Check.Readability.PipeIntoAnonymousFunctions, []}, | |||
{Credo.Check.Readability.PredicateFunctionNames, []}, | |||
{Credo.Check.Readability.PredicateFunctionNames, [exit_status: 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.
TBH I don't know what we want to do with this but personally I don't think functions like is_supported
is_mandatory
etc are bad. Credo suggests using supported?
and mandatory?
which is imo less readable. See https://hexdocs.pm/credo/Credo.Check.Readability.PredicateFunctionNames.html
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 quite like the something?
convention, I think the question mark makes it quite obvious as to what the function returns and it's an established convention. is_something
, on the other hand, suggests that it can be used in guards, but in reality it cannot.
f373f2d
to
cd90b29
Compare
cd90b29
to
1f2edb0
Compare
.credo.exs
Outdated
@@ -104,7 +104,7 @@ | |||
{Credo.Check.Readability.ParenthesesInCondition, []}, | |||
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, | |||
{Credo.Check.Readability.PipeIntoAnonymousFunctions, []}, | |||
{Credo.Check.Readability.PredicateFunctionNames, []}, | |||
{Credo.Check.Readability.PredicateFunctionNames, [exit_status: 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.
I quite like the something?
convention, I think the question mark makes it quite obvious as to what the function returns and it's an established convention. is_something
, on the other hand, suggests that it can be used in guards, but in reality it cannot.
offered_direction = SDPUtils.get_media_direction(mline) | ||
direction = get_direction(offered_direction, transceiver.direction) | ||
opts = Keyword.put(opts, :direction, direction) |
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.
Was this previously unhandled? How did we handle the sRD(offer)
-> tr.direction=inactive
-> sLD(answer)
scenario then?
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.
The only change is that now, when we reject an mline we also set its direction as inactive
Following Firefox behaviour, when there are no supported codecs in the offer, we will end up with empty transceivers lists on both sides after finishing negotiation.
See w3c/webrtc-pc#2927