From 76f041e75e11970057e3c4d056edee73be25aa5f Mon Sep 17 00:00:00 2001 From: hippoz Date: Wed, 2 Jun 2021 04:44:52 +0300 Subject: [PATCH] voice sort of barely works... --- brainlet/api/v2/gateway/index.js | 5 ++++- brainlet/api/v2/gateway/messageparser.js | 2 +- brainlet/experiments.js | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/brainlet/api/v2/gateway/index.js b/brainlet/api/v2/gateway/index.js index 82fbe84..8e0a5ad 100644 --- a/brainlet/api/v2/gateway/index.js +++ b/brainlet/api/v2/gateway/index.js @@ -28,7 +28,10 @@ class GatewayRTCConnection { async addTrack(track) { if (!track) return; - this.connection.addTrack(track); + this.ws.send(this.server.packet("EVENT_TRACK_NOTIFICATION", { + kind: track.kind + })); + this.connection.addTransceiver(track); } async renegotiate() { diff --git a/brainlet/api/v2/gateway/messageparser.js b/brainlet/api/v2/gateway/messageparser.js index d7a7371..d2cad7e 100644 --- a/brainlet/api/v2/gateway/messageparser.js +++ b/brainlet/api/v2/gateway/messageparser.js @@ -9,7 +9,7 @@ const opcodes = { 23: { name: "ACTION_VOICE_CONNECTION_REQUEST", data: "JSON" }, 24: { name: "EVENT_VOICE_CONNECTION_ANSWER", data: "JSON" }, 25: { name: "EVENT_RENEGOTIATE_REQUIRED", data: "JSON" }, - 26: { name: "ACTION_VOICE_ADD_ICE", data: "JSON" } + 26: { name: "EVENT_TRACK_NOTIFICATION", data: "JSON" } }; const opcodeSeparator = "@"; diff --git a/brainlet/experiments.js b/brainlet/experiments.js index c4b79ee..f27a15f 100644 --- a/brainlet/experiments.js +++ b/brainlet/experiments.js @@ -1,6 +1,6 @@ module.exports = { experiments: { - voiceSFUTesting: true, - userListTest: false + voiceSFUTesting: false, + userListTest: true } };