Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyoshiaki committed Jan 5, 2025
1 parent a8032cf commit 5089752
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/ice/restart/offer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ console.log("start");
await pc.setRemoteDescription(msg);
} else if (msg.type === "restart") {
console.log("restarted by server");
const offer = await pc.createOffer({ iceRestart: true });
pc.restartIce();
const offer = await pc.createOffer();
await pc.setLocalDescription(offer);
const sdp = JSON.stringify(pc.localDescription);
socket.send(sdp);
Expand Down

0 comments on commit 5089752

Please sign in to comment.