MCPcopy
hub / github.com/livekit/livekit / IsLocalCandidateRelaySelected

Method IsLocalCandidateRelaySelected

test/client/client.go:1348–1368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1346}
1347
1348func (c *RTCClient) IsLocalCandidateRelaySelected() bool {
1349 var info *types.ICEConnectionInfo
1350 if c.subscriberAsPrimary.Load() {
1351 if c.subscriber != nil {
1352 info = c.subscriber.GetICEConnectionInfo()
1353 }
1354 } else {
1355 if c.publisher != nil {
1356 info = c.publisher.GetICEConnectionInfo()
1357 }
1358 }
1359 if info == nil {
1360 return false
1361 }
1362 for _, local := range info.Local {
1363 if local.SelectedOrder > 0 && local.Candidate != nil && local.Candidate.Typ == webrtc.ICECandidateTypeRelay {
1364 return true
1365 }
1366 }
1367 return false
1368}
1369
1370func (c *RTCClient) SendNacks(count int) {
1371 var packets []rtcp.Packet

Callers 1

TestTurnRelayFunction · 0.80

Calls 2

LoadMethod · 0.65
GetICEConnectionInfoMethod · 0.65

Tested by 1

TestTurnRelayFunction · 0.64