Expose detailed connection info with ICEConnectionDetails (#2287)
* Expose detailed connection info with ICEConnectionDetails * clone to avoid data race * lower transport * simplify * address feedback
This commit is contained in:
@@ -358,10 +358,6 @@ func (p *ParticipantImpl) GetClientConfiguration() *livekit.ClientConfiguration
|
||||
return p.params.ClientConf
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) GetICEConnectionType() types.ICEConnectionType {
|
||||
return p.TransportManager.GetICEConnectionType()
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) GetBufferFactory() *buffer.Factory {
|
||||
return p.params.Config.BufferFactory
|
||||
}
|
||||
@@ -582,7 +578,7 @@ func (p *ParticipantImpl) OnClaimsChanged(callback func(types.LocalParticipant))
|
||||
func (p *ParticipantImpl) HandleSignalSourceClose() {
|
||||
p.TransportManager.SetSignalSourceValid(false)
|
||||
|
||||
if !p.TransportManager.HasPublisherEverConnected() && !p.TransportManager.HasSubscriberEverConnected() {
|
||||
if !p.HasConnected() {
|
||||
reason := types.ParticipantCloseReasonJoinFailed
|
||||
_ = p.Close(false, reason, false)
|
||||
}
|
||||
@@ -1708,6 +1704,10 @@ func (p *ParticipantImpl) GetPendingTrack(trackID livekit.TrackID) *livekit.Trac
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) HasConnected() bool {
|
||||
return p.TransportManager.HasSubscriberEverConnected() || p.TransportManager.HasPublisherEverConnected()
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) sendTrackPublished(cid string, ti *livekit.TrackInfo) {
|
||||
p.pubLogger.Debugw("sending track published", "cid", cid, "trackInfo", logger.Proto(ti))
|
||||
_ = p.writeMessage(&livekit.SignalResponse{
|
||||
|
||||
Reference in New Issue
Block a user