Skip to content

Commit

Permalink
feat: update sdk (#306)
Browse files Browse the repository at this point in the history
* feat: update sdk

* bump ion-sdk

* Fix simulcast high radio btn

* bump sdk

Co-authored-by: OrlandoCo <[email protected]>
  • Loading branch information
tarrencev and OrlandoCo authored Nov 16, 2020
1 parent 6fb9a74 commit b53aa94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
7 changes: 2 additions & 5 deletions cmd/signal/json-rpc/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ func (p *JSONSignal) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonr

}
p.OnIceCandidate = func(candidate *webrtc.ICECandidateInit, target int) {
if err := conn.Notify(ctx, "trickle", struct {
Candidate *webrtc.ICECandidateInit `json:"candidate"`
Target int `json:"target"`
}{
Candidate: candidate,
if err := conn.Notify(ctx, "trickle", Trickle{
Candidate: *candidate,
Target: target,
}); err != nil {
log.Errorf("error sending ice candidate %s", err)
Expand Down
13 changes: 9 additions & 4 deletions examples/echotest/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ <h3>Pion</h3>
<div id="simulcast-controls" style="display: none">
<div class="radio">
<label
><input type="radio" onclLocal(this)" value="high"
name="optremotevideos" checked /> High</label
><input
type="radio"
onclick="controlRemoteVideo(this)"
value="high"
name="optremotevideos"
/>
High</label
>
</div>
<div class="radio">
Expand Down Expand Up @@ -281,7 +286,7 @@ <h3>Pion</h3>
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"
crossorigin="anonymous"
></script>
<script src="https://unpkg.com/ion-sdk-js@1.0.20/dist/ion-sdk.min.js"></script>
<script src="https://unpkg.com/ion-sdk-js@1.4.1/dist/ion-sdk.min.js"></script>
<script>
const localVideo = document.getElementById("local-video");
const remoteVideo = document.getElementById("remote-video");
Expand Down Expand Up @@ -426,7 +431,7 @@ <h3>Pion</h3>
let bytesPrev;
let timestampPrev;
setInterval(() => {
clientRemote.getStats(null).then((results) => {
clientRemote.getSubStats(null).then((results) => {
results.forEach((report) => {
const now = report.timestamp;

Expand Down

0 comments on commit b53aa94

Please sign in to comment.