switch participant to interface

This commit is contained in:
David Zhao
2020-12-21 23:00:48 -08:00
parent c4cb29a3bb
commit 2a79bdb678
12 changed files with 681 additions and 138 deletions
+2 -2
View File
@@ -65,9 +65,9 @@ func (t *DataTrack) StreamID() string {
return t.dataChannel.Label()
}
func (t *DataTrack) AddSubscriber(participant *Participant) error {
func (t *DataTrack) AddSubscriber(participant Participant) error {
label := PackDataTrackLabel(t.participantId, t.ID(), t.dataChannel.Label())
downChannel, err := participant.peerConn.CreateDataChannel(label, t.dataChannelOptions())
downChannel, err := participant.peerConnection().CreateDataChannel(label, t.dataChannelOptions())
if err != nil {
return err
}