Change go version to 1.20 for Windows 7 support

This commit is contained in:
Alex X
2024-09-01 15:56:19 +03:00
parent afc8f4fdf6
commit 2311d5eabe
12 changed files with 74 additions and 21 deletions
+3 -3
View File
@@ -2,10 +2,10 @@ package webrtc
import (
"net"
"slices"
"strings"
"github.com/AlexxIT/go2rtc/internal/api/ws"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/webrtc"
pion "github.com/pion/webrtc/v3"
)
@@ -75,14 +75,14 @@ func FilterCandidate(candidate *pion.ICECandidate) bool {
// host candidate should be in the hosts list
if candidate.Typ == pion.ICECandidateTypeHost && filters.Candidates != nil {
if !slices.Contains(filters.Candidates, candidate.Address) {
if !core.Contains(filters.Candidates, candidate.Address) {
return false
}
}
if filters.Networks != nil {
networkType := NetworkType(candidate.Protocol.String(), candidate.Address)
if !slices.Contains(filters.Networks, networkType) {
if !core.Contains(filters.Networks, networkType) {
return false
}
}