progress with forwarder and peer

This commit is contained in:
David Zhao
2020-10-27 00:17:30 -07:00
parent 6c039bc64f
commit 1ed8ba3ae6
7 changed files with 258 additions and 21 deletions
+4 -1
View File
@@ -11,8 +11,10 @@ import (
type Room struct {
livekit.Room
// map of peerId -> WebRTCPeer
peers map[string]*WebRTCPeer
// Client ID => list of tracks they are publishing
tracks map[string][]PeerTrack
//tracks map[string][]PeerTrack
}
func NewRoomForRequest(req *livekit.CreateRoomRequest) (*Room, error) {
@@ -28,6 +30,7 @@ func NewRoomForRequest(req *livekit.CreateRoomRequest) (*Room, error) {
CreationTime: time.Now().Unix(),
Token: id.String(),
},
peers: make(map[string]*WebRTCPeer),
}, nil
}