diff --git a/src/webrtc/callFeed.ts b/src/webrtc/callFeed.ts index 0e126dfc8..109b319bb 100644 --- a/src/webrtc/callFeed.ts +++ b/src/webrtc/callFeed.ts @@ -20,7 +20,7 @@ import { MatrixClient } from "../client"; import { RoomMember } from "../models/room-member"; const POLLING_INTERVAL = 250; // ms -const SPEAKING_THRESHOLD = -60; // dB +export const SPEAKING_THRESHOLD = -60; // dB export interface ICallFeedOpts { client: MatrixClient; diff --git a/src/webrtc/groupCall.ts b/src/webrtc/groupCall.ts index 660512ca8..3f999c28a 100644 --- a/src/webrtc/groupCall.ts +++ b/src/webrtc/groupCall.ts @@ -1,5 +1,5 @@ import EventEmitter from "events"; -import { CallFeed, CallFeedEvent } from "./callFeed"; +import { CallFeed, CallFeedEvent, SPEAKING_THRESHOLD } from "./callFeed"; import { MatrixClient } from "../client"; import { CallErrorCode, CallEvent, CallState, genCallID, MatrixCall, setTracksEnabled } from "./call"; import { RoomMember } from "../models/room-member"; @@ -101,7 +101,7 @@ export class GroupCall extends EventEmitter { // Config public activeSpeakerSampleCount = 8; public activeSpeakerInterval = 1000; - public speakingThreshold = -80; + public speakingThreshold = SPEAKING_THRESHOLD; public participantTimeout = 1000 * 15; public state = GroupCallState.LocalCallFeedUninitialized;