webrtc: update README with section on embedded signalling / web services

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1671>
This commit is contained in:
Mathieu Duponchelle 2024-07-23 20:25:01 +02:00
parent 9455e09d9f
commit 64f0b76f71

View file

@ -80,7 +80,26 @@ it might expose more interfaces to guide and tune the heuristics it employs.
cargo build cargo build
``` ```
## Usage ## Usage (embedded services)
`webrtcsink` can optionally instantiate a signalling server and a web server.
This is the simplest set up for testing, but may not always be desirable.
For instance one may prefer hosting the services on different machines, or would
prefer that a crash from the host webrtcsink doesn't take down signalling / websites.
Head over to the following section if you want to learn how to run services individually.
In the terminal, from the root of the `net/webrtc` crate:
```
gst-launch-1.0 videotestsrc ! webrtcsink run-signalling-server=true run-web-server=true
```
In your browser of choice, navigate to <http://127.0.0.1:8080/>, and click on the stream
identifier under "Remote streams". You should see a test video stream and hear a test tone.
## Usage (standalone services)
Open three terminals. In the first one, run the signalling server: Open three terminals. In the first one, run the signalling server: