Skip to content

Commit 1d12dc8

Browse files
hansgyllingSean-Der
authored andcommitted
Revert breaking change in ICECandidateStats
1 parent cedd45f commit 1d12dc8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,7 @@ type ICECandidateStats struct {
18951895
//
18961896
// DEPRECATED. Although it may still work in some browsers, the networkType property was deprecated for
18971897
// preserving privacy.
1898-
NetworkType string `json:"networkType,omitempty"`
1898+
NetworkType NetworkType `json:"networkType,omitempty"`
18991899

19001900
// IP is the IP address of the candidate, allowing for IPv4 addresses and
19011901
// IPv6 addresses, but fully qualified domain names (FQDNs) are not allowed.

stats_go_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ func getStatsSamples() []statSample {
804804
Type: StatsTypeLocalCandidate,
805805
ID: "ILO8S8KYr",
806806
TransportID: "T01",
807-
NetworkType: "wifi",
807+
NetworkType: NetworkTypeUDP4,
808808
IP: "192.168.0.36",
809809
Port: 65400,
810810
Protocol: "udp",
@@ -820,7 +820,7 @@ func getStatsSamples() []statSample {
820820
"type": "local-candidate",
821821
"id": "ILO8S8KYr",
822822
"transportId": "T01",
823-
"networkType": "wifi",
823+
"networkType": 1,
824824
"ip": "192.168.0.36",
825825
"port": 65400,
826826
"protocol": "udp",

0 commit comments

Comments
 (0)