refactor(voice-call): drop unused stream helpers · openclaw/openclaw@330545f
vincentkoc
·
2026-06-20
·
via Recent Commits to openclaw:main
File tree
extensions/voice-call/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -709,25 +709,6 @@ export class MediaStreamHandler {
|
709 | 709 | this.clearAudio(streamSid); |
710 | 710 | } |
711 | 711 | |
712 | | -/** |
713 | | - * Get active session by call ID. |
714 | | - */ |
715 | | -getSessionByCallId(callId: string): StreamSession | undefined { |
716 | | -return [...this.sessions.values()].find((session) => session.callId === callId); |
717 | | -} |
718 | | - |
719 | | -/** |
720 | | - * Close all sessions. |
721 | | - */ |
722 | | -closeAll(): void { |
723 | | -for (const session of this.sessions.values()) { |
724 | | -this.clearTtsState(session.streamSid); |
725 | | -session.sttSession.close(); |
726 | | -session.ws.close(); |
727 | | -} |
728 | | -this.sessions.clear(); |
729 | | -} |
730 | | - |
731 | 712 | private getTtsQueue(streamSid: string): TtsQueueEntry[] { |
732 | 713 | const existing = this.ttsQueues.get(streamSid); |
733 | 714 | if (existing) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -156,10 +156,6 @@ export class TwilioProvider implements VoiceCallProvider {
|
156 | 156 | this.currentPublicUrl = url; |
157 | 157 | } |
158 | 158 | |
159 | | -getPublicUrl(): string | null { |
160 | | -return this.currentPublicUrl; |
161 | | -} |
162 | | - |
163 | 159 | setTTSProvider(provider: TelephonyTtsProvider): void { |
164 | 160 | this.ttsProvider = provider; |
165 | 161 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -250,7 +250,6 @@ describe("VoiceCallWebhookServer realtime transcription provider selection", ()
|
250 | 250 | } |
251 | 251 | expect(mediaStreamHandler["handleUpgrade"]).toBeTypeOf("function"); |
252 | 252 | expect(mediaStreamHandler["sendAudio"]).toBeTypeOf("function"); |
253 | | -expect(mediaStreamHandler["closeAll"]).toBeTypeOf("function"); |
254 | 253 | } finally { |
255 | 254 | await server.stop(); |
256 | 255 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。