Skip to content

Commit

Permalink
refactor(relay): make relay more compliant to current workflow (#537)
Browse files Browse the repository at this point in the history
* refactor(relay): refactor relay

* refactor(relay): fix server

* refactor(relay): fix lint

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update cmd/signal/grpc/server/server.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* Update pkg/sfu/publisher.go

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>

* refactor(relay): fix dependency

Co-authored-by: Tarrence van As <tarrencev@users.noreply.github.com>
  • Loading branch information
OrlandoCo and tarrencev authored Jun 4, 2021
1 parent c767713 commit b29c73e
Show file tree
Hide file tree
Showing 7 changed files with 510 additions and 435 deletions.
2 changes: 0 additions & 2 deletions cmd/signal/grpc/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,10 @@ func (s *SFUServer) Signal(stream pb.SFU_SignalServer) error {

_, nopub := payload.Join.Config["NoPublish"]
_, nosub := payload.Join.Config["NoSubscribe"]
_, relay := payload.Join.Config["Relay"]

cfg := sfu.JoinConfig{
NoPublish: nopub,
NoSubscribe: nosub,
Relay: relay,
}
err = peer.Join(payload.Join.Sid, payload.Join.Uid, cfg)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/middlewares/datachannel/subscriberapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func sendMessage(streamID string, peer sfu.Peer, layers []string, activeLayer in
sfu.Logger.Error(err, "unable to marshal active layer message")
}

if err := peer.SendDCMessage(sfu.APIChannelLabel, &bytes); err != nil {
if err := peer.SendDCMessage(sfu.APIChannelLabel, bytes); err != nil {
sfu.Logger.Error(err, "unable to send ActiveLayerMessage to peer", "peer_id", peer.ID())
}
}
Expand Down
Loading

0 comments on commit b29c73e

Please sign in to comment.