Skip to content

Commit 3df7475

Browse files
authored
Merge pull request #11 from elixir-webrtc/brzep/docs-add-required
Add "required" annotation to params
2 parents 4a4e50f + b3c4e0b commit 3df7475

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/live_ex_webrtc/player.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ defmodule LiveExWebRTC.Player do
141141
Created struct is saved in socket's assigns and has to be passed to `LiveExWebRTC.Player.live_render/1`.
142142
143143
Options:
144-
* `id` - player id. This is typically your user id (if there is users database).
144+
* `id` [**required**] - player id. This is typically your user id (if there is users database).
145145
It is used to identify live view and generated HTML video player.
146-
* `publisher_id` - publisher id that this player is going to subscribe to.
146+
* `publisher_id` [**required**] - publisher id that this player is going to subscribe to.
147+
* `pubsub` [**required**] - a pubsub that player live view will use for receiving audio and video packets. See module doc for more info.
147148
* `on_connected` - callback called when the underlying peer connection changes its state to the `:connected`. See `t:on_connected/0`.
148149
* `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`.
149150
* `ice_servers` - a list of `t:ExWebRTC.PeerConnection.Configuration.ice_server/0`,

lib/live_ex_webrtc/publisher.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ defmodule LiveExWebRTC.Publisher do
191191
Created struct is saved in socket's assigns and has to be passed to `LiveExWebRTC.Publisher.live_render/1`.
192192
193193
Options:
194-
* `id` - publisher id. This is typically your user id (if there is users database).
194+
* `id` [**required**] - publisher id. This is typically your user id (if there is users database).
195195
It is used to identify live view and generated HTML elements.
196-
* `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.
196+
* `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.
197197
* `recordings?` - whether to allow for recordings or not. Defaults to true.
198198
See module doc and `t:on_disconnected/0` for more info.
199199
* `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.

0 commit comments

Comments
 (0)