Files
livekit-3d/pkg/rtc/helper_test.go
T
David Zhao 258f5add2d protocol update: explicit AddTrack to move negotiation initiation to server side.
In order to avoid race conditions with WebRTC, where either side could initiate an offer when tracks have changes, we'll always initiate them from the SFU side.
2021-01-09 23:40:29 -08:00

25 lines
657 B
Go

package rtc_test
import (
"github.com/livekit/livekit-server/pkg/rtc/types/typesfakes"
"github.com/livekit/livekit-server/pkg/utils"
"github.com/livekit/livekit-server/proto/livekit"
)
func newMockParticipant(name string) *typesfakes.FakeParticipant {
p := &typesfakes.FakeParticipant{}
p.IDReturns(utils.NewGuid(utils.ParticipantPrefix))
p.NameReturns(name)
p.StateReturns(livekit.ParticipantInfo_JOINED)
return p
}
func newMockTrack(kind livekit.TrackType, name string) *typesfakes.FakePublishedTrack {
t := &typesfakes.FakePublishedTrack{}
t.IDReturns(utils.NewGuid(utils.TrackPrefix))
t.KindReturns(kind)
t.NameReturns(name)
return t
}