Signalling Pion Webrtc server via POST
Request
I have build this small signalling upgradation for anyone intrested in building the thier own server to establish 1:N Broadcasting connection with the users as described broadcast is a Pion WebRTC application that demonstrates how to broadcast a video to many peers, while only requiring the broadcaster to upload once.
in the Pion/webrtc/example/broadcast/.
Before using this solution you should set-up pion/webrtc/v3 (Go Modules are mandatory for using Pion WebRTC. So make sure you set export GO111MODULE=on, and explicitly specify /v3 when importing.).
Open broadcast example page
jsfiddle.net You should see two buttons 'Publish a Broadcast' and 'Join a Broadcast'
Run Application
Linux/macOS/windows
Run main.go
Start a publisher
- Click
Publish a Broadcast
- For Communicating with server you have to request the server via
POST
method (Postman Screenshot is given below) and paste the sdp obtained from the browser. The application
will respond with an offer as a response to the POST
, paste this into the second input field. Then press Start Session
.
Join the broadcast
- Click
Join a Broadcast
- Send a
POST
request on the same url, having the same parameters as described in the Start a publisher
Section and paste the sdp obtained from the browser . The application
will respond with an offer, paste this into the second input field. Then press Start Session
.
Big Thanks to the following