@@ -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