Replace Target with params to indicate direction (#955)

* Replace Target with params to indicate direction

* Add missed send answer call
This commit is contained in:
Raja Subramanian
2022-08-25 08:33:06 +05:30
committed by GitHub
parent 5223c8292e
commit 06a46d5de0
4 changed files with 36 additions and 32 deletions
+8 -6
View File
@@ -141,17 +141,19 @@ func NewRTCClient(conn *websocket.Conn) (*RTCClient, error) {
// Same applies for subscriber transport also
//
c.publisher, err = rtc.NewPCTransport(rtc.TransportParams{
Target: livekit.SignalTarget_SUBSCRIBER,
Config: &conf,
EnabledCodecs: codecs,
Config: &conf,
DirectionConfig: conf.Subscriber,
EnabledCodecs: codecs,
IsOfferer: true,
IsSendSide: true,
})
if err != nil {
return nil, err
}
c.subscriber, err = rtc.NewPCTransport(rtc.TransportParams{
Target: livekit.SignalTarget_PUBLISHER,
Config: &conf,
EnabledCodecs: codecs,
Config: &conf,
DirectionConfig: conf.Publisher,
EnabledCodecs: codecs,
})
if err != nil {
return nil, err