binding to buffer and correctly forwarding

This commit is contained in:
David Zhao
2021-01-10 16:18:58 -08:00
parent 258f5add2d
commit 7dcb88343a
18 changed files with 751 additions and 338 deletions
+2 -3
View File
@@ -7,7 +7,6 @@ import (
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/rtc/types"
"github.com/livekit/livekit-server/pkg/utils"
"github.com/livekit/livekit-server/proto/livekit"
)
@@ -30,10 +29,10 @@ type DataTrack struct {
subscribers map[string]*DownDataChannel
}
func NewDataTrack(participantId string, dc *webrtc.DataChannel) *DataTrack {
func NewDataTrack(trackId, participantId string, dc *webrtc.DataChannel) *DataTrack {
t := &DataTrack{
//ctx: context.Background(),
id: utils.NewGuid(utils.TrackPrefix),
id: trackId,
name: dc.Label(),
participantId: participantId,
dataChannel: dc,