diff --git a/shared/js/connection/DummyVoiceConnection.ts b/shared/js/connection/DummyVoiceConnection.ts index 888f51c7..d16fc5f3 100644 --- a/shared/js/connection/DummyVoiceConnection.ts +++ b/shared/js/connection/DummyVoiceConnection.ts @@ -3,7 +3,7 @@ import { VoiceConnectionStatus, WhisperSessionInitializer } from "../connection/VoiceConnection"; import {RecorderProfile} from "../voice/RecorderProfile"; -import {AbstractServerConnection} from "../connection/ConnectionBase"; +import {AbstractServerConnection, ConnectionStatistics} from "../connection/ConnectionBase"; import {VoiceClient} from "../voice/VoiceClient"; import {VoicePlayerEvents, VoicePlayerLatencySettings, VoicePlayerState} from "../voice/VoicePlayer"; import {WhisperSession, WhisperTarget} from "../voice/VoiceWhisper"; @@ -147,4 +147,11 @@ export class DummyVoiceConnection extends AbstractVoiceConnection { } stopAllVoiceReplays() { } + + async getConnectionStats(): Promise { + return { + bytesReceived: 0, + bytesSend: 0 + } + } } \ No newline at end of file diff --git a/web/app/voice/VoiceHandler.ts b/web/app/voice/VoiceHandler.ts index 4ffad33d..43d805ee 100644 --- a/web/app/voice/VoiceHandler.ts +++ b/web/app/voice/VoiceHandler.ts @@ -11,7 +11,7 @@ import { WhisperSessionInitializer } from "tc-shared/connection/VoiceConnection"; import {createErrorModal} from "tc-shared/ui/elements/Modal"; -import {ServerConnectionEvents} from "tc-shared/connection/ConnectionBase"; +import {ConnectionStatistics, ServerConnectionEvents} from "tc-shared/connection/ConnectionBase"; import {ConnectionState} from "tc-shared/ConnectionHandler"; import {VoiceBridge, VoicePacket, VoiceWhisperPacket} from "./bridge/VoiceBridge"; import {NativeWebRTCVoiceBridge} from "./bridge/NativeWebRTCVoiceBridge"; @@ -530,4 +530,11 @@ export class VoiceConnection extends AbstractVoiceConnection { } this.voiceBridge?.stopWhispering(); } + + async getConnectionStats(): Promise { + return { + bytesSend: 0, + bytesReceived: 0 + }; + } } \ No newline at end of file