elixir-webrtc / ex_webrtc

An Elixir implementation of the W3C WebRTC API
Apache License 2.0
269 stars 8 forks source link

Fix issue with rejecting non-matching FMTP #67

Closed LVala closed 4 months ago

LVala commented 4 months ago

As of now, when negotiation a codec, the fmtp attribute must much exactly, which might be an issue. This PR makes it possible to accept codecs with fmtp that does not match exactly to what's allowed in video_codecs or audio_codecs.

This PR also adds some very minor improvements in the examples.

codecov[bot] commented 4 months ago

Codecov Report

Merging #67 (9de31f7) into master (8e3992e) will increase coverage by 88.75%. Report is 1 commits behind head on master. The diff coverage is 97.69%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #67 +/- ## =========================================== + Coverage 0 88.75% +88.75% =========================================== Files 0 28 +28 Lines 0 1183 +1183 =========================================== + Hits 0 1050 +1050 - Misses 0 133 +133 ``` | [Files](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc) | Coverage Δ | | |---|---|---| | [lib/ex\_webrtc/app.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9hcHAuZXg=) | `100.00% <100.00%> (ø)` | | | [lib/ex\_webrtc/dtls\_transport.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9kdGxzX3RyYW5zcG9ydC5leA==) | `84.82% <100.00%> (ø)` | | | [lib/ex\_webrtc/ice\_transport.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9pY2VfdHJhbnNwb3J0LmV4) | `81.81% <100.00%> (ø)` | | | [lib/ex\_webrtc/peer\_connection/configuration.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9wZWVyX2Nvbm5lY3Rpb24vY29uZmlndXJhdGlvbi5leA==) | `88.13% <100.00%> (ø)` | | | [lib/ex\_webrtc/rtp\_receiver.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9ydHBfcmVjZWl2ZXIuZXg=) | `100.00% <100.00%> (ø)` | | | [lib/ex\_webrtc/rtp\_sender.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9ydHBfc2VuZGVyLmV4) | `100.00% <100.00%> (ø)` | | | [lib/ex\_webrtc/utils.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy91dGlscy5leA==) | `100.00% <100.00%> (ø)` | | | [lib/ex\_webrtc/peer\_connection.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9wZWVyX2Nvbm5lY3Rpb24uZXg=) | `88.57% <95.38%> (ø)` | | ... and [20 files with indirect coverage changes](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc). Last update [57d04fc...9de31f7](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/67?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc).