diff --git a/stats.go b/stats.go index ddf6a53751c..3d17fd6bfa3 100644 --- a/stats.go +++ b/stats.go @@ -1895,7 +1895,7 @@ type ICECandidateStats struct { // // DEPRECATED. Although it may still work in some browsers, the networkType property was deprecated for // preserving privacy. - NetworkType string `json:"networkType,omitempty"` + NetworkType NetworkType `json:"networkType,omitempty"` // IP is the IP address of the candidate, allowing for IPv4 addresses and // IPv6 addresses, but fully qualified domain names (FQDNs) are not allowed. diff --git a/stats_go_test.go b/stats_go_test.go index 1462534acf5..6e716c5f2fd 100644 --- a/stats_go_test.go +++ b/stats_go_test.go @@ -804,7 +804,7 @@ func getStatsSamples() []statSample { Type: StatsTypeLocalCandidate, ID: "ILO8S8KYr", TransportID: "T01", - NetworkType: "wifi", + NetworkType: NetworkTypeUDP4, IP: "192.168.0.36", Port: 65400, Protocol: "udp", @@ -820,7 +820,7 @@ func getStatsSamples() []statSample { "type": "local-candidate", "id": "ILO8S8KYr", "transportId": "T01", - "networkType": "wifi", + "networkType": 1, "ip": "192.168.0.36", "port": 65400, "protocol": "udp",