Improved robustness of subscription stack (#1382)
UpdateSubscription had a shortcoming where when it couldn't find the participant, it ignored the request. This PR further removes the reliance of current publisher state from subscribers. - SubscribeToTrack only takes in a trackID - Introduced RoomTrackManager to maintain all published tracks to a room - Added TrackUnpublished event to clearly indicate when a track has been removed - SubscribeRequested event no longer include information about the publisher
This commit is contained in:
@@ -71,14 +71,9 @@ func TestTrackPublishing(t *testing.T) {
|
||||
})
|
||||
p.UpTrackManager.AddPublishedTrack(track)
|
||||
p.handleTrackPublished(track)
|
||||
|
||||
require.True(t, published)
|
||||
require.False(t, updated)
|
||||
require.Len(t, p.UpTrackManager.publishedTracks, 1)
|
||||
|
||||
track.AddOnCloseArgsForCall(0)()
|
||||
require.Len(t, p.UpTrackManager.publishedTracks, 0)
|
||||
require.True(t, updated)
|
||||
})
|
||||
|
||||
t.Run("sends back trackPublished event", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user