@@ -75,7 +75,7 @@ func (p *ParticipantSupervisor) SetPublisherPeerConnectionConnected(isConnected
|
||||
p.lock.Unlock()
|
||||
}
|
||||
|
||||
func (p *ParticipantSupervisor) AddPublication(trackID livekit.TrackID, onSuccess func(track types.LocalMediaTrack)) {
|
||||
func (p *ParticipantSupervisor) AddPublication(trackID livekit.TrackID) {
|
||||
p.lock.Lock()
|
||||
pm, ok := p.publications[trackID]
|
||||
if !ok {
|
||||
@@ -85,7 +85,6 @@ func (p *ParticipantSupervisor) AddPublication(trackID livekit.TrackID, onSucces
|
||||
TrackID: trackID,
|
||||
IsPeerConnectionConnected: p.isPublisherConnected,
|
||||
Logger: p.params.Logger,
|
||||
OnSuccess: onSuccess,
|
||||
},
|
||||
),
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ type PublicationMonitorParams struct {
|
||||
TrackID livekit.TrackID
|
||||
IsPeerConnectionConnected bool
|
||||
Logger logger.Logger
|
||||
OnSuccess func(t types.LocalMediaTrack)
|
||||
}
|
||||
|
||||
type PublicationMonitor struct {
|
||||
@@ -168,12 +167,6 @@ func (p *PublicationMonitor) update() {
|
||||
return
|
||||
}
|
||||
|
||||
if pub.isStart && p.publishedTrack != nil {
|
||||
if p.params.OnSuccess != nil {
|
||||
p.params.OnSuccess(p.publishedTrack)
|
||||
}
|
||||
}
|
||||
|
||||
if (pub.isStart && p.publishedTrack == nil) || (!pub.isStart && p.publishedTrack != nil) {
|
||||
// put it back as the condition is not satisfied
|
||||
p.desiredPublishes.PushFront(pub)
|
||||
|
||||
Reference in New Issue
Block a user