Skip to content

Commit

Permalink
Rebase on new interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerns committed May 12, 2021
1 parent 2085194 commit d8b3da2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/middlewares/datachannel/subscriberapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func transformLayers(layers []string) ([]uint16, error) {
return res, nil
}

func sendMessage(streamID string, peer *sfu.Peer, layers []string, activeLayer int) {
func sendMessage(streamID string, peer sfu.Peer, layers []string, activeLayer int) {
al, _ := layerIntToStr(activeLayer)
payload := activeLayerMessage{
StreamID: streamID,
Expand Down
3 changes: 2 additions & 1 deletion pkg/sfu/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Peer interface {
Publisher() *Publisher
Subscriber() *Subscriber
Close() error
SendAPIChannelMessage(msg *[]byte) error
}

// JoinConfig allow adding more control to the peers joining a SessionLocal.
Expand Down Expand Up @@ -246,7 +247,7 @@ func (p *PeerLocal) Trickle(candidate webrtc.ICECandidateInit, target int) error
return nil
}

func (p *Peer) SendAPIChannelMessage(msg *[]byte) error {
func (p *PeerLocal) SendAPIChannelMessage(msg *[]byte) error {
if p.subscriber == nil {
return fmt.Errorf("No subscriber for this peer")
}
Expand Down
1 change: 1 addition & 0 deletions pkg/sfu/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Session interface {
GetDCMiddlewares() []*Datachannel
GetDataChannelLabels() []string
GetDataChannels(origin, label string) (dcs []*webrtc.DataChannel)
Peers() []Peer
}

type SessionLocal struct {
Expand Down

0 comments on commit d8b3da2

Please sign in to comment.