Skip to content

Commit 2560860

Browse files
conference: accept the metadata from the DC offer
1 parent 569e974 commit 2560860

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

pkg/conference/processor.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ func (c *Conference) handleDataChannelMessage(participant *Participant, sfuMessa
184184
return
185185
}
186186

187+
participant.streamMetadata = sfuMessage.Metadata
188+
187189
participant.sendDataChannelMessage(event.SFUMessage{
188190
Op: event.SFUOperationAnswer,
189191
SDP: answer.SDP,
@@ -197,12 +199,6 @@ func (c *Conference) handleDataChannelMessage(participant *Participant, sfuMessa
197199
case event.SFUOperationAlive:
198200
// FIXME: Handle the heartbeat message here (updating the last timestamp etc).
199201
case event.SFUOperationMetadata:
200-
streamIDs := make([]string, 0, len(sfuMessage.Metadata))
201-
for streamID := range sfuMessage.Metadata {
202-
streamIDs = append(streamIDs, streamID)
203-
}
204-
participant.logger.Infof("Received metadata over DC: %v", streamIDs)
205-
206202
participant.streamMetadata = sfuMessage.Metadata
207203
c.resendMetadataToAllExcept(participant.id)
208204
}

pkg/conference/state.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@ func (c *Conference) getAvailableStreamsFor(forParticipant ParticipantID) event.
8282
streamsMetadata[streamID] = metadata
8383
} else {
8484
participant.logger.Warnf("Don't have metadata for stream %s", streamID)
85-
// FIXME: A hacky way to nevertheless send a metadata about the stream and track for which we have
86-
// no metadata. This is against the MSC actually since we know nothing about the stream in
87-
// this case. But it was implemented like this in the `main` branch of the SFU.
88-
streamsMetadata[streamID] = event.CallSDPStreamMetadataObject{
89-
UserID: participant.id.UserID,
90-
DeviceID: participant.id.DeviceID,
91-
Tracks: event.CallSDPStreamMetadataTracks{trackID: event.CallSDPStreamMetadataTrack{}},
92-
}
9385
}
9486
}
9587
}

0 commit comments

Comments
 (0)