Skip to content

Add "required" annotation to params #11

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

Merged
merged 2 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/live_ex_webrtc/player.ex
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ defmodule LiveExWebRTC.Player do
Created struct is saved in socket's assigns and has to be passed to `LiveExWebRTC.Player.live_render/1`.

Options:
* `id` - player id. This is typically your user id (if there is users database).
* `id` [**required**] - player id. This is typically your user id (if there is users database).
It is used to identify live view and generated HTML video player.
* `publisher_id` - publisher id that this player is going to subscribe to.
* `publisher_id` [**required**] - publisher id that this player is going to subscribe to.
* `pubsub` [**required**] - a pubsub that player live view will use for receiving audio and video packets. See module doc for more info.
* `on_connected` - callback called when the underlying peer connection changes its state to the `:connected`. See `t:on_connected/0`.
* `on_packet` - callback called for each audio and video RTP packet. Can be used to modify the packet before sending via WebRTC to the other side. See `t:on_packet/0`.
* `ice_servers` - a list of `t:ExWebRTC.PeerConnection.Configuration.ice_server/0`,
Expand Down
4 changes: 2 additions & 2 deletions lib/live_ex_webrtc/publisher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ defmodule LiveExWebRTC.Publisher do
Created struct is saved in socket's assigns and has to be passed to `LiveExWebRTC.Publisher.live_render/1`.

Options:
* `id` - publisher id. This is typically your user id (if there is users database).
* `id` [**required**] - publisher id. This is typically your user id (if there is users database).
It is used to identify live view and generated HTML elements.
* `pubsub` - a pubsub that publisher live view will use for broadcasting audio and video packets received from a browser. See module doc for more info.
* `pubsub` [**required**] - a pubsub that publisher live view will use for broadcasting audio and video packets received from a browser. See module doc for more info.
* `recordings?` - whether to allow for recordings or not. Defaults to true.
See module doc and `t:on_disconnected/0` for more info.
* `recorder_opts` - a list of options that will be passed to the recorder. In particular, they can contain S3 config where recordings will be uploaded. See `t:ExWebRTC.Recorder.option/0` for more.
Expand Down