diff --git a/examples/broadcast/README.md b/examples/broadcast/README.md
index f9544b38acc..570b0a2fc00 100644
--- a/examples/broadcast/README.md
+++ b/examples/broadcast/README.md
@@ -1,20 +1,28 @@
# broadcast
+
broadcast is a Pion WebRTC application that demonstrates how to broadcast a video to many peers, while only requiring the broadcaster to upload once.
This could serve as the building block to building conferencing software, and other applications where publishers are bandwidth constrained.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fbroadcast%2Fdrawio)
+
## Instructions
+
### Download broadcast
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/broadcast
```
### Open broadcast example page
+
[jsfiddle.net](https://jsfiddle.net/1jc4go7v/) You should see two buttons 'Publish a Broadcast' and 'Join a Broadcast'
### Run Broadcast
+
#### Linux/macOS
+
Run `broadcast` OR run `main.go` in `github.com/pion/webrtc/examples/broadcast`
### Start a publisher
@@ -27,6 +35,7 @@ Run `broadcast` OR run `main.go` in `github.com/pion/webrtc/examples/broadcast`
* The connection state will be printed in the terminal and under `logs` in the browser.
### Join the broadcast
+
* Click `Join a Broadcast`
* Copy the string in the first input labelled `Browser base64 Session Description`
* Run `curl localhost:8080/sdp -d "$BROWSER_OFFER"`. `$BROWSER_OFFER` is the value you copied in the last step.
diff --git a/examples/broadcast/drawio b/examples/broadcast/drawio
new file mode 100644
index 00000000000..3f390de6d8e
--- /dev/null
+++ b/examples/broadcast/drawio
@@ -0,0 +1 @@
+7V1bk6I4FP41Vs0+aEHC9bEvM7M1NZeecnZ35hEhKjVobMBue379JtyEJCqKBLG7u6qVgBG+75yTc4MewLvF5mPorOZfsIeCAVC8zQDeDwAAlmmQFzryko6oKshGZqHvZWPbgbH/B2WDSja69j0UVQ6MMQ5if1UddPFyidy4MuaEIX6uHjbFQfVbV84McQNj1wn40f98L56noxYwt+N/I382z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1nqT0Vv4qsahBe6Qa9vbHqDKa3/lyfDVs/8Q6YCZuW7f5NNjl9X80zLcYbC+zKYjmJbt8fALsIvs/zpt4tDrP+oIad7e+2cH65qpg9Nx20GSXwrbt4JU0vV6wKAk8Wc0WC8HR0iRwuQ/N3bJAQT6of/VZdY1lqOOkOuRj4aIGmNRdh0lTx5B4RATTYRiver8kM7d7GAAKH4YpoqG1RbnTewu7zX/lon0w/5WKane2uyo11vYRqseaamYmyM/UtmHeU/h/8j2EU+VfRi4igIV913hogtGO3GVnTVyQj35eY3sdT434EV1SqdlzP96VtcWwt90qIuylroN8DHKFSQEWdtG9OHJh5+vzfbsFtWHGukKIqsi8S0fISD7xlTZDsniLHu4hF+8aBWimreQYb/wUH/vUxpXBGX3zDISDvrnWaW0asI8QVNjbIuq65pB9EnrdR34QWUj6RPLDVvSAaPcpD9m8cHYJO9M73CVW/5sIeZOeQs1AgWxu/7NJevj2H8TA9/8D
\ No newline at end of file
diff --git a/examples/custom-logger/README.md b/examples/custom-logger/README.md
index ad55c94bfc9..b150602eb85 100644
--- a/examples/custom-logger/README.md
+++ b/examples/custom-logger/README.md
@@ -1,17 +1,22 @@
# custom-logger
+
custom-logger is an example of how the Pion API provides an customizable
logging API. By default all Pion projects log to stdout, but we also allow
users to override this and process messages however they want.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fcustom-logger%2Fdrawio)
+
## Instructions
+
### Download custom-logger
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/custom-logger
```
### Run custom-logger
-`custom-logger`
+`custom-logger`
You should see messages from our customLogger, as two PeerConnections start a session
diff --git a/examples/custom-logger/drawio b/examples/custom-logger/drawio
new file mode 100644
index 00000000000..b391b0bfc01
--- /dev/null
+++ b/examples/custom-logger/drawio
@@ -0,0 +1 @@
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qZW/qcMT5vPDZTKYuyzTJcfYu9S+bWBzlwnG3KOPmam1lRH1x/fzuFgXaGU8rw7r/0xJQNXWjg4m4V7Em1FZUtQjDe5poq8G0swxeTeci+dYII9HCuvqW8B2UJuYKpAdo0J2O0m9we5bwnVq6EA2ekyelXstUCOwoyiBJHsvfmjqrRSLCm4Xfob84hFtmJxDW6qp5t3RSafcdumwko6XeMx5cD9keOdNMcTUzMHOMfleGKyKA105hzPlJOFjxyvcaCVSSt8bG2+nThZSw58Ejcf+5U9bpvRcnkSHYGcQ7YshbHqdLMjM7UMif5fL6eXfKEqpz9XIB0tw4E1+oM8xRPnceCPBuNp2pdRz5fmtd98NIRJEAabJOe2Qa9T6irHB3p3oA+Tr0u6+Ez839PlLHsavMT9leLNjDqd9BcZxXE/wrNZnjdqMA2vAH8JbAUlW/Gva6pq+bzLQlaJv6z0EsZcKDgsa2SwkPX3vHFnVc0f7XMPK661rlqrkH6v7siOfzRDsFZzUd6orlFGJKW9FKHgdaUs3PwOR11s8V1s6VHn16YkJdk7LRXWrXXxdZ8t8Y4pAly3uqV5h2zHhAGv/Yam7Z6XI/QHXH92UMzg2OCr5H6P/YsLGoR25QZhXtIgDGAq9evwHBAAbpWXTwelBa8TmYchqvsr5mGI5tSFecgvlJzUPI7w+41JcQbV2NcWkzrOPHZljlceL4DO64t5bLwAtpBFnileGGK2aukHzasq7M9qEPJbPpJBdL8R8KYk1RbWQzrdCFBiLG+2/AL7AG/iyBF9v6KQONe+gJIieVvgGovnt9mFJ9gFUNhFp8XzHiv/p8hV9cMC64VzVWffYHzRXNUSd1tF57l38aZv8danLt7EoG/tzk5N86TBmDWb3xAV3ZtfYoFP/wM=
\ No newline at end of file
diff --git a/examples/data-channels-detach/README.md b/examples/data-channels-detach/README.md
index 9bc5b63c707..2b5b8c53616 100644
--- a/examples/data-channels-detach/README.md
+++ b/examples/data-channels-detach/README.md
@@ -1,13 +1,18 @@
# data-channels-detach
+
data-channels-detach is an example that shows how you can detach a data channel. This allows direct access the the underlying [pion/datachannel](https://github.com/pion/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.
The example mirrors the data-channels example.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fdata-channels-detach%2Fdrawio)
+
## Install
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/data-channels-detach
```
## Usage
+
The example can be used in the same way as the data-channel example or can be paired with the data-channels-detach-create example. In the latter case; run both example and exchange the offer/answer text by copy-pasting them on the other terminal.
diff --git a/examples/data-channels-detach/drawio b/examples/data-channels-detach/drawio
new file mode 100644
index 00000000000..702329e7601
--- /dev/null
+++ b/examples/data-channels-detach/drawio
@@ -0,0 +1 @@
+7VxZc9o6GP01zKQPZPBuHgNpc5e05Q7t3PZR2AI8tS1XFoH011ey5U0SxKSYJUk6E6zPtmzO+XYp7RnjaHOHQbL8iHwY9vSBv+kZtz2d/tgW/WCSx1yiGTqXLHDgc1klmAa/IBcOuHQV+DBtXEgQCkmQNIUeimPokYYMYIzWzcvmKGw+NQELKAmmHghl6f+BT5a51NWdSv4XDBbL4smaPczPRKC4mH+TdAl8tK6JjPc9Y4wRIvlRtBnDkKFX4JLf92HL2fLFMIxJmxvuo49R4uGvv2bo05Ashv99/uL2+SwPIFzxL8xfljwWCMDYv2FA0lGMYioc+SBdQjarRgdLEoX8kMkngBCI40yiDwwqTQlGP0rwdCb5AYm35Dd5K/xQTiZ/J/6C0G/QxL/hHUQRJPiRXrCuyLE44MsaL4UMwxCQ4KFJLuA6siinK58wQQF9E33AFdoc8Hm4OlsFucUUKVphD/K76mQ8MZFmCxMRgBeQSBPRg9rXrkQZ13vwbih4t0MK1miOsvesFMD+uULFiX6aGegNvUBzk011kh4t+Gc2y6wQ/DNlhEKI6cfV5/kcYojfFVfRV5+J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OcMRSp81GaD+YxdG3lNCbKm+KVHQW3QJMQ+eRQ05WpeAvmt/fMnYUwXMh+n2L2wbxizzCcm6jiMmXL3QN34GaOE4vFhAqj3fbX9H7vZ/3EUfd7Sqo/iey05PkrcvG2mrRgU98A6h9pMa4sUd2y3lrwjLKWPzNavaXH5ArYOiFtmXFXL76hh1dJlzF9cp1WCfXhy2Per6d98nMDg8LkltjiRKzrLrn1cixK7s2ZO0awtB+2atWUTqNEYdnZ3hrdqVL0LNFkHI2vyL/4azZz7kTcZTedJnwPydBdocFYq2teEzqz53BZvuaGs+xavkgA5DGebhl/Q1lVp++Qxy9tdSl/HPIEXn+/0zw9oeYFtjSmK2RpnSj0vcwQg9lHUK5c0Xt5CZ7n6dDIa5FWk44VBZTjTWy507hk7DxoGdyn02URBYS1EXMJoGwTFiSznuEGwRYIuJFf7aOthU7GuMrHiD8WfUkH9rFTQEdIw0Ye11UDtmWkYVQPwWLssYRek++koHVZ/0Z5fXv3HAMb73w==
\ No newline at end of file
diff --git a/examples/data-channels-detach/jsfiddle/demo.html b/examples/data-channels-detach/jsfiddle/demo.html
index 6afd5f4bfe7..f2f888b796f 100644
--- a/examples/data-channels-detach/jsfiddle/demo.html
+++ b/examples/data-channels-detach/jsfiddle/demo.html
@@ -2,14 +2,14 @@
Golang base64 Session Description
-
+
-
+Message
+
+
Logs
diff --git a/examples/data-channels-detach/jsfiddle/demo.js b/examples/data-channels-detach/jsfiddle/demo.js
new file mode 100644
index 00000000000..16b466d3b89
--- /dev/null
+++ b/examples/data-channels-detach/jsfiddle/demo.js
@@ -0,0 +1,49 @@
+/* eslint-env browser */
+
+let pc = new RTCPeerConnection({
+ iceServers: [
+ {
+ urls: 'stun:stun.l.google.com:19302'
+ }
+ ]
+})
+let log = msg => {
+ document.getElementById('logs').innerHTML += msg + ' '
+}
+
+let sendChannel = pc.createDataChannel('foo')
+sendChannel.onclose = () => console.log('sendChannel has closed')
+sendChannel.onopen = () => console.log('sendChannel has opened')
+sendChannel.onmessage = e => log(`Message from DataChannel '${sendChannel.label}' payload '${e.data}'`)
+
+pc.oniceconnectionstatechange = e => log(pc.iceConnectionState)
+pc.onicecandidate = event => {
+ if (event.candidate === null) {
+ document.getElementById('localSessionDescription').value = btoa(JSON.stringify(pc.localDescription))
+ }
+}
+
+pc.onnegotiationneeded = e =>
+ pc.createOffer().then(d => pc.setLocalDescription(d)).catch(log)
+
+window.sendMessage = () => {
+ let message = document.getElementById('message').value
+ if (message === '') {
+ return alert('Message must not be empty')
+ }
+
+ sendChannel.send(message)
+}
+
+window.startSession = () => {
+ let sd = document.getElementById('remoteSessionDescription').value
+ if (sd === '') {
+ return alert('Session Description must not be empty')
+ }
+
+ try {
+ pc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(sd))))
+ } catch (e) {
+ alert(e)
+ }
+}
diff --git a/examples/data-channels-flow-control/README.md b/examples/data-channels-flow-control/README.md
index b00839e53c3..03d5cdaf13e 100644
--- a/examples/data-channels-flow-control/README.md
+++ b/examples/data-channels-flow-control/README.md
@@ -1,4 +1,5 @@
# data-channels-flow-control
+
This example demonstrates how to use the following property / methods.
* func (d *DataChannel) BufferedAmount() uint64
@@ -7,9 +8,12 @@ This example demonstrates how to use the following property / methods.
* func (d *DataChannel) OnBufferedAmountLow(f func())
These methods are equivalent to that of JavaScript WebRTC API.
-See https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel for more details.
+See for more details.
+
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fdata-channels-flow-control%2Fdrawio)
## When do we need it?
+
Send or SendText methods are called on DataChannel to send data to the connected peer.
The methods return immediately, but it does not mean the data was actually sent onto
the wire. Instead, it is queued in a buffer until it actually gets sent out to the wire.
@@ -22,7 +26,6 @@ The rate you wish to send data might be much higher than the rate the data chann
actually send to the peer over the Internet. The above properties/methods help your
application to pace the amount of data to be pushed into the data channel.
-
## How to run the example code
The demo code (main.go) implements two endpoints (offerPC and answerPC) in it.
@@ -45,10 +48,10 @@ connection, and data channel (label: "data").
Once the data channel is successfully opened, offerPC will start sending a series of
1024-byte packets to answerPC as fast as it can, until you kill the process by Ctrl-c.
-
Here's how to run the code.
At the root of the example, `pion/webrtc/examples/data-channels-flow-control/`:
+
```
$ go run main.go
2019/08/31 14:56:41 OnOpen: data-824635025728. Start sending a series of 1024-byte packets as fast as it can
diff --git a/examples/data-channels-flow-control/drawio b/examples/data-channels-flow-control/drawio
new file mode 100644
index 00000000000..2d18ae87a46
--- /dev/null
+++ b/examples/data-channels-flow-control/drawio
@@ -0,0 +1 @@
+7Vxbd6M2EP41Pqd9SA4IcfFj7Oyl7W7XPdltd/uGQbY5AURBju38+kpcbHSxjRPwLZvkODAIAfPNNzMaCfeMYbT8kLrJ7DP2UdgDmr/sGfc9AHQAQI/9af6qlOjAKiTTNPBL2UbwEDyjUqiV0nngo4xrSDAOSZDwQg/HMfIIJ3PTFC/4ZhMc8ldN3CmSBA+eG8rSfwKfzAqpA+yN/CMKprPqyrrVL45EbtW4fJJs5vp4URMZ73rGMMWYFFvRcohCpr1KL8V577ccXd9YimLS5IRP0eco8dJvz2P8Z59M+399+erclL08ueG8fODyZsmq0gCK/TumSLoX45gKB76bzRDrVac7MxKF5SaTj1xCUBrnEqAZVJqRFD+ulQeY5BERb1ae5M3Tp3Vn8jOVN4h8DqbyCT8gHCGSrmiDxQYcs1T4rIZLJUtR6JLgiQfXLW1kuu5ufYURDuidAK00aMMu0S3NGVZmWnWR4XnqofKsOhhSR86tbXF96ZbQF3HTKSJSX3Sj9uQbUQ73AdAbCuitkOprMOYMwPpvzkx0MMExuclygt7RBrqTLDcH6daU/f8ymaAUpVVP9MbG1SHJsAhaEt6AClMZ4hCnG2ubBGEoiNwwmDIT86iZ0IsZgyeUkoCS9q48EAW+zy4zWMwCgh4S12PXXFAfRWUpnsd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tN4nijaLxLsPbH43hWUVjE/TVxnRwkcLZ4glajsZidN0XjcXo3XY0fvybfL0fP/74F351wnh1M3PmmWIVa+6FqPdxhzM3jtmi5JM7IcnjKAy/sROCqujclRNS6lwxDkvQOSyUalXPxjHHu0o9y2s1IpRlbNX6lakaHrNGr1T1jqWYV+RKxOoCUBRSj6t3eTB1Da5E1PPp7bvB9HgLVZxD8r/XVXGEnG5vIrkrd6gnktvj3clWMGnCeycvrZtDYRbFEPPPtoo4feGG+3vSRqF9VaXqNG1ssCi1dT6AqyGEcVJC9IU1X9pLCSF0ZNgdjaOEcRF09lQ1xfbgCITouLBwmQECNuSDeUo+iMMWcSV/UzqI/fS7Cg/cZapa8/bocHwuyIswJC50P8vVohmf1F0blhDeRbtqap+W+AKuuMyxvUl/dXCU13zMk6LKrRFM8jU64xVBWa4zL0DMWYp2cx5zFb3XD3EsoQgJtdJ97HnPqI3pCDU8h73Pfv6sPemowxIHC2b/9oVvToi8lWahu+YtkAzDR5RCURAz6saILHD6yEg8o/hPZ8mc3fwv4yT79YrpK4ICZfrq+lH52+DNtBcmnWvO/qixuXP+njQp1MWlH2JlqSl79T6/nBo2rBq0xl5FZRbTfB/nXzZTL81q43n+DRQ+u7mIWkJO4xBlWc5tl00L6Z8HV0xqXRewqgJwB6/l0N3N99cUYG++Bsh49z8=
\ No newline at end of file
diff --git a/examples/data-channels/README.md b/examples/data-channels/README.md
index 11872b3df23..3fc505feec9 100644
--- a/examples/data-channels/README.md
+++ b/examples/data-channels/README.md
@@ -1,28 +1,41 @@
# data-channels
+
data-channels is a Pion WebRTC application that shows how you can send/recv DataChannel messages from a web browser
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fdata-channels%2Fdrawio)
+
## Instructions
+
### Download data-channels
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/data-channels
```
### Open data-channels example page
+
[jsfiddle.net](https://jsfiddle.net/9tsx15mg/90/)
### Run data-channels, with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser's session description, copy that and:
+
#### Linux/macOS
+
Run `echo $BROWSER_SDP | data-channels`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `data-channels < my_file`
### Input data-channels's SessionDescription into your browser
+
Copy the text that `data-channels` just emitted and copy into second text area
### Hit 'Start Session' in jsfiddle
+
Under Start Session you should see 'Checking' as it starts connecting. If everything worked you should see `New DataChannel foo 1`
Now you can put whatever you want in the `Message` textarea, and when you hit `Send Message` it should appear in your terminal!
diff --git a/examples/data-channels/drawio b/examples/data-channels/drawio
new file mode 100644
index 00000000000..87616e18cd6
--- /dev/null
+++ b/examples/data-channels/drawio
@@ -0,0 +1 @@
+7Vzbcto6FP0aZtqHdHy3eQyk7bn0whnaOe2jsAV4altUFoH06yvZ8k0SxFCMIUkyE+xtW7bXWtp7a0thYI7j7XsMVsuPKIDRwNCC7cC8Gxj0x7HpB7M85BbdNLhlgcOA2yrDNPwFuVHj1nUYwLRxIkEoIuGqafRRkkCfNGwAY7RpnjZHUfOuK7CAkmHqg0i2/h8GZJlbPcOt7H/BcLEs7qw7w/xIDIqT+ZukSxCgTc1kvh2YY4wQybfi7RhGDL0Cl/y6dzuOlg+GYULaXPAh/hivfPz11wx9GpLF8L/PX7wb3so9iNb8hfnDkocCAZgEtwxIupeghBpHAUiXkLWq050liSO+yewTQAjESWYxNJNaU4LRjxI8g1l+QOIv+UX+Gt+XjcnvxB8QBg2a+Bu+hyiGBD/QEzYVOTYHfFnjpbBhGAES3jfJBVwji7K58g4TFNInMTQuaEvj7XA52wW5RRMpWmMf8qvqZDzSkO4IDRGAF5BIDdGN2mtXpozrA3g3Fbw7EQVrNEfZc1YCcH6uUXHgJs066C09QfdW2+og3Vrwz6yVWWH4Z8oIhRDTj1ef53OIIX5dnEUffSZeSW35IxRmQY4Ebkl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7t9G1JiFO7zmHJVdMJJBfSmx/kjQYQp7pFitEDk0abOuRhjpOGiw5mqmLa2O0oni8mwDqfZ9tjc1p1thcRS297NVn8b22HB8lbl4WLFcMiuuM3VMtWHZEijvut7a86i6lt8zWCNBs9AkszxCXJXmqsupZw6ptyJg/uWq2BPuwd9gPq6C8+DiBweGxBQ2xIU90ll37uBYFjUsqnVXl9KqC/r1+7OTl9KIW8XjNTbsoiZYlG3EV+8HT00azoQ7r6ZNNOLIn/+Kv8cz9MPIno+l8pfh/sWxd9mWtDpacv0JsrUe3liav8eksHigxl6MwWsFLSHf+CGep+HbWqQsl0PJsZkrdLev9IAlQPKjNGmn5IPEJ6f6mXNV5MXzIc3fnD4eDI2aX9cERs8tCpHo0Pu5zFfXwuFvpfQXDcsl94WHFeaO2wVBsyHbPGwxb5OlNUR0k1mPlpJausV+7J9Rg8V/6j2nQ6FODp8rH9CPzMaoD8FA7bcVOSNs/L58mrASdN3hSebcYjVyMvN0+5b1nqNLbgEP0scXXbhwqcEctvFPr2xNuw9coHKlvult9r0Z+evX1JObb3w==
\ No newline at end of file
diff --git a/examples/ice-restart/README.md b/examples/ice-restart/README.md
index b91b6f18ba9..1dc06660306 100644
--- a/examples/ice-restart/README.md
+++ b/examples/ice-restart/README.md
@@ -1,9 +1,13 @@
# ice-restart
+
ice-restart demonstrates Pion WebRTC's ICE Restart abilities.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fice-restart%2Fdrawio)
+
## Instructions
### Download ice-restart
+
This example requires you to clone the repo since it is serving static HTML.
```
@@ -14,9 +18,11 @@ cd webrtc/examples/ice-restart
```
### Run ice-restart
+
Execute `go run *.go`
### Open the Web UI
+
Open [http://localhost:8080](http://localhost:8080). This will automatically start a PeerConnection. This page will now prints stats about the PeerConnection
and allow you to do an ICE Restart at anytime.
diff --git a/examples/ice-restart/drawio b/examples/ice-restart/drawio
new file mode 100644
index 00000000000..345a61ecb65
--- /dev/null
+++ b/examples/ice-restart/drawio
@@ -0,0 +1 @@
+7Vxbc5s6EP41nmkf0uEOfoydXqanPfE5Tue0jzLINlNAVMiJ019/JBAYJOHYDviSxpmJYQEh9vu02l0tHpjjeP0Rg3T5FQUwGhhasB6YNwODfhybfjHJYyHRTYNLFjgMuGwjmIa/IRdqXLoKA5g1TiQIRSRMm0IfJQn0SUMGMEYPzdPmKGreNQULKAmmPohk6X9hQJaF1DPcjfwTDBfL8s66MyyOxKA8mT9JtgQBeqiJzPcDc4wRIsVWvB7DiGmv1Etx3YeWo1XHMEzILhd8ib/GqY+//Z6hv4dkMfzn9s674q3cg2jFH5h3ljyWGoBJcM0USfcSlFDhKADZErJWdbqzJHHEN5l8AgiBOMklhmZSaUYw+lkpz2CSn5D4S36Rv8L3VWPyM/EOwqABE3/CjxDFkOBHesLDBhybK3xZw6WUYRgBEt43wQWcI4uqueoOExTSnhgaJ7Sl8XY4ne0S3LKJDK2wD/lVdTCeaEh3hIYIwAtIpIboRu2xN6Ic6z1wNxW4OxFV1miO8n5uCOD8WqHywFWWD9BreoLupevNQbq14N95K7NS8HnKAIUQ0683t/M5xBC/Lc+iXZ+JV1JZ0YVSLNCRwDVp0q4g2BhFCG84Og+jSBCBKFwwYvqUXLQ/5ugeYhLSoX7ND8RhELDbjB6WIYHTFPjsng/UslEZRqskyImqiRRuZS27AVxv5S0/apsCHwzjHTeUNWYPtzBbReIGa/aliCtRxMcQEDhgnHdAzJRS/GcAQUaaCFFt0u/pzYT+RwxtCb+NHvUWTdehrau5DunAMAMAvbkv4U+POL4HZ/NugLFcrwGM6WoSLHo5y9VxsfrCxZNwwfDXCmYMgNBn8PggCcKAQpVdvPY9uxwGXP+WpdC/yuL3pn99hzmzaSyeo2YbeoGlUrNnzEzH6UbNriGq2XAUavYUaq6EnevZltSMEmZVUphcOq1dS9S3aSr0b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0z9sqS6bS6MrXGwWfcs3VDK1ZyVWYLIqiqxnCAcRXVCyXXmU+SZUdK/aSWZYOGlVWRc9O1FuCQZKlCJPL6XLow7utvW5hwAH9ZmXY3REDRpS2MBiXry5MQIj36O5Zpqw68COldbDNElvdj1TW3Nk9+ZHy0liEFi/HdRdVrnTcjxoqycn+M3kJ4ll6FoNSUz99UCrnyvOJ9LzecniW1sUCjRat91WioQ6t9kt07+Cls/WBDyAOI/aUn2B0D5kN5wdqmtXyT82tL7d3KduovHr9GF79Nr4+Gbx6p/TqTSG5Vys82NerN4UaBn0oNdVdplDNVTlvlVFuMidphXMAKRxhzJL09yF4WbZDstjD01tsfYes1rFsR2Uvfgw2CYJtJV+d2ABvRxugnzSDpQvL4KZ7sBGoSpQqn/joRkDOMdHA61+Y0fuyjs5WhJzFS2HPzGGLw/3UGWzFC3lzRDmTMf4vmc1lCsbRI4s5y7fhF4AewoUkxYienR2WCek04CXsnbMZzAdWThvKi9dw1xEKty3bkiinLMLoLdjd5QWzHsqHTzSXFIbtVHOE5+gC+gcmfz1doFF/v66jVuMO5Xknrjk/7pLEthXgJx0X56SclBexRDLtXNMuzqedsZLubn5HrDh983Ns5vv/AQ==
\ No newline at end of file
diff --git a/examples/ice-single-port/README.md b/examples/ice-single-port/README.md
index 098d0a7f162..f9e270af6c8 100644
--- a/examples/ice-single-port/README.md
+++ b/examples/ice-single-port/README.md
@@ -1,13 +1,17 @@
# ice-single-port
+
ice-single-port demonstrates Pion WebRTC's ability to serve many PeerConnections on a single port.
Pion WebRTC has no global state, so by default ports can't be shared between two PeerConnections.
Using the SettingEngine a developer can manually share state between many PeerConnections and allow
multiple to use the same port
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fice-single-port%2Fdrawio)
+
## Instructions
### Download ice-single-port
+
This example requires you to clone the repo since it is serving static HTML.
```
@@ -18,9 +22,11 @@ cd webrtc/examples/ice-single-port
```
### Run ice-single-port
+
Execute `go run *.go`
### Open the Web UI
+
Open [http://localhost:8080](http://localhost:8080). This will automatically open 5 PeerConnections. This page will print
a Local/Remote line for each PeerConnection. Note that all 10 PeerConnections have different ports for their Local port.
However for the remote they all will be using port 8443.
diff --git a/examples/ice-single-port/drawio b/examples/ice-single-port/drawio
new file mode 100644
index 00000000000..88c07299573
--- /dev/null
+++ b/examples/ice-single-port/drawio
@@ -0,0 +1 @@
+7Vxfc5s4EP80nuk9uMN/8GPstOn10otbp9P2UQbZ5gqICjlx+ulPAoFBkh3bAcdOk8zYsAgh9re72l2t3DNH8eoKg3TxCQUw6hlasOqZlz3DMGzXpF+M8lBQdEcbFJQ5DgNOWxMm4W/IiRqnLsMAZo2GBKGIhGmT6KMkgT5p0ADG6L7ZbIai5lNTMIcSYeKDSKZ+CwOyKKie4a7pH2A4X5RP1h3+fjEoG/M3yRYgQPc1kvmuZ44wQqQ4ilcjGDHulXwp7nu/4Wo1MAwTsssN1/GnOPXx199T9O+AzAefb269Pu/lDkRL/sJ8sOSh5ABMggvGSHqWoIQShwHIFpD1qtOTBYkjfsjoY0AIxElOMTSTUjOC0c+KeQaj/ITEX/Cb/CW+qzqT34kPEAYNmPgbXkEUQ4IfaIP7NTg2Z/iihktJwzACJLxrggu4jMyr7qonjFFIR2JoXKAtjffDxdkuwS27yNAS+5DfVQfjkY6oXjQ7IgDPIZE6oge1116Tcqz3wN1U4O5ElFnDGcrHuRYA59cSlRf6Wa6gF7SB7qWr9UV6NOffeS/TkvBxwgCFENOvNzezGcQQ/1W2okOfindSWjGEkiyII4Er0hS7QsBGKEJ4LaOzMIoEEojCORNMnwoXHY85vIOYhFTVL/iFOAwC9pjh/SIkcJICnz3znlo2SsNomQS5oGqiCG+UWvYAuNoqt/yqbQryYBhv7YJSk+zBFslWCXFDavYVEVcSER9DQGCPybwDYsaU4pMBBJnQRIhyk35P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yM7TkvymD88L1+UsuUsdP1bfnZ03NlPKNTWJPHxfNEzKxjSvWPhxpaRy5vEkv3NphaKgzgodYsZQ2yLYMeSE/SG1sT6EHR56GWXIncDqvPrYu5ewZifgapY0euhzzUg3dtMQtdVfG1LOautqmIs1Mxlx1VsRhN61epuWbFExYLmbIUsPa5+Od9lcVSadT39Uahp1xtNUUrVmwVJvOi3GqKcABxn5LloqvMJ6lyYMVZMs3SXqO+qhjZM42WYJBkKcLkfIYc+vB266g3SMAB42bl1+0JBoyo2MJgVG5ZGIMQ7zHck0xYteBHDkxDsIeqYjtdWW1nd+RHyotiEZq/HNddXHRUOu5HDZXkVP9L2PwghaTOc4ekcp48n0Zf0N4GsTBDyfOuCjPUcdZ+Ke4dPHS2MvAexGHE3vEDjO4gs9/8Qo2vWv5Xc+nL412KNSqPXu/Ao98mnI8Grt5JefSmkNaryg329edNsW7BEjpqLz+ollM5X5VRuWTO0RLnaFJswpil5u9C8LKshmipLeu5LbW+Qy7rWFajshQ/euu0wBNKvLZp9eNpq9PKW+nC0rdlHKj+VUlStf36yOovZ5VoqPUFZvS5bJjTJSHnvwHMFV2ygcL1PWrOWrH5boaoxGRMGRbM2jIG4+iBRZnlvvc5oJdwQUkxoq2zw3IfrYa4hO0vm8JcqXKxoXLxGuA6QpG2ZVuSyCmLLjoLb3fZTNZBqfBx5pHSjp3I/OA5uoD+geleTxfEqLvf0VHzdYdyvGeuL+90EWLbGtqjTotzWjIpL1uJwrRz/bqU4uhMKq3pt/+uXfi5H6Sh/d670o3xZ8Ua+z2cfrmlnWkX47/p55uMTl0RzOWU8sxnQCOs2DF0fEdGmkIUMrg5zyFGi6oNKKoK6jYcGSUUxw1YSlthtBzArG3I2mz8aFiNbTZEUPBHjco2mX50ZbP4yYxny3uImwTFxced66JM0T9qy4TQ0/WPDhbN17/daL77Hw==
\ No newline at end of file
diff --git a/examples/ice-tcp/README.md b/examples/ice-tcp/README.md
index 1f505eaf3ad..53570ce4312 100644
--- a/examples/ice-tcp/README.md
+++ b/examples/ice-tcp/README.md
@@ -1,9 +1,13 @@
# ice-tcp
+
ice-tcp demonstrates Pion WebRTC's ICE TCP abilities.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fice-tcp%2Fdrawio)
+
## Instructions
### Download ice-tcp
+
This example requires you to clone the repo since it is serving static HTML.
```
@@ -14,9 +18,11 @@ cd webrtc/examples/ice-tcp
```
### Run ice-tcp
+
Execute `go run *.go`
### Open the Web UI
+
Open [http://localhost:8080](http://localhost:8080). This will automatically start a PeerConnection. This page will now prints stats about the PeerConnection. The UDP candidates will be filtered out from the SDP.
Congrats, you have used Pion WebRTC! Now start building something cool
diff --git a/examples/ice-tcp/drawio b/examples/ice-tcp/drawio
new file mode 100644
index 00000000000..88c07299573
--- /dev/null
+++ b/examples/ice-tcp/drawio
@@ -0,0 +1 @@
+7Vxfc5s4EP80nuk9uMN/8GPstOn10otbp9P2UQbZ5gqICjlx+ulPAoFBkh3bAcdOk8zYsAgh9re72l2t3DNH8eoKg3TxCQUw6hlasOqZlz3DMGzXpF+M8lBQdEcbFJQ5DgNOWxMm4W/IiRqnLsMAZo2GBKGIhGmT6KMkgT5p0ADG6L7ZbIai5lNTMIcSYeKDSKZ+CwOyKKie4a7pH2A4X5RP1h3+fjEoG/M3yRYgQPc1kvmuZ44wQqQ4ilcjGDHulXwp7nu/4Wo1MAwTsssN1/GnOPXx199T9O+AzAefb269Pu/lDkRL/sJ8sOSh5ABMggvGSHqWoIQShwHIFpD1qtOTBYkjfsjoY0AIxElOMTSTUjOC0c+KeQaj/ITEX/Cb/CW+qzqT34kPEAYNmPgbXkEUQ4IfaIP7NTg2Z/iihktJwzACJLxrggu4jMyr7qonjFFIR2JoXKAtjffDxdkuwS27yNAS+5DfVQfjkY6oXjQ7IgDPIZE6oge1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i5H6Sh/d670o3xZ8Ua+z2cfrmlnWkX47/p55uMTl0RzOWU8sxnQCOs2DF0fEdGmkIUMrg5zyFGi6oNKKoK6jYcGSUUxw1YSlthtBzArG3I2mz8aFiNbTZEUPBHjco2mX50ZbP4yYxny3uImwTFxced66JM0T9qy4TQ0/WPDhbN17/daL77Hw==
\ No newline at end of file
diff --git a/examples/insertable-streams/README.md b/examples/insertable-streams/README.md
index c4bf0795173..4796ac5eb43 100644
--- a/examples/insertable-streams/README.md
+++ b/examples/insertable-streams/README.md
@@ -1,4 +1,5 @@
# insertable-streams
+
insertable-streams demonstrates how to use insertable streams with Pion.
This example modifies the video with a single-byte XOR cipher before sending, and then
decrypts in Javascript.
@@ -6,35 +7,47 @@ decrypts in Javascript.
insertable-streams allows the browser to process encoded video. You could implement
E2E encyption, add metadata or insert a completely different video feed!
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Finsertable-streams%2Fdrawio)
+
## Instructions
+
### Create IVF named `output.ivf` that contains a VP8 track
+
```
ffmpeg -i $INPUT_FILE -g 30 output.ivf
```
### Download insertable-streams
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/insertable-streams
```
### Open insertable-streams example page
+
[jsfiddle.net](https://jsfiddle.net/uqr80Lak/) you should see two text-areas and a 'Start Session' button. You will also have a 'Decrypt' checkbox.
When unchecked the browser will not decrypt the incoming video stream, so it will stop playing or display certificates.
### Run insertable-streams with your browsers SessionDescription as stdin
+
The `output.ivf` you created should be in the same directory as `insertable-streams`. In the jsfiddle the top textarea is your browser, copy that and:
#### Linux/macOS
+
Run `echo $BROWSER_SDP | insertable-streams`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `insertable-streams < my_file`
### Input insertable-streams's SessionDescription into your browser
+
Copy the text that `insertable-streams` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, enjoy your video
+
A video should start playing in your browser above the input boxes. `insertable-streams` will exit when the file reaches the end.
To stop decrypting the stream uncheck the box and the video will not be viewable.
diff --git a/examples/insertable-streams/drawio b/examples/insertable-streams/drawio
new file mode 100644
index 00000000000..b744c3ff492
--- /dev/null
+++ b/examples/insertable-streams/drawio
@@ -0,0 +1 @@
+7VxZc+K4Fv41VM08QNmSNx6zTPreme7pzE1P3e5HYQtQxViMLJb0rx/JC9iSIIZgE5Kku8CWbVk+5zv7MT14M1t/Ymg+/UIjHPeAFa178LYHgA0A6Mn/VvRUjNjAy0cmjETF2HbggfzExaBVjC5IhNPaiZzSmJN5fTCkSYJDXhtDjNFV/bQxjet3naMJ1gYeQhTro/8nEZ/mowHwt+P/wWQyLe9se8P8yAyVJxdPkk5RRFeVIfhbD94wSnm+NVvf4FhSr6RLft3djqObhTGc8CYXfJ59mc1D9vfPEf1zyCfDv75+C/rFLEsUL4oHLhbLn0oK4CS6koQUewlNxOB1hNIplrPaYmfKZ3GxKcfvEeeYJdkIsKAYTTmjjxviATnyiHk4LS4KF2y5mUx/pmKBOKqxqXjCT5jOMGdP4oTVljluQfBphS/lGMMx4mRZZy4qMDLZTLe5wz0lYiXAKgDtWMU8BZwdz6pPkdIFC3FxVZUZz0xkqxNxxCaYaxOJjcpjb4cyXh/Ad2jguxcLYl2PabbOLQC8fxa0PNBPMwG9EifYwXy9PSi2JsV3NsuoHPj9QTIUYya+fvk6HmOG2a/lWWLpI/VKMZYvoRxW4MjxmtdhlwPshsaUbTE6JnGsDKGYTCQwQwEusR54vcSMEyHqV8WBGYkieZvr1ZRw/DBHobznSmg2McboIokyoFoqhHeiVt4Ar/fitjjqum4dD1axX8H1cA+uTRCuYeZQgPgaQEKGEcc9qWU8NJMkyT8le7CETEwFLcX3w+29+KSS1xr3tlS0d9C5ytgqkasM7QEYIRyMQ4374ogXBng0PhFbLKcu7yUPKmy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7qTZ2wvA3nl6yrPIQ+8KuQJpaTaaFUlNUWe7cL6RH5ruBt9h328up4RC/T/SMB9/ytLDKZdw12ZLSSz7D2gKuTMTSHP9pLE8sC18B0mGWar6cHsT5yS3ewqnW9bSVC5MyZrifLrYj23U87li05XkjbgLowSMCAhTcZESAMbhOKO4C5CHIkvOZ6Kb/l6VNpHSdSP8JKEsg38zpbl3bs/8NNgnkx22DIDyHeaN6hUq6GhIgcMGD1Fw7CR1Q0agw5TMUaZbESijgyEUpiD9pFCuuHJrolaFlLdLcFJyJ7mcoljhmYSv1aepv3+9X/i84bMp4bayuvI0p5AtoDCWWAouwydgSFGOkUe1sgj3YCXTLAe8dPbZYUmZIYkXVsJcSMj9H6uPFgtY6dvDCVpiIVa0QWk+wjqRbTXX/7ZlH+7CKGM5NfrwXNGhYVNtyy4bKKr7R6wy/etjCTXK76bErygBEazzJSi6C0CHnbZbGOkvl5A1am/YoS/Reo7pi6zTqlfemKnD5zLUDkLgDdB9HOBcy1sHoBNGL03cn7eha6H0vu0QDWU3q2gz+WSu0FdeTrHFiY85bUL2F7fkxl3h/0qxCEJmxru/IbAs+vA6xB3fkPcDT9wdwrcNUjY1PsxTwDC45Rfhxj0GmIwOCcGnV0JoYOLsiqYG6YjBA6y5uvytLk8Id2zYNXTLRa8c13q+V7tfLGRr+C0AtEgrfUSgTgS3McI0hkE4qxKWRMIVZc2bqNUf3KoYZfCmQXi2fPL52hXgBoUPT9KAEcFTIHr1fhpeiG10xKA4ZcU3keWMnAUThh6ajrNUhp/VeFF8UNT63EubR8Y+j38gRVY2z/nOPWvzwy3ffVd+eV63jPC77pG43v+QHnZ21QCPVmZRuxufygyZ+v29zbhb/8C
\ No newline at end of file
diff --git a/examples/ortc/README.md b/examples/ortc/README.md
index 54d370ff756..00c97a06969 100644
--- a/examples/ortc/README.md
+++ b/examples/ortc/README.md
@@ -1,4 +1,5 @@
# ortc
+
ortc demonstrates Pion WebRTC's [ORTC](https://ortc.org/) capabilities. Instead of using the Session Description Protocol
to configure and communicate ORTC provides APIs. Users then can implement signaling with whatever protocol they wish.
ORTC can then be used to implement WebRTC. A ORTC implementation can parse/emit Session Description and act as a WebRTC
@@ -6,22 +7,29 @@ implementation.
In this example we have defined a simple JSON based signaling protocol.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fortc%2Fdrawio)
+
## Instructions
+
### Download ortc
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/ortc
```
### Run first client as offerer
+
`ortc -offer` this will emit a base64 message. Copy this message to your clipboard.
## Run the second client as answerer
+
Run the second client. This should be launched with the message you copied in the previous step as stdin.
`echo BASE64_MESSAGE_YOU_COPIED | ortc`
### Enjoy
+
If everything worked you will see `Data channel 'Foo'-'' open.` in each terminal.
Each client will send random messages every 5 seconds that will appear in the terminal
diff --git a/examples/ortc/drawio b/examples/ortc/drawio
new file mode 100644
index 00000000000..eff991db9d6
--- /dev/null
+++ b/examples/ortc/drawio
@@ -0,0 +1 @@
+7V1de6M2Fv41vsw8gPjyZT7a2XYzW+8mfdrZOwyKTQcjD8hJpr++EAOGI2FkDAic5CZGxjI+5z3S0atX0gzdbl4/R852/YV4OJhpivc6Q3czTdMMCyX/0pIfWYll2fuSVeR7+zL1UPDg/42zQiUr3fkejis3UkIC6m+rhS4JQ+zSSpkTReSletsTCarfunVWmCl4cJ2ALf3D9+h6X2pr1qH8X9hfrfNvVs35/p2Nk9+c/ZJ47XjkpVSEfpqh24gQun+1eb3FQWq93C77z/1c827xYBEOqcgH7jdfNls3+v3vJfnPnK7m//3t0b7Kanl2gl32g7OHpT9yC+DQu04NmVyFJEwKbzwnXuO0VjW5WNNNkL1MyxcOpTgK30o0BSWlMY3It8J4WlryDVN3nX3I3UXPRWXsb8oeEHsVN2W/8DMmG0yjH8kNLwfnGJnB1y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mdypFb8O0JqO3e6XQLQHebiwKJBM1HvKeXi1w5L8tSZaJfanzU3CdVI6k0xdcNR3pME7oJ5cRSWn/w+1JVrb+Qjyc3vEP
\ No newline at end of file
diff --git a/examples/pion-to-pion/README.md b/examples/pion-to-pion/README.md
index 7bf909bb760..238b3279fcf 100644
--- a/examples/pion-to-pion/README.md
+++ b/examples/pion-to-pion/README.md
@@ -1,17 +1,24 @@
# pion-to-pion
+
pion-to-pion is an example of two pion instances communicating directly!
The SDP offer and answer are exchanged automatically over HTTP.
The `answer` side acts like a HTTP server and should therefore be ran first.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fpion-to-pion%2Fdrawio)
+
## Instructions
+
First run `answer`:
+
```sh
export GO111MODULE=on
go install github.com/pion/webrtc/v3/examples/pion-to-pion/answer
answer
```
+
Next, run `offer`:
+
```sh
go install github.com/pion/webrtc/v3/examples/pion-to-pion/offer
offer
@@ -19,7 +26,8 @@ offer
You should see them connect and start to exchange messages.
-## You can use Docker-compose to start this example:
+## You can use Docker-compose to start this example
+
```sh
docker-compose up -d
```
diff --git a/examples/pion-to-pion/drawio b/examples/pion-to-pion/drawio
new file mode 100644
index 00000000000..d19b3c48a7c
--- /dev/null
+++ b/examples/pion-to-pion/drawio
@@ -0,0 +1 @@
+7V1dm6K4Ev41fek8QPjysrVnd59zZnbc7Znd2avzIETlDBg3YNu9v34TvoQkKmqIqD0X0xAhYNWbyluVqvgAxvHrz9hbLT6jAEYPhha8PoCnB8MwNHNI/tCWt7xF1w07b5njMCjatg3P4T+waNSK1nUYwKRxYYpQlIarZqOPlkvop402D2O0aV42Q1HzqStvDrmGZ9+L+NY/wyBd5K2u4Wzbf4HhfFE+WbeLbxx75cXFN0kWXoA2tSbw8QGMMUJpfhS/jmFEpVfKJb/vpx2fVi+G4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Him9S50zX1Fz3HYtiYvN2W64VwUd85VmDJ5AGU8Qot9l64BekNVfOfxnXIyKi2Fo24fC7Fm7qGK7yyVmQyfEKZCdFXFJ9YZHxbp5e9+nid2nbV9Li92pZ73NRZPSlWBDS6uApG7fXU1+udFQZgf17EFy8qSKvTJKUZ0GX9LBWgc4jMKIL3iXw==
\ No newline at end of file
diff --git a/examples/play-from-disk-renegotation/README.md b/examples/play-from-disk-renegotation/README.md
index 17669e531bd..802f4c2b6d9 100644
--- a/examples/play-from-disk-renegotation/README.md
+++ b/examples/play-from-disk-renegotation/README.md
@@ -1,11 +1,15 @@
# play-from-disk-renegotiation
+
play-from-disk-renegotiation demonstrates Pion WebRTC's renegotiation abilities.
For a simpler example of playing a file from disk we also have [examples/play-from-disk](/examples/play-from-disk)
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fplay-from-disk-renegotation%2Fdrawio)
+
## Instructions
### Download play-from-disk-renegotiation
+
This example requires you to clone the repo since it is serving static HTML.
```
@@ -28,6 +32,7 @@ ffmpeg -i $INPUT_FILE -g 30 -b:v 2M output.ivf
The `output.ivf` you created should be in the same directory as `play-from-disk-renegotiation`. Execute `go run *.go`
### Open the Web UI
+
Open [http://localhost:8080](http://localhost:8080) and you should have a `Add Track` and `Remove Track` button. Press these to add as many tracks as you want, or to remove as many as you wish.
Congrats, you have used Pion WebRTC! Now start building something cool
diff --git a/examples/play-from-disk-renegotation/drawio b/examples/play-from-disk-renegotation/drawio
new file mode 100644
index 00000000000..147a6c15802
--- /dev/null
+++ b/examples/play-from-disk-renegotation/drawio
@@ -0,0 +1 @@
+7Vxbc9o4GP01zLQP6djy/ZGQNjudZMsu7e5234QtgyfGora4pL9+JVsG6wIJLIYSaDoBf7Zl+3z3IzkdqzdZ3udwOn7EEUo7wIiWHeuu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RjF07CWIoCTz7hpHmB7hoDDhoDNH5r77soxPHsF8dqOwaoU5S7xYBLJ2R8WYO60uzIQUBtQq6czIbwfFxSBqgzlG+wV5He4zLtFuch6eb6L+5VQXH9hwutj/8B
\ No newline at end of file
diff --git a/examples/play-from-disk/README.md b/examples/play-from-disk/README.md
index 15204ec9445..5922a580923 100644
--- a/examples/play-from-disk/README.md
+++ b/examples/play-from-disk/README.md
@@ -1,10 +1,15 @@
# play-from-disk
+
play-from-disk demonstrates how to send video and/or audio to your browser from files saved to disk.
For an example of playing H264 from disk see [play-from-disk-h264](https://github.com/pion/example-webrtc-applications/tree/master/play-from-disk-h264)
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fplay-from-disk%2Fdrawio)
+
## Instructions
+
### Create IVF named `output.ivf` that contains a VP8 track and/or `output.ogg` that contains a Opus track
+
```
ffmpeg -i $INPUT_FILE -g 30 -b:v 2M output.ivf
ffmpeg -i $INPUT_FILE -c:a libopus -page_duration 20000 -vn output.ogg
@@ -20,23 +25,30 @@ go get github.com/pion/webrtc/v3/examples/play-from-disk
```
### Open play-from-disk example page
+
[jsfiddle.net](https://jsfiddle.net/a1cz42op/) you should see two text-areas, 'Start Session' button and 'Copy browser SessionDescription to clipboard'
### Run play-from-disk with your browsers Session Description as stdin
+
The `output.ivf` you created should be in the same directory as `play-from-disk`. In the jsfiddle press 'Copy browser Session Description to clipboard' or copy the base64 string manually.
Now use this value you just copied as the input to `play-from-disk`
#### Linux/macOS
+
Run `echo $BROWSER_SDP | play-from-disk`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `play-from-disk < my_file`
### Input play-from-disk's Session Description into your browser
+
Copy the text that `play-from-disk` just emitted and copy into the second text area in the jsfiddle
-### Hit 'Start Session' in jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, enjoy your video
+
A video should start playing in your browser above the input boxes. `play-from-disk` will exit when the file reaches the end
Congrats, you have used Pion WebRTC! Now start building something cool
diff --git a/examples/play-from-disk/drawio b/examples/play-from-disk/drawio
new file mode 100644
index 00000000000..32431491b5d
--- /dev/null
+++ b/examples/play-from-disk/drawio
@@ -0,0 +1 @@
+7Vtbc9o4FP41zLQPdGz5ymNC2ux20jY7pLObR2EL0MRYVBaX9NevZMtgXZKQFHNJ0s4EdGzL9vd95+joSHS8/nR1SeFs8o2kKOsAJ111vIsOAMDxe/xDWO4ri+uCsLKMKU6lbWMY4N9IGh1pneMUFcqJjJCM4ZlqTEieo4QpNkgpWaqnjUim3nUGx8gwDBKYmdZ/ccomlTUG0cb+F8LjSX1nN5RvPIX1yfJNiglMybJh8j53vD4lhFXfpqs+ygR6NS7VdV8eOLp+MIpyts0FV9Nv01lCf/4eku89Nu798+Mm7speFjCbyxeWD8vuawRQnp4JIHkrJzk3nqewmCDRq8sbEzbN5Fdhv4aMIZqXFuB43FowSu7W4AFhuUMsmciLkjldrDsz30k+IEoVmuQbXiIyRYze8xOWG3ICCfikwUttoyiDDC9UcqHUyHjd3foO1wTzJwGOFLTvyH6knP3QUbsoyJwmSF7VJOOJjly9IwbpGDGjI/6l8dobU8n1M3j3LLyHGQfrfETK59wIIPw1J/WBblE66Bk/wY1nq81B/m0sP8tehrXh60AQihDlHx9+jEaIIvqxPos/+lC/ktuqR6jNmhwZWjFVdpXA+iQjdKPREc4yzQQzPBbCTLi4+PN45wtEGeaufiYPTHGaitucLyeYocEMJuKeSx7ZuI2SeZ6WQnV0CT+oWnEDtHpUt/JoEKh66MlmQ9a9R2RtU7AimefqIzL0kVAEGeqIIBPCqUCk+ivYQUIxGeFQ8s/BxTX/SwTVBnkbEN0HYG7y2sS4yWcHeClE8SgxyOdHwiRGw9GOWHF7CisgNmlxw8DkxW+Ll9jghaJfc1QIAnAi6ElgnuKUU1WcPPog/BQo+HuhBX9buG8Nf3eLAV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prGHz6vMujgZj0VeVUv/VeRVOu6Hz6vMAvObGOHiLUe48KhGOB+o8nlxXuVHmv/vOa+qw81bk124peyio5IdiLzdZFYgClpLrXhz8zPk6vTNr7m9z/8D
\ No newline at end of file
diff --git a/examples/reflect/README.md b/examples/reflect/README.md
index 77abe8e0bff..887f905b0b2 100644
--- a/examples/reflect/README.md
+++ b/examples/reflect/README.md
@@ -1,28 +1,41 @@
# reflect
+
reflect demonstrates how with one PeerConnection you can send video to Pion and have the packets sent back. This example could be easily extended to do server side processing.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Freflect%2Fdrawio)
+
## Instructions
+
### Download reflect
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/reflect
```
### Open reflect example page
+
[jsfiddle.net](https://jsfiddle.net/9jgukzt1/) you should see two text-areas and a 'Start Session' button.
### Run reflect, with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser, copy that and:
+
#### Linux/macOS
+
Run `echo $BROWSER_SDP | reflect`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `reflect < my_file`
### Input reflect's SessionDescription into your browser
+
Copy the text that `reflect` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, enjoy your video
+
Your browser should send video to Pion, and then it will be relayed right back to you.
Congrats, you have used Pion WebRTC! Now start building something cool
diff --git a/examples/reflect/drawio b/examples/reflect/drawio
new file mode 100644
index 00000000000..c63bbac2504
--- /dev/null
+++ b/examples/reflect/drawio
@@ -0,0 +1 @@
+7Vtbc5s4FP41nmkf3OFueEycNrs7vWTH7WzzKINsMwXkCtlx+utXAnGT5GsMviTtTIwOWMD3nXN0LnLPHMarewzmsy8ogFHP0IJVz7zrGYZhD0z6wSTPuUR3NC+XTHEYcF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/NujAhBsQJyggRzRQsS0ZVxWBZXtQb2skVTXeE1XN09EhdiemJLXJgKLsR62tG4MFSls1fChe2eGRdyxBCxUC2BWK59nKGraoGigbi8WbLvchUcma1xpFrd1tjLJIIr3mu4rbUd/Aikaeg3ydsD1kaLQQg6Jjb7rww6sn+bWDmTpoRYO3Y0gctdmxLGtolabkoYcm1zRA2sVlV+t2TlH230/e7vr+9fqYUbntdgyVYURZVuuD0T9yTe8pYAhjHKUoiMvcvOG3St6Vgd+9R5Q8GnKmfLSkn9rCXTTwn1Ln4fk/mlc9Av69CchIGpIKHT4pK5QzjY1lJGgcTPP+uDRzbHB7sY3q34nPnomY/WMpEvFBvelptAvg5suM45qwVS16ym2phiprbrCul5wkRetyukKQe8QZjOI8DAzGrIY7bl5fI7r2IV2Tp5FdmUK2TdGfoqJD8r06ajx9qZysrZ4OVGXrQntlp5oY1nYuauJfTqD7VyaSK3YyvfIWW6sCZzXxdKB7bKoJVdZjEJOZ5Fy+nGFbU9df3sQiU5TbietqcUmjqqvkKneFtyfvDaq2N93Wy6dluRxXVaHrN28PVthxXFcS17WBtWlDlHOWg75yig3x6OuGcVjuhCCOscGo4YgifvuixnHbAZNC/XgazFeOmuXVxJ3V13SrTn2eXIRQL5rab+EuM1BOP1ihbsvsZrW1smatt45aBLXVMfojnF49MDoBHCqy2tO83SujuQLb206k7CA1uO4TaFB28/0BF2VrmH9sLEiRzRmbdst7a80Tylt8x2A0HquS9/I5a4L9dTGFu3y6ptyJhfXR9LhL0qjp8O9/1Kq29OTqJQ3GFzqJfzOq502meQ/e5TVK+y3yrhfayfO372yyOS7dmvdlY6Km5xdgYHqqi4/88Rf3J7sIrSYfXr6/zy6kfs5sf/AQ==
\ No newline at end of file
diff --git a/examples/rtp-forwarder/README.md b/examples/rtp-forwarder/README.md
index 8f3bb1aa786..41e57035f45 100644
--- a/examples/rtp-forwarder/README.md
+++ b/examples/rtp-forwarder/README.md
@@ -1,34 +1,49 @@
# rtp-forwarder
+
rtp-forwarder is a simple application that shows how to forward your webcam/microphone via RTP using Pion WebRTC.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Frtp-forwarder%2Fdrawio)
+
## Instructions
+
### Download rtp-forwarder
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/rtp-forwarder
```
### Open rtp-forwarder example page
+
[jsfiddle.net](https://jsfiddle.net/1qva2zd8/) you should see your Webcam, two text-areas and a 'Start Session' button
### Run rtp-forwarder, with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser, copy that and:
+
#### Linux/macOS
+
Run `echo $BROWSER_SDP | rtp-forwarder`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `rtp-forwarder < my_file`
### Input rtp-forwarder's SessionDescription into your browser
+
Copy the text that `rtp-forwarder` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle and enjoy your RTP forwarded stream!
+### Hit 'Start Session' in jsfiddle and enjoy your RTP forwarded stream
+
You can run any of these commands at anytime. The media is live/stateless, you can switch commands without restarting Pion.
#### VLC
+
Open `rtp-forwarder.sdp` with VLC and enjoy your live video!
#### ffmpeg/ffprobe
+
Run `ffprobe -i rtp-forwarder.sdp -protocol_whitelist file,udp,rtp` to get more details about your streams
Run `ffplay -i rtp-forwarder.sdp -protocol_whitelist file,udp,rtp` to play your streams
@@ -36,4 +51,5 @@ Run `ffplay -i rtp-forwarder.sdp -protocol_whitelist file,udp,rtp` to play your
You can add `-fflags nobuffer -flags low_delay -framedrop` to lower the latency. You will have worse playback in networks with jitter. Read about minimizing the delay on [Stackoverflow](https://stackoverflow.com/a/49273163/5472819).
#### Twitch/RTMP
+
`ffmpeg -protocol_whitelist file,udp,rtp -i rtp-forwarder.sdp -c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://live.twitch.tv/app/$STREAM_KEY` Make sure to replace `$STREAM_KEY` at the end of the URL first.
diff --git a/examples/rtp-forwarder/drawio b/examples/rtp-forwarder/drawio
new file mode 100644
index 00000000000..9ad55517512
--- /dev/null
+++ b/examples/rtp-forwarder/drawio
@@ -0,0 +1 @@
+7VtZc6M4EP41rpp5yBS34TFxjj3m8K5na2cfZZBtZgAxQk6c+fUrgTh04NiJjzjJTFWMGiGgv+5P3S0xsEfp6gaDfPEJRTAZWEa0GtiXA8uyDCegP0xyX0lM0/IqyRzHEZe1gkn8C3KhwaXLOIKF0JEglJA4F4UhyjIYEkEGMEZ3YrcZSsS75mAOFcEkBIkq/TeOyKKS+tawlf8G4/mivrPp8TdOQd2Zv0mxABG664jsq4E9wgiR6ihdjWDCtFfrpbruuuds82AYZmSTCz6mn9I8xP/8mqLPAZkHf3356p/xUW5BsuQvzB+W3NcagFl0zhRJWxnKqPAiAsUCslFN2liQNOGHTD4GhECclRLLsKm0IBj9aJRnMckPSMIFvyhc4ttmMPWd+APCSICJv+ENRCkk+J52uGvBcbnCFx1cahmGCSDxrQgu4DYyb4Zr7jBGMX0Sy+AG7Rh8HG7OjmOIQxRoiUPIr+qC8cBApicNRACeQ6IMRA86r92KSqy3wN3W4O4lVFkXM1Q+Z2sA3s8lqk+cFaWDntMOpp+v2pP0aM5/y1GmteCPCQMUQkx/3n2ZzSCG+H3diz76VL6SyqpHqMWSORK4IqLZVQY2QgnCrY3O4iSRRCCJ58wwQ2pc9Hnsi1uISUxd/ZyfSOMoYre5uFvEBE5yELJ73lFmozKMlllUGqohm3Cv1bIbwNVau+VnXVu0h4A3O2YdrDFrnQULJrOtfQwV+wgxBAQOGMl4IGUaqf4ydCCzmARRVdLfyeWY/kUMagW8Volmj5q7uHZ13MVzYNkRgP4sVMCnZ7zQh9PZblBxAuuDK+BiD1VgTM9VkZGJ4THIkIvxz6vvfxfe5Oyzfzn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rbHcdpN+Gq5aRllA+ar39KjjNm1AlonziC6Bm4nuJnGkPZuH58/O3nmm2ffQiAZRS/OAQc7c6fQyKwQV1Pqrpvk8LVG8zrLeVVhd6qd5vrd5g3hf2msU1hfyc70+s6XLfU308hxyJiKUd0HlvXN01pILm+2cPD1BDK0nvdLWcdiv7ntfS36XusniJ4a+3V/Xc6JWywy2nn7jDc1B0+GIYjuoTTCnqcomyNIY6pZlj6ezRPcY/pKbKBPzYrO5SnSN/v1R+GbugpjuM9xVNos/2OuOrefo5tX/0P
\ No newline at end of file
diff --git a/examples/rtp-to-webrtc/README.md b/examples/rtp-to-webrtc/README.md
index fd467472317..27ab07c2509 100644
--- a/examples/rtp-to-webrtc/README.md
+++ b/examples/rtp-to-webrtc/README.md
@@ -1,39 +1,49 @@
# rtp-to-webrtc
+
rtp-to-webrtc demonstrates how to consume a RTP stream video UDP, and then send to a WebRTC client.
With this example we have pre-made GStreamer and ffmpeg pipelines, but you can use any tool you like!
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Frtp-to-webrtc%2Fdrawio)
+
## Instructions
+
### Download rtp-to-webrtc
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/rtp-to-webrtc
```
### Open jsfiddle example page
-[jsfiddle.net](https://jsfiddle.net/z7ms3u5r/) you should see two text-areas and a 'Start Session' button
+[jsfiddle.net](https://jsfiddle.net/z7ms3u5r/) you should see two text-areas and a 'Start Session' button
### Run rtp-to-webrtc with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser's SessionDescription, copy that and:
#### Linux/macOS
+
Run `echo $BROWSER_SDP | rtp-to-webrtc`
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `rtp-to-webrtc < my_file`
### Send RTP to listening socket
-You can use any software to send VP8 packets to port 5004. We also have the pre made examples below
+You can use any software to send VP8 packets to port 5004. We also have the pre made examples below
#### GStreamer
+
```
gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480,format=I420 ! vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1 ! rtpvp8pay ! udpsink host=127.0.0.1 port=5004
```
#### ffmpeg
+
```
ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -vcodec libvpx -cpu-used 5 -deadline 1 -g 10 -error-resilient 1 -auto-alt-ref 1 -f rtp 'rtp://127.0.0.1:5004?pkt_size=1200'
```
@@ -51,14 +61,17 @@ ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -pix_fmt yuv420p -c:v libx26
```
### Input rtp-to-webrtc's SessionDescription into your browser
+
Copy the text that `rtp-to-webrtc` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, enjoy your video
+
A video should start playing in your browser above the input boxes.
Congrats, you have used Pion WebRTC! Now start building something cool
## Dealing with broken/lossy inputs
+
Pion WebRTC also provides a [SampleBuilder](https://pkg.go.dev/github.com/pion/webrtc/v3@v3.0.4/pkg/media/samplebuilder). This consumes RTP packets and returns samples.
It can be used to re-order and delay for lossy streams. You can see its usage in this example in [daf27b](https://github.com/pion/webrtc/commit/daf27bd0598233b57428b7809587ec3c09510413).
diff --git a/examples/rtp-to-webrtc/drawio b/examples/rtp-to-webrtc/drawio
new file mode 100644
index 00000000000..dae0280ff1f
--- /dev/null
+++ b/examples/rtp-to-webrtc/drawio
@@ -0,0 +1 @@
+7VtZc6M4EP41rpp5cAoQYPyYOMfs7hzecfbIvskg20wAeYR8ZH79SiAMSPIZH3ESUhVQAwL6+9TdarUboBPP7wgcj77gAEUNywjmDXDdsNjmOmzHJU+5xASWkAxJGAhZKeiFv5AQGkI6CQOU1i6kGEc0HNeFPk4S5NOaDBKCZ/XLBjiqP3UMh0gR9HwYqdJ/woCOcqlntUr5JxQOR8WTTbedn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MwMEw0nm3JeNlEKG5SMVeVbKyfgTTNPTr4G2h1loGVgo7Bg7/04Yd2XYGOVvHlmMaR062bpq1tdZ3deC8reUpdOmxQVZJvH2YhpA37q9/+/rxjY5yq+1KONmavJ3WGB9uoLcV5PK8KUExzqYSGX7nPX8wpWUNR5suPebsAag+MAjTcQT5W2cZiz5fJDz/XLWSs9BE5cfNWYANXNuZpeGaphzi6bSsy8OZsqPYm5oL/N6jvApMpjwrOnGYZ++woJb7c5jlIc7dOplGHRAXnNo62WokpSj5PfB+TuBtSbayVaxZbBt2O/aajg4cdNtq6KYPujt4zPRx24XM/L7Z2LsogCrA0sywF6P6KLbXUR2kgs17kVNjaW1Sa9fpstyRIxvzA49bR10HTtkjsyUDxCz3a1yv8U7uWB1L1fqrm+g6ErW9k8+2HHWR8t3KbWHl2uaerJwnO7L9WbnImSXuf0EyAInz6Tt+uB0GtqYgbBKMX8D4UgaThg0rZnBSwQuwjjjAtHpWzdpiBpcVvTSzAsgm8zAsNGsSevYYtGUETBWBQ5U+ahFQlxZhEDReTs3R87Qte3L7mEVHWn2rqdNVHmWD2fAu1YtMfeSpchNvPlTPlbdlrXrVo+Rs1pZBrhr51TLI5fw82WxbGq72rv4MSLNtIK9PH9ifbRfHbME6s8K5koHrWFfjXEnBw7NOUye9nJ0vhnXWvljXOi7r1haZ+QuzX9aRgUG2qaVlf4cBwpsWiVWIG0nlL0rCR66PWSR+9PUxSuKomvDh8bu2aiZlbjJMhvdZTXrTrbrH7LTIisbzIf/R3wV7GRTD8cU0+2jFfRqX/E88uyLPtw0ynM8MJC2JoZqCRl212j6qcrRM0xWrrWeakW0q0wAJmkwblH9yMIljvp9uw76XkZWUuHGbbXtiQGuJY6wQQLckvY9yRS0BNlh42M7BScoTVFkeOplrnJg+TFv4SL3DZI0uIiFTEefCvp2hu6EzPGlKQbE1OxcaKZyVybizN2TN8ifH+eXlL7fBzf8=
\ No newline at end of file
diff --git a/examples/save-to-disk/README.md b/examples/save-to-disk/README.md
index 1aae297e43c..fcd64085e64 100644
--- a/examples/save-to-disk/README.md
+++ b/examples/save-to-disk/README.md
@@ -1,30 +1,43 @@
# save-to-disk
+
save-to-disk is a simple application that shows how to record your webcam/microphone using Pion WebRTC and save VP8/Opus to disk.
If you wish to save VP8/Opus inside the same file see [save-to-webm](https://github.com/pion/example-webrtc-applications/tree/master/save-to-webm)
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fsave-to-disk%2Fdrawio)
+
## Instructions
+
### Download save-to-disk
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/save-to-disk
```
### Open save-to-disk example page
+
[jsfiddle.net](https://jsfiddle.net/vfmcg8rk/1/) you should see your Webcam, two text-areas and a 'Start Session' button
### Run save-to-disk, with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser, copy that and:
+
#### Linux/macOS
+
Run `echo $BROWSER_SDP | save-to-disk`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `save-to-disk < my_file`
### Input save-to-disk's SessionDescription into your browser
+
Copy the text that `save-to-disk` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle, wait, close jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, wait, close jsfiddle, enjoy your video
+
In the folder you ran `save-to-disk` you should now have a file `output-1.ivf` play with your video player of choice!
> Note: In order to correctly create the files, the remote client (JSFiddle) should be closed. The Go example will automatically close itself.
diff --git a/examples/save-to-disk/drawio b/examples/save-to-disk/drawio
new file mode 100644
index 00000000000..98183c9228a
--- /dev/null
+++ b/examples/save-to-disk/drawio
@@ -0,0 +1 @@
+7Vxbc9o4FP41zLQPdHy/PCak7W6nl+zQ3baPwhagqbGILAjpr1/Jd0sCDMUG0rQzAR8b2XzfOZ+OzlEyMEeLzXsClvNPOITRwNDCzcC8GxiGbm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J2y8rLoZoytNX36VRUdrRSwCpEXFnklsoahZCf+UpAnASQkUTKi+JJshwotv9ftxSZHf7qBzus/thExmv1JzvMt/8D
\ No newline at end of file
diff --git a/examples/simulcast/README.md b/examples/simulcast/README.md
index d48bf11b869..e5f3877c15d 100644
--- a/examples/simulcast/README.md
+++ b/examples/simulcast/README.md
@@ -1,32 +1,45 @@
# simulcast
+
demonstrates of how to handle incoming track with multiple simulcast rtp streams and show all them back.
The browser will not send higher quality streams unless it has the available bandwidth. You can look at
the bandwidth estimation in `chrome://webrtc-internals`. It is under `VideoBwe` when `Read Stats From: Legacy non-Standard`
is selected.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fsimulcast%2Fdrawio)
+
## Instructions
+
### Download simulcast
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/simulcast
```
### Open simulcast example page
+
[jsfiddle.net](https://jsfiddle.net/rxk4bftc) you should see two text-areas and a 'Start Session' button.
### Run simulcast, with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser, copy that and:
+
#### Linux/macOS
+
Run `echo $BROWSER_SDP | simulcast`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `simulcast < my_file`
### Input simulcast's SessionDescription into your browser
+
Copy the text that `simulcast` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, enjoy your video
+
Your browser should send a simulcast track to Pion, and then all 3 incoming streams will be relayed back.
Congrats, you have used Pion WebRTC! Now start building something cool
diff --git a/examples/simulcast/drawio b/examples/simulcast/drawio
new file mode 100644
index 00000000000..508008c9503
--- /dev/null
+++ b/examples/simulcast/drawio
@@ -0,0 +1 @@
+7Vxbc9u2Ev41nkkf5CHA+6MvbU47berW7TnpI0RCEk9IQQYhW86vL8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3grHrpmoWeDYjs5TzfsTKCUGbeAfN/FPgCtV0xxppIFn/g61jD5wB48Dnjsi8uBFIA9Inssqe/0ORh609ow0MPI69O/2gTz3OOTBYZC383Gfc4ee61/7zT/Qxo95NBJN9xrIz2DZo4KxQxpfavM5BplGH8gcEZhlDXZvuwE48XQsP78idwQcMB1LCzLQbSHOwZC1+pSHrcQB6a5bllb8pS52kEQ6wd93ApB+SuHva+bkN90rj9QaR688OpISev7tpt/ANNoe/J6ORcaWZMThDl0Gt+sNxCK5bcXaRwrpBAt4w5OiJOJFsGJPpH4KWsDT0kLq/a9adQ6fXKRHXC1vIFqY4FBa+PKdtU4YiBYdXqPSQ9B1VALkqO7tXljRtZ07j7ZPxQpguGrLtYTmzu3bACpjWcMwAxjq2x6c3dzQnGK5Y7AD7mdHLD04SXM7V50e2etW5JJbloAtWpKSzVy8tPE6IcGX9eo6QVR8cNLFr7c0y9620rbl+wsF5Kuqn6HL1eYLRHFYRItn5EW9kIo74DwV1YNMlPnEXjK6dvmsTRVQO5rHMKGGEgBKjUC9JXU17/HopzSiVFxml//Aeg8YsKQWL+ioCNA9idRH05AeAGpa/8+f78+1n7YPFkrBkmlYigWGatvSW0DX0jAIBRcHUdD4kIpXzE64Q11OpkKD8Fx7/fogppyL0MAC6HzzcLjQpZ8HwcXTN+LCeku40DyTPzIuOmSCteuQrCfwgOXJVcclw6kifFtaEprHljiVt6fKAw3d26TLSarhEx/ceMo/tnjysyRhs/fa6YeUvhRFWabaHNFTFMU369ef5wavXyJv/vgv
\ No newline at end of file
diff --git a/examples/swap-tracks/README.md b/examples/swap-tracks/README.md
index d8a8627522b..ffcfa72ffcf 100644
--- a/examples/swap-tracks/README.md
+++ b/examples/swap-tracks/README.md
@@ -1,28 +1,41 @@
# swap-tracks
+
swap-tracks demonstrates how to swap multiple incoming tracks on a single outgoing track.
+## [architecture](https://viewer.diagrams.net/?tags=%7B%7D&highlight=FFFFFF&edit=_blank&layers=1&nav=1&title=drawio#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fmohammadne%2Fwebrtc-pion%2Fmaster%2Fexamples%2Fswap-tracks%2Fdrawio)
+
## Instructions
+
### Download swap-tracks
+
```
export GO111MODULE=on
go get github.com/pion/webrtc/v3/examples/swap-tracks
```
### Open swap-tracks example page
+
[jsfiddle.net](https://jsfiddle.net/dzc17fga/) you should see two text-areas and a 'Start Session' button.
### Run swap-tracks, with your browsers SessionDescription as stdin
+
In the jsfiddle the top textarea is your browser, copy that and:
+
#### Linux/macOS
+
Run `echo $BROWSER_SDP | swap-tracks`
+
#### Windows
+
1. Paste the SessionDescription into a file.
1. Run `swap-tracks < my_file`
### Input swap-tracks's SessionDescription into your browser
+
Copy the text that `swap-tracks` just emitted and copy into second text area
-### Hit 'Start Session' in jsfiddle, enjoy your video!
+### Hit 'Start Session' in jsfiddle, enjoy your video
+
Your browser should send streams to Pion, and then a stream will be relayed back, changing every 5 seconds.
Congrats, you have used Pion WebRTC! Now start building something cool
diff --git a/examples/swap-tracks/drawio b/examples/swap-tracks/drawio
new file mode 100644
index 00000000000..a11556d5e19
--- /dev/null
+++ b/examples/swap-tracks/drawio
@@ -0,0 +1 @@
+7VxZb9s4EP41BtIHF7qPx8Rpu7vokSJdbPO0oCXa5kYWXYqOnf76JSXqIun4iOUjSQLE5oiipO+bGc4MqfTswXT5iYDZ5AuOYdKzjHjZs697lmW5vs0+uOSxkJieERaSMUGxkNWCW/QbCqEhpHMUw6zVkWKcUDRrCyOcpjCiLRkgBC/a3UY4aV91BsZQEdxGIFGl/6CYTgppYPm1/A+IxpPyyqYnnm8Kys7iSbIJiPGiIbI/9OwBwZgW36bLAUw4eiUuxXkfVxytbozAlG5ywufpl+ksIn//HuKvIR2H37/9CPpilAeQzMUDi5uljyUCMI0vOZCsleKUCa9ikE0gH9VkjQmdJuIrl98ASiFJc4ll2EyaUYLvK/AsLrmHNJqIk6I5eagGU59J3CCMWzSJJ/wE8RRS8sg6LGpyXAH4pMFLKSMwARQ9tMkFQkfG1X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