Documentation
    Preparing search index...

    Function createBrowserMediaStreamFetch

    • Fetch live MP3/ADTS audio for a host resource resolver without awaiting EOF. Browser CORS and private-network protections apply; production proxies must also enforce DNS-time address policy. Redirects and credentials are disabled, and upstream MIME hints never authorize bytes.

      Parameters

      • fetcher: (input: URL | RequestInfo, init?: RequestInit) => Promise<Response> = globalThis.fetch

        Host-owned browser transport, injectable for tests.

          • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
          • Parameters

            • input: URL | RequestInfo
            • Optionalinit: RequestInit

            Returns Promise<Response>

      Returns (url: string, init: ResourceFetchInit) => Promise<Response>

      A streaming resolver for ResourceServiceOptions.stream, after endpoint grants are checked.

        • (url: string, init: ResourceFetchInit): Promise<Response>
        • Host-only streaming resolver. Apply source safety policy before returning classified bytes; never exposed over the resource wire API.

          Parameters

          Returns Promise<Response>

      const resource = createResourceService({ fetch: resolveBytes, stream: createBrowserMediaStreamFetch() });