Plutonia
Pion WebRTC v3.1.0 is now available. Pion WebRTC is a Go implementation of WebRTC. If you haven't used it before check out awesome-pion or example-webrtc-applications for what people are doing. We maintain a feature list and other helpful resources in our README.md
This release includes 170 commits from 36 authors. This release was primarily focused on improve media quality/experience and making it easier to scale with Pion.
New Features
Serve many PeerConnections with one UDP port
You can now serve all your PeerConnections with a single UDP port. This makes deploying and scaling in environment like Kubernetes easier. Most WebRTC implementations (including Pion) will listen on a random UDP port for each remote peer.
To use this you create a ICEUDPMux
and then share across all your PeerConnections via the SettingEngine. Your code will look like the following.
// Listen on UDP Port 8443
udpListener, _ := net.ListenUDP("udp", &net.UDPAddr{
IP: net.IP{0, 0, 0, 0},
Port: 8443,
})
// Configure a SettingEngine to use our UDPMux. By default a PeerConnection has
// no global state. The API+SettingEngine allows the user to share state between them.
// In this case we are sharing our listening port across many.
settingEngine := webrtc.SettingEngine{}
settingEngine.SetICEUDPMux(webrtc.NewICEUDPMux(nil, udpListener))
// Create a new API using our SettingEngine
api = webrtc.NewAPI(webrtc.WithSettingEngine(settingEngine))
// Create a new PeerConnection
peerConnection_, := api.NewPeerConnection(webrtc.Configuration{})
This was implemented in d0a525.
FireFox Simulcast Support
We now support SSRC based Simulcast, before we only supported reading RID/MID from the RTP Extension Header as defined in ietf-mmusic-sdp-simulcast.
This was implemented in d570b7.
Sender/Receiver Report
Sender/Receiver Reports are now enabled by default via pion/interceptor
This means that remote peers will now get metadata from Pion and be able to do things like Bandwidth Estimation.
No code changes are needed to use them, but if you wish to disable them create a PeerConnection without passing a
InterceptorRegisty that RegisterDefaultInterceptors
has been called on. This can be useful if performance is critical
or you want to ship your own implementation.
// Register the default Codec configuration
m := &webrtc.MediaEngine{}
m.RegisterDefaultCodecs()
// Create a new API using our MediaEngine
api = webrtc.NewAPI(webrtc.WithMediaEngine(m))
// Create a new PeerConnection
peerConnection_, := api.NewPeerConnection(webrtc.Configuration{})
This was implemented in bc3016
Transport Wide Congestion Control Feedback
Transport Wide Congestion Control Feedback is now enabled by default via pion/interceptor
This allows remote peers to perform even better Congestion Control over Receiver Reports.
No code changes are needed to use them, but if you wish to disable them create a PeerConnection without passing a
InterceptorRegisty that RegisterDefaultInterceptors
has been called on. This can be useful if performance is critical
or you want to ship your own implementation.
// Register the default Codec configuration
m := &webrtc.MediaEngine{}
m.RegisterDefaultCodecs()
// Create a new API using our MediaEngine
api = webrtc.NewAPI(webrtc.WithMediaEngine(m))
// Create a new PeerConnection
peerConnection_, := api.NewPeerConnection(webrtc.Configuration{})
This was implemented in c8a26a
H265 Support
You can now packetize/depacketize H265. This allows you to read from a video file and send it over RTP, or the reverse.
This was implemented in 6cf5e9