Increase WebRTC receive MTU size
This commit is contained in:
@@ -41,6 +41,9 @@ func NewAPI(address string) (*webrtc.API, error) {
|
|||||||
// fix https://github.com/pion/webrtc/pull/2407
|
// fix https://github.com/pion/webrtc/pull/2407
|
||||||
s.SetDTLSInsecureSkipHelloVerify(true)
|
s.SetDTLSInsecureSkipHelloVerify(true)
|
||||||
|
|
||||||
|
// Ethernet MTU (1500) - IP Header (20) - UDP Header (8)
|
||||||
|
s.SetReceiveMTU(1472)
|
||||||
|
|
||||||
if address != "" {
|
if address != "" {
|
||||||
address, network, _ := strings.Cut(address, "/")
|
address, network, _ := strings.Cut(address, "/")
|
||||||
if network == "" || network == "udp" {
|
if network == "" || network == "udp" {
|
||||||
|
|||||||
Reference in New Issue
Block a user