From 3cbbfbacdd2d91f3cd8687286d6f96c5534942ae Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 5 Dec 2020 21:02:28 +0100 Subject: [PATCH] Implement command renegotiate. --- static/sfu.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/static/sfu.js b/static/sfu.js index d9beae2..2e05f7a 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -1809,6 +1809,16 @@ commands.subgroups = { } }; +commands.renegotiate = { + description: 'renegotiate media streams', + f: (c, r) => { + for(let id in serverConnection.up) + serverConnection.up[id].restartIce(); + for(let id in serverConnection.down) + serverConnection.down[id].restartIce(); + } +}; + /** * parseCommand splits a string into two space-separated parts. The first * part may be quoted and may include backslash escapes.