client: allow to publish tracks with pre-existing control attribute (#48)

This commit is contained in:
aler9
2021-06-23 22:03:22 +02:00
parent a585634532
commit d073a185c2
6 changed files with 274 additions and 203 deletions

View File

@@ -41,11 +41,12 @@ type ServerStream struct {
// NewServerStream allocates a ServerStream.
func NewServerStream(tracks Tracks) *ServerStream {
st := &ServerStream{
tracks: tracks,
readersUnicast: make(map[*ServerSession]struct{}),
readers: make(map[*ServerSession]struct{}),
}
st.tracks = cloneAndClearTracks(tracks)
st.trackInfos = make([]*trackInfo, len(tracks))
for i := range st.trackInfos {
st.trackInfos[i] = &trackInfo{}