@msquared/pixel-streaming-client
Version:
Browser client for viewing pixel-streamed content from MSquared events
24 lines • 963 B
TypeScript
import type { ClientOptions, TargetOpts } from "../client";
import { StreamProvider, StreamState } from "../client";
import type { SessionState } from "../session";
export type StartStreamingParams = Readonly<{
streamTarget: TargetOpts;
onError?: (error: Error) => void;
}>;
type UsePixelStreamingParams = Readonly<{
organizationId: string;
projectId: string;
worldId: string;
authToken: string;
clientOptions?: Omit<ClientOptions, "auth">;
}>;
export type UsePixelStreamingResult = {
streamState: StreamState;
sessionState: SessionState | undefined;
startStreaming: (params: StartStreamingParams) => void;
stopStreaming: () => void;
getBrowserSupport: () => Record<StreamProvider, boolean>;
};
export declare function usePixelStreaming({ organizationId, projectId, worldId, authToken, clientOptions, }: UsePixelStreamingParams): UsePixelStreamingResult;
export {};
//# sourceMappingURL=use-pixel-streaming.d.ts.map