Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
murat-dogan committed Dec 30, 2021
1 parent 2087bc7 commit 009379b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ setTimeout(() => {
nodeDataChannel.cleanup();
}, 10 * 1000);
```

> Please check examples/media folder for media usage example
## Install

Prebuilt binaries are available (Node Version >= 10);
Expand Down
26 changes: 24 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* It uses same logic of [libdatachannel/examples/client](https://github.com/paullouisageneau/libdatachannel/tree/master/examples) project.
* Contains an equivalent implementation for a node.js signaling server

## How to Use?
### How to Use?
* Prepare Project
* cd examples/client-server
* npm i
Expand All @@ -18,4 +18,26 @@
* node client.js
* Enter answerer ID

> You can also use [libdatachannel/examples/client](https://github.com/paullouisageneau/libdatachannel/tree/master/examples) project's client & signaling server
> You can also use [libdatachannel/examples/client](https://github.com/paullouisageneau/libdatachannel/tree/master/examples) project's client & signaling server

## media

### Example Webcam from Browser to Port 5000
This is an example copy/paste demo to send your webcam from your browser and out port 5000 through the demo application.

### How to use
Open main.html in your browser (you must open it either as HTTPS or as a domain of http://localhost).

Start the application and copy it's offer into the text box of the web page.

Copy the answer of the webpage back into the application.

You will now see RTP traffic on `localhost:5000` of the computer that the application is running on.

Use the following gstreamer demo pipeline to display the traffic
(you might need to wave your hand in front of your camera to force an I-frame).

```
$ gst-launch-1.0 udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp" ! queue ! rtph264depay ! video/x-h264,stream-format=byte-stream ! queue ! avdec_h264 ! queue ! autovideosink
```

0 comments on commit 009379b

Please sign in to comment.