jaryhe 67001cd674 new | 6 kuukautta sitten | |
---|---|---|
.. | ||
webrtc | 6 kuukautta sitten | |
.gitignore | 6 kuukautta sitten | |
LICENSE | 6 kuukautta sitten | |
README.en.md | 6 kuukautta sitten | |
README.md | 6 kuukautta sitten | |
batcher.go | 6 kuukautta sitten | |
go.mod | 6 kuukautta sitten | |
go.sum | 6 kuukautta sitten | |
io.go | 6 kuukautta sitten | |
main.go | 6 kuukautta sitten | |
publish.html | 6 kuukautta sitten | |
publisher.go | 6 kuukautta sitten | |
subscribe.html | 6 kuukautta sitten | |
subscriber.go | 6 kuukautta sitten |
简体中文 | English
This plugin provides the functionality to stream videos to Monibuca through a web page and to play streams from Monibuca using WebRTC technology. It follows the WHIP specification.
https://github.com/Monibuca/plugin-webrtc
import ( _ "m7s.live/plugin/webrtc/v4" )
webrtc:
iceservers: []
publicip: [] # can be an array or a single string (automatically converted to an array)
port: tcp:9000 # can be a range of ports like udp:8000-9000 or a single port like udp:9000
pli: 2s # 2s
webrtc:
iceservers:
- urls:
- stun:stun.l.google.com:19302
- turn:turn.example.org
username: user
credential: pass
If testing locally, no change in configuration is required. However, if you are accessing it remotely, then you need to configure the public IP.
The exchange of SDP messages between the browser and Monibuca takes place and RTP packets are read or sent to stream videos.
/webrtc/play/[streamPath]
Body: SDP
Content-Type: application/sdp
Response Body: SDP
/webrtc/push/[streamPath]
Body: SDP
Content-Type: application/sdp
Response Body: SDP
/webrtc/test/publish
?streamPath=xxx
The streamPath to publish, default is live/webrtc
/webrtc/test/screenshare
?streamPath=xxx
The streamPath to publish, default is live/webrtc
/webrtc/test/subscribe
?streamPath=xxx
The streamPath to play, default is live/webrtc
you can add other query parameters to the URL
WebRTC-HTTP ingestion protocol A specification for the exchange of SDP messages between WebRTC clients.