mirror of
https://github.com/pion/webrtc.git
synced 2025-10-01 05:22:14 +08:00
Rename sfu -> sfu-minimal
We have a websocket SFU example now also Resolves #507
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,3 +18,5 @@ tags
|
|||||||
cover.out
|
cover.out
|
||||||
*.sw[poe]
|
*.sw[poe]
|
||||||
*.wasm
|
*.wasm
|
||||||
|
examples/sfu-ws/cert.pem
|
||||||
|
examples/sfu-ws/key.pem
|
||||||
|
@@ -11,7 +11,8 @@ We've build an extensive collection of examples covering common use-cases. You c
|
|||||||
* [Gstreamer Send Offer](gstreamer-send-offer): Example gstreamer-send-offer is a variant of gstreamer-send that initiates the WebRTC connection by sending an offer.
|
* [Gstreamer Send Offer](gstreamer-send-offer): Example gstreamer-send-offer is a variant of gstreamer-send that initiates the WebRTC connection by sending an offer.
|
||||||
* [Save to Disk](save-to-disk): The save-to-disk example shows how to record your webcam and save the footage to disk on the server side.
|
* [Save to Disk](save-to-disk): The save-to-disk example shows how to record your webcam and save the footage to disk on the server side.
|
||||||
* [Janus Gateway](janus-gateway): Example janus-gateway is a collection of examples showing how to use Pion WebRTC with [janus-gateway](https://github.com/meetecho/janus-gateway).
|
* [Janus Gateway](janus-gateway): Example janus-gateway is a collection of examples showing how to use Pion WebRTC with [janus-gateway](https://github.com/meetecho/janus-gateway).
|
||||||
* [SFU](sfu): The SFU example demonstrates how to broadcast a video to multiple peers. A broadcaster uploads the video once and the server forwards it to all other peers.
|
* [SFU Minimal](sfu-minimal): The SFU example demonstrates how to broadcast a video to multiple peers. A broadcaster uploads the video once and the server forwards it to all other peers.
|
||||||
|
* [SFU Websocket](sfu-websocket): The SFU example demonstrates how to broadcast a video to multiple peers. A broadcaster uploads the video once and the server forwards it to all other peers.
|
||||||
|
|
||||||
#### Data Channel API
|
#### Data Channel API
|
||||||
* [Data Channels](data-channels): The data-channels example shows how you can send/recv DataChannel messages from a web browser.
|
* [Data Channels](data-channels): The data-channels example shows how you can send/recv DataChannel messages from a web browser.
|
||||||
|
32
examples/sfu-minimal/README.md
Normal file
32
examples/sfu-minimal/README.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# sfu-minimal
|
||||||
|
sfu-minimal 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.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
### Download sfu-minimal
|
||||||
|
```
|
||||||
|
go get github.com/pions/webrtc/examples/sfu-minimal
|
||||||
|
```
|
||||||
|
|
||||||
|
### Open sfu-minimal example page
|
||||||
|
[jsfiddle.net](https://jsfiddle.net/5cwx0rns/11/) You should see two buttons 'Publish a Broadcast' and 'Join a Broadcast'
|
||||||
|
|
||||||
|
### Run SFU Minimal
|
||||||
|
#### Linux/macOS
|
||||||
|
Run `sfu-minimal` OR run `main.go` in `github.com/pions/webrtc/examples/sfu-minimal`
|
||||||
|
|
||||||
|
### Start a publisher
|
||||||
|
|
||||||
|
* Click `Publish a Broadcast`
|
||||||
|
* `curl localhost:8080/sdp -d "YOUR SDP"`. The `sfu-minimal` application will respond with an offer, paste this into the second input field. Then press `Start Session`
|
||||||
|
|
||||||
|
### Join the broadcast
|
||||||
|
* Click `Join a Broadcast`
|
||||||
|
* `curl localhost:8080/sdp -d "YOUR SDP"`. The `sfu-minimal` application will respond with an offer, paste this into the second input field. Then press `Start Session`
|
||||||
|
|
||||||
|
You can change the listening port using `-port 8011`
|
||||||
|
|
||||||
|
You can `Join the broadcast` as many times as you want. The `sfu-minimal` Golang application is relaying all traffic, so your browser only has to upload once.
|
||||||
|
|
||||||
|
Congrats, you have used pion-WebRTC! Now start building something cool
|
@@ -1,32 +0,0 @@
|
|||||||
# sfu
|
|
||||||
sfu 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.
|
|
||||||
|
|
||||||
## Instructions
|
|
||||||
### Download sfu
|
|
||||||
```
|
|
||||||
go get github.com/pions/webrtc/examples/sfu
|
|
||||||
```
|
|
||||||
|
|
||||||
### Open sfu example page
|
|
||||||
[jsfiddle.net](https://jsfiddle.net/5cwx0rns/11/) You should see two buttons 'Publish a Broadcast' and 'Join a Broadcast'
|
|
||||||
|
|
||||||
### Run SFU
|
|
||||||
#### Linux/macOS
|
|
||||||
Run `sfu` OR run `main.go` in `github.com/pions/webrtc/examples/sfu`
|
|
||||||
|
|
||||||
### Start a publisher
|
|
||||||
|
|
||||||
* Click `Publish a Broadcast`
|
|
||||||
* `curl localhost:8080/sdp -d "YOUR SDP"`. The `sfu` application will respond with an offer, paste this into the second input field. Then press `Start Session`
|
|
||||||
|
|
||||||
### Join the broadcast
|
|
||||||
* Click `Join a Broadcast`
|
|
||||||
* `curl localhost:8080/sdp -d "YOUR SDP"`. The `sfu` application will respond with an offer, paste this into the second input field. Then press `Start Session`
|
|
||||||
|
|
||||||
You can change the listening port using `-port 8011`
|
|
||||||
|
|
||||||
You can `Join the broadcast` as many times as you want. The `sfu` Golang application is relaying all traffic, so your browser only has to upload once.
|
|
||||||
|
|
||||||
Congrats, you have used pion-WebRTC! Now start building something cool
|
|
Reference in New Issue
Block a user