-
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
Improve the structs in the API, add docs #104
Conversation
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.
Coool 👍
lib/ex_webrtc/peer_connection.ex
Outdated
""" | ||
@type signaling_state() :: :stable | :have_local_offer | :have_remote_offer | ||
|
||
@typedoc """ | ||
Possible PeerConnection states. | ||
Messages sent by the the `ExWebRTC.PeerConnection` process to its controlling process. |
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.
Messages sent by the the `ExWebRTC.PeerConnection` process to its controlling process. | |
Messages sent by the `ExWebRTC.PeerConnection` process to its controlling process. |
lib/ex_webrtc/peer_connection.ex
Outdated
) :: {:ok, RTPTransceiver.t()} | ||
def add_transceiver(peer_connection, kind_or_track, options \\ []) do | ||
GenServer.call(peer_connection, {:add_transceiver, kind_or_track, options}) | ||
end | ||
|
||
@doc """ | ||
Sets the direction of transceiver specified by the `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.
Take a look at other functions too
Sets the direction of transceiver specified by the `id`. | |
Sets the direction of transceiver specified by the `transceiver_id`. |
lib/ex_webrtc/peer_connection.ex
Outdated
|
||
See [RTCStatsReport](https://www.w3.org/TR/webrtc/#rtcstatsreport-object) for the output structure. | ||
This function kills the PeerConnection process. |
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.
This function kills the PeerConnection process. | |
This function kills the `ExWebRTC.PeerConnection` process. |
Records incoming RTP Packet. | ||
`time` parameter accepts output of `System.monotonic_time()` as a value. | ||
""" | ||
# `time` parameter accepts output of `System.monotonic_time()` as a value. |
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 the previous docs could stay
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'd say to leave as a comment and in general use comments for developer information and docs for public stuff? The only useful thing I could think off was that the LSP would provide the doc info even when function is private, but it doesn't seem to be the case.
EDIT: nvm, LSP does provide this info (which is actually useful), so I'll leave it as a doc
.
This function can be called only if at least one packet has been recorded, | ||
otherwise it will raise. | ||
""" | ||
# `time` parameter accepts output of `System.os_time(:native)` as a value (UNIX timestamp in :native units). |
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.
As above
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 87.20% 86.46% -0.75%
==========================================
Files 33 33
Lines 1626 1655 +29
==========================================
+ Hits 1418 1431 +13
- Misses 208 224 +16
Continue to review full report in Codecov by Sentry.
|
This PR:
RTPTransceiver
,RTPSender
andRTPReceiver
structs (like the "recorder..." modules)PeerConnection
(for the various states)