export structures for cloud (#220)

* export structures for cloud


Co-authored-by: cnderrauber <zengjie9004@gmail.com>
This commit is contained in:
cnderrauber
2021-12-02 13:57:22 +08:00
committed by GitHub
co-authored by cnderrauber
parent e37afdca6f
commit 6510692f23
7 changed files with 137 additions and 62 deletions
+1 -3
View File
@@ -428,7 +428,6 @@ func (p *ParticipantImpl) Close() error {
p.lock.Lock()
for _, t := range p.publishedTracks {
// skip updates
t.OnClose(nil)
t.RemoveAllSubscribers()
}
@@ -1079,7 +1078,7 @@ func (p *ParticipantImpl) handleTrackPublished(track types.PublishedTrack) {
track.Start()
track.OnClose(func() {
track.AddOnClose(func() {
// cleanup
p.lock.Lock()
delete(p.publishedTracks, track.ID())
@@ -1088,7 +1087,6 @@ func (p *ParticipantImpl) handleTrackPublished(track types.PublishedTrack) {
if p.IsReady() && p.onTrackUpdated != nil {
p.onTrackUpdated(p, track)
}
track.OnClose(nil)
})
if p.onTrackPublished != nil {