Open History to see the last commit
1import { createPreviewTunnelUrlReader } from "@t3tools/client-runtime/state/previewTunnel";
2
3import { connectionAtomRuntime } from "../connection/runtime";
4import { appAtomRegistry } from "../rpc/atomRegistry";
5import { environmentSession } from "./session";
6
7/** The environment's tunnel WebSocket URL with a live media ticket, or null when unreachable. */
8export const readPreviewTunnelUrl = createPreviewTunnelUrlReader({
9 runtime: connectionAtomRuntime,
10 registry: appAtomRegistry,
11 preparedConnectionAtom: environmentSession.preparedConnectionValueAtom,
12});