Skip to content

Commit

Permalink
Disable data channel for simulcast changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OrlandoCo authored and tarrencev committed Sep 28, 2020
1 parent 2294ffb commit 7aa7297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions examples/simulcast/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# pub-sub-in-browser
Demonstrates the simulcast capabilities of ion-sfu

>IMPORTANT: Work in progress this example may not work yet
## Instructions
```
go build cmd/server/json-rpc/main.go
Expand Down
5 changes: 0 additions & 5 deletions pkg/webrtctransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package sfu
import (
"context"
"fmt"
"strconv"
"sync"
"time"

Expand Down Expand Up @@ -130,10 +129,6 @@ func NewWebRTCTransport(ctx context.Context, session *Session, me webrtc.MediaEn
fmt.Printf("New DataChannel %s %d\n", d.Label(), d.ID())
// Register text message handling
d.OnMessage(func(msg webrtc.DataChannelMessage) {
if i, err := strconv.Atoi(string(msg.Data)); err == nil {
log.Infof("Switch to layer: %d", i)
p.senders[0].SwitchTemporalLayer(uint8(i))
}
})
})

Expand Down

0 comments on commit 7aa7297

Please sign in to comment.