From 1a6a7428d69fa09fcc5a169caf6b92328e4a46c5 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Fri, 6 Feb 2026 22:23:31 +0000 Subject: [PATCH 1/2] Initial plan From 4922fd00adbb9e58fe6410409c7a410af7c79e16 Mon Sep 17 00:00:00 2001 From: "openai-code-agent[bot]" <242516109+Codex@users.noreply.github.com> Date: Fri, 6 Feb 2026 22:35:15 +0000 Subject: [PATCH 2/2] fix: wire exported server helpers and react hook --- src/index.ts | 5 +++++ src/react.ts | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/index.ts b/src/index.ts index e0e4000..89c10f9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,5 +8,10 @@ export { disableDebug, AudioProxyDebugger, } from './debugger'; +export { + AudioProxyServer, + createProxyServer, + startProxyServer, +} from './server-impl'; export * from './types'; export { createAudioClient } from './client'; diff --git a/src/react.ts b/src/react.ts index 693c6b8..f905b9c 100644 --- a/src/react.ts +++ b/src/react.ts @@ -313,6 +313,30 @@ export function useAudioMetadata(filePath: string | null) { }; } +/** + * Simple hook for getting a playable/proxied URL for audio or video + */ +export function useAudioUrl(url: string | null, options?: AudioProxyOptions) { + const { audioUrl, isLoading, error, streamInfo, retry, client } = + useAudioProxy(url, options); + + const normalizedError = useMemo(() => { + if (!error) { + return null; + } + return new Error(error); + }, [error]); + + return { + playableUrl: audioUrl, + loading: isLoading, + error: normalizedError, + streamInfo, + retry, + client, + }; +} + /** * Context provider for global audio proxy configuration */